diff --git a/processing/post/addSchmidfactors.py b/processing/post/addSchmidfactors.py index 6335b419e..37dd56512 100755 --- a/processing/post/addSchmidfactors.py +++ b/processing/post/addSchmidfactors.py @@ -212,10 +212,10 @@ for name in filenames: outputAlive = True while outputAlive and table.data_read(): # read next data line of ASCII table - o = damask.Orientation(quaternion = np.array(list(map(float,table.data[column:column+4])))) + o = damask.Rotation(list(map(float,table.data[column:column+4]))) - table.data_append( np.abs( np.sum(slip_direction * (o.quaternion * force) ,axis=1) \ - * np.sum(slip_normal * (o.quaternion * normal),axis=1))) + table.data_append( np.abs( np.sum(slip_direction * (o * force) ,axis=1) \ + * np.sum(slip_normal * (o * normal),axis=1))) outputAlive = table.data_write() # output processed line # ------------------------------------------ output finalization ----------------------------------- diff --git a/processing/post/rotateData.py b/processing/post/rotateData.py index 293f0f0b8..1aafe7eb9 100755 --- a/processing/post/rotateData.py +++ b/processing/post/rotateData.py @@ -91,7 +91,7 @@ for name in filenames: table.data[column:column+3] = r * np.array(list(map(float,table.data[column:column+3]))) for t in active['tensor']: column = table.label_index(t) - table.data[column:column+9] = (r * (np.array(list(map(float,table.data[column:column+9]))))).reshape((3,3)) + table.data[column:column+9] = (r * np.array(list(map(float,table.data[column:column+9]))).reshape((3,3))).reshape(9) outputAlive = table.data_write() # output processed line diff --git a/python/damask/orientation.py b/python/damask/orientation.py index 6f1b12671..85f3fb173 100644 --- a/python/damask/orientation.py +++ b/python/damask/orientation.py @@ -322,7 +322,7 @@ class Rotation: ax = angleAxis if isinstance(angleAxis, np.ndarray) else np.array(angleAxis) if P > 0: ax[1:4] *= -1 # convert from P=1 to P=-1 - if degrees: ax[0] = np.degrees(ax[0]) + if degrees: ax[0] = np.radians(ax[0]) if normalise: ax[1:4] /=np.linalg.norm(ax[1:4]) if ax[0] < 0.0 or ax[0] > np.pi: raise ValueError('Axis angle rotation angle outside of [0..π].\n'.format(ax[0]))