-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add utilities so that freud.diffraction.Diffractometer
can be used like bitbucket diffractometer code
#8
Add utilities so that freud.diffraction.Diffractometer
can be used like bitbucket diffractometer code
#8
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 3 3
Lines 76 93 +17
=========================================
+ Hits 76 93 +17
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall think this is great, just a couple of suggestions added.
Co-authored-by: gwenwhite <66272666+gwenwhite@users.noreply.github.com>
Example snippet using this code to calculate diffraction patterns:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
The
compute
method for rhefreud.diffraction.Diffractomer
class takes a quaternion as the view_orientation kwarg. In order to use this module the same way the old diffractometer code was used, we need to convert the rotation matrices to quaternions.rotmat_to_q
calculation follows this example.get_quaternions
uses similar logic to get the view vectors asprep_matrices
from bitbucketcme_utils/analyze/diffractometer.py
rotation_matrix_from_to
is from bitbucketcme_utils/manip/utilities.py
(only docstring formatting has been updated.)view_orientation
infreud.diffraction.DiffractionPattern.compute
glotzerlab/freud#792Thoughts/TODO