Closed JakHolzer closed 4 years ago
@JakHolzer , how about to use is_integer()
(https://docs.python.org/3/library/stdtypes.html#float.is_integer) instead? I don't think that complicated logic with Decimal
is needed.
The reason is that the hkl are in ccl in float format even for hkl, they are for example -1.000 1.000 0.000, therefore they will be evaluated as floats, not integer if I'm not mistaken. The decimal checks if there are some numbers except zeros after decimal points which is only way how to separate hkl from real indices.
pá 11. 9. 2020 v 14:07 odesílatel Ivan Usov notifications@github.com napsal:
@JakHolzer https://github.com/JakHolzer , how about to use is_integer() (https://docs.python.org/3/library/stdtypes.html#float.is_integer) instead? I don't think that complicated logic with Decimal is needed.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/paulscherrerinstitute/pyzebra/pull/5#issuecomment-691054453, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM2BBRWB7B7CNYHZJWBNVRTSFIHGJANCNFSM4RFAMJOA .
Try, except deleted. Added one if/elif loop to tell apart zebra mode (bi, nb) and different angles saved