diffpy / diffpy.utils

General purpose shared utilities for diffpy.
Other
3 stars 20 forks source link

differaction objects improve functions q_to_tth, tth_to_q #174

Open yucongalicechen opened 5 hours ago

yucongalicechen commented 5 hours ago

Problem

Functions do not handle invalid cases (when tth > 180 or arcsin value > 1).

Proposed solution

Raise valueerror for those cases. Refer to #154 for more details.

sbillinge commented 4 hours ago

I am guessing this won't be a ValueError. We can have it crash the way it does now (invalid arcsin) but we want to overload the error message to help the user know how to fix it.