Skip to content
Snippets Groups Projects
Commit 5b102664 authored by Luise Odenthal's avatar Luise Odenthal
Browse files

resolved merge conflict in euler.py

parents 229b0d15 956246af
No related branches found
No related tags found
No related merge requests found
......@@ -135,50 +135,54 @@ def from_matrix(matrix, axes='sxyz'):
u = [np.arctan2(matrix[1, 0], matrix[2, 0]),
np.arccos(matrix[0, 0]),
np.arctan2(matrix[0, 1], -matrix[0, 2])]
if axes == 'sxyz':
elif axes == 'sxyz':
u = [np.arctan2(matrix[1, 2], matrix[2, 2]),
-np.arcsin(matrix[0, 2]),
np.arctan2(matrix[0, 1], matrix[0, 0])]
if axes == 'sxzx':
elif axes == 'sxzx':
u = [np.arctan2(matrix[2, 1], -matrix[1, 0]),
np.arccos(matrix[0, 0]),
np.arctan2(matrix[0, 2], matrix[0, 1])]
if axes == 'sxzy':
elif axes == 'sxzy':
u = [np.arctan2(-matrix[2, 1], matrix[1, 1]),
np.arcsin(matrix[0, 0]),
np.arctan2(-matrix[0, 2], matrix[0, 0])]
if axes == 'syxy':
elif axes == 'syxy':
u = [np.arctan2(matrix[0, 1], -matrix[2, 1]),
np.arccos(matrix[1, 1]),
np.arctan2(-matrix[1, 0], matrix[1, 2])]
if axes == 'syxz':
elif axes == 'syxz':
u = [np.arctan2(-matrix[0, 2], matrix[2, 2]),
np.arcsin(matrix[1, 2]),
np.arctan2(-matrix[1, 0], matrix[1, 1])]
if axes == 'syzx':
elif axes == 'syzx':
u = [np.arctan2(matrix[2, 0], matrix[0, 0]),
-np.arcsin(matrix[1, 0]),
np.arctan2(matrix[1, 2], matrix[1, 1])]
if axes == 'syzy':
elif axes == 'syzy':
u = [np.arctan2(matrix[2, 1], matrix[0, 1]),
np.arccos(matrix[1, 1]),
np.arctan2(matrix[1, 2], -matrix[1, 0])]
if axes == 'szxy':
elif axes == 'szxy':
u = [np.arctan2(matrix[0, 1], matrix[1, 1]),
-np.arcsin(matrix[2, 1]),
np.arctan2(matrix[2, 0], matrix[2, 2])]
if axes == 'szxz':
elif axes == 'szxz':
u = [np.arctan2(matrix[0, 2], matrix[1, 2]),
np.arccos(matrix[2, 2]),
np.arctan2(matrix[2, 0], -matrix[2, 1])]
if axes == 'szyx':
elif axes == 'szyx':
u = [np.arctan2(-matrix[1, 0], matrix[0, 0]),
np.arcsin(matrix[2, 0]),
np.arctan2(-matrix[2, 1], matrix[2, 2])]
if axes == 'szyz':
elif axes == 'szyz':
u = [np.arctan2(matrix[1, 2], -matrix[0, 2]),
np.arccos(matrix[2, 2]),
np.arctan2(matrix[2, 1], matrix[2, 0])]
else:
print("conv", axes, matrix)
raise KeyError('convention not in {}', _AXES2TUPLE.keys())
return u
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment