Uh oh!
There was an error while loading. Please reload this page.
d_to_q, q_to_d - #197
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| The array of :math:`q` values np.array([qs]). | ||
| The units for the q-values are the inverse of the units of the provided wavelength. | ||
| This is the correct format for loading into diffpy.utils.DiffractionOject.on_q | ||
| This is the correct format for loading into diffpy.utils.DiffractionObject.on_q. |
| The array of :math:`d` values np.array([ds]). | ||
| """ | ||
| if 0 in q: | ||
| raise ValueError(invalid_input_emsg) |
There was a problem hiding this comment.
just make this np.inf but also give a warning message that the largest d is infinite and can't be plotted? Something like that?
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
yucongalicechen
commented
Dec 6, 2024
@sbillinge updated. please review again. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@## main #197 +/- ##
==========================================
- Coverage 96.53% 94.17% -2.37%
==========================================
Files 8 8 Lines 289 309 +20 ==========================================
+ Hits 279 291 +12 - Misses 10 18 +8
|
| invalid_input_emsg = ( | ||
| "Input values have resulted in an infinite output. Please ensure there are no zeros in the input." | ||
| ) | ||
| inf_output_msg = "WARNING: The largest output is infinite and cannot be plotted." |
There was a problem hiding this comment.
@sbillinge out of curiosity,
for both error and warning messages, do we still want to maintain our convention of 1) reason for error, (2) what to do to fix it ?
There was a problem hiding this comment.
I tweaked this a bit and downgraded it to an INFO from a WARNING....don't want users to freak out....
closes#176
@sbillinge ready for review