NOTE: this may already exist under another name in orix already, if so, write it on the white board and close out this issue.
In MTEX, when we want misorientations between two orientations, we can do this:
miso = inv(Mart_oris)*Scrambled_Mart_oris
We need to do this a LOT in the pythonic code. It might already exist in a different name in orix, but it's not immediately apparent.
It is possible to do this with scipy Rotations like this, but it's sort of messy:
from orix.io import load
from orix.quaternion import Rotations
from scipy.spatial.rotations import Rotations as R
import numpy as np
ebsd = load("AF_001.ang")
sp_R = R.from_euler('ZXZ', ebsd.rotations.to_euler())
o1 = sp_R[:-1:2]
o2 = sp_R[1::2]
mis = R.mul(o1, o2.inv())
Either:
- Find the equation in pure orix (no scipy)
OR
- Take this messy code above and create a function out of it with documentation.
Ether way, make it take in two lists of orientations and/or rotations, and output a list of misorientations.
Don't worry about symmetry considerations, that will be a differnet item.
NOTE: this may already exist under another name in orix already, if so, write it on the white board and close out this issue.
In MTEX, when we want misorientations between two orientations, we can do this:
miso = inv(Mart_oris)*Scrambled_Mart_oris
We need to do this a LOT in the pythonic code. It might already exist in a different name in orix, but it's not immediately apparent.
It is possible to do this with scipy Rotations like this, but it's sort of messy:
from orix.io import load
from orix.quaternion import Rotations
from scipy.spatial.rotations import Rotations as R
import numpy as np
ebsd = load("AF_001.ang")
sp_R = R.from_euler('ZXZ', ebsd.rotations.to_euler())
o1 = sp_R[:-1:2]
o2 = sp_R[1::2]
mis = R.mul(o1, o2.inv())
Either:
OR
Ether way, make it take in two lists of orientations and/or rotations, and output a list of misorientations.
Don't worry about symmetry considerations, that will be a differnet item.