*Created by: ivan-usov*
@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.
*Created by: JakHolzer*
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>
> .
>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Created by: JakHolzer
Try, except deleted.
Added one if/elif loop to tell apart zebra mode (bi, nb) and different angles saved
Created by: ivan-usov
@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 withDecimalis needed.Created by: ivan-usov
Reading 'dat' files breaks at this line.
Created by: ivan-usov
Review: Changes requested
I left a few comments, but not sure they didn't result in a review.
Created by: ivan-usov
Review: Approved
Merged by: ivan-usov at 2020-09-15 12:25:25 UTC
Created by: JakHolzer
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: