use new rotation class

This commit is contained in:
Martin Diehl 2019-02-23 22:13:24 +01:00
parent fff377de7f
commit a8e8b75cc0
1 changed files with 8 additions and 7 deletions

View File

@ -52,13 +52,14 @@ parser.set_defaults(degrees = False,
if sum(x is not None for x in [options.rotation,options.eulers,options.matrix,options.quaternion]) != 1: if sum(x is not None for x in [options.rotation,options.eulers,options.matrix,options.quaternion]) != 1:
parser.error('not exactly one rotation specified...') parser.error('not exactly one rotation specified...')
eulers = np.array(damask.orientation.Orientation( if options.quaternion is not None:
quaternion = np.array(options.quaternion) if options.quaternion else None, eulers = damask.Rotation.fromQuaternion(np.array(options.quaternion)).asEulers(degrees=True)
angleAxis = np.array(options.rotation) if options.rotation else None, if options.rotation is not None:
matrix = np.array(options.matrix) if options.matrix else None, eulers = damask.Rotation.fromAxisAngle(np.array(options.rotation,degrees=True)).asEulers(degrees=True)
Eulers = np.array(options.eulers) if options.eulers else None, if options.matrix is not None:
degrees = options.degrees, eulers = damask.Rotation.fromMatrix(np.array(options.Matrix)).asEulers(degrees=True)
).asEulers(degrees=True)) if options.eulers is not None:
eulers = damask.Rotation.fromEulers(np.array(options.eulers),degrees=True).asEulers(degrees=True)
# --- loop over input files ------------------------------------------------------------------------- # --- loop over input files -------------------------------------------------------------------------