orix icon indicating copy to clipboard operation
orix copied to clipboard

Reflecting orientations in lab frame

Open maclariz opened this issue 2 years ago • 1 comments

Dear all, Is there any easy way to reflect the orientations in the lab frame? Basically, my raw data is coming in in a form where x and y are the wrong way round. So you could swap x and y, or rotate 90 about z and then reflect either x or y. Currently I am doing that, but just getting round it by reflecting the x component of the vector just before plotting the pole figure. But would be nicer to just fix the whole orientation dataset. I have fiddled with various things and nothing has had the expected effect.

maclariz avatar Jan 30 '23 18:01 maclariz

If you're feeling adventurous and want to try out the develop branch you could try rotating your orientations with Rotation.from_align_vectors([1, 0, 0], [0, 1, 0]) (docs). Would that be enough? I haven't compared them, but I believe this method is equivalent to MTEX' orientation.map(), if you're familiar with that one.

The notion of a lab frame is not well defined, if at all, in orix. Pole figures have x direction east and y direction north, and vectors are rotated by rotations in this reference frame in a lab->crystal (Bunge/active) sense (unless an inversion is applied). Apart from this its mostly up to the user to figure it out, unfortunately. Would be nice to have this better defined, but there are many other outstanding issues that must be handled before this, I think.

hakonanes avatar Jan 30 '23 20:01 hakonanes

Since Rotation.from_align_vectors is now in the main branch, I'm going to close this issue. @maclariz, if you feel your issue is not solved, leave a comment and I will reopen this.

argerlt avatar Jul 18 '25 04:07 argerlt