-
Notifications
You must be signed in to change notification settings - Fork 50
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 Quaternion.to_scipy_rotation
?
#527
Comments
This is a very good idea. The use of the intrinsic letters "ZXZ" (rotation of reference frame, not object) seems correct to me. Do you have time to implement it? As far as I can tell, sub-classes of A test must ensure a consistent conversion loop. And a nice example in the gallery would be great! |
I am not familiar with the subtilties of the rotation business and I think that will take me some time to figure out what are the various convention and how they are used by scipy and orix. I suspect that it would be easier for someone that understand better all this, in order word, it is fairly unlikely that I will do it. |
Sure, I can do it. Most likely within a 1,5 weeks. |
I think there is a faster and less convoluted way to do this where you just pass the reordered quaternion. For testing, the easiest approach would probably be passing the quaternion unittest data through I can't do proper pull requests till the new year, but if this is still open in January, I'll add it. As a side note, converting via Euler angle triplets can be a headache. Gimble lock and variable accuracy aside, switching passive to active also switches the ordering of the triplets. There are also a lot of historical terminology problems (for example, what orix and MTEX call bunge angles aren't the triplet originally used by H.J. bunge, see section 1.8.2 of C-S Man's book for details. Using the code below though, the equivalent angle triplets are:
note even here there is confusion, as scipy defaults to the smallest absolute angle magnitude whereas orix chooses positive angles only.
|
I am wondering if it would be sensible to add the functionality to convert orix quaternion to scipy rotation (the reverse is already possible with
Rotation.from_scipy_rotation
). I would find it useful to define rotation to be used in the rotation of block waves in abtem.The text was updated successfully, but these errors were encountered: