diff --git a/lib/damask/orientation.py b/lib/damask/orientation.py index d3cd4f94a..63fb124a6 100644 --- a/lib/damask/orientation.py +++ b/lib/damask/orientation.py @@ -855,7 +855,7 @@ class Orientation: M = closest.quaternion.asM() * n if i == 0 else M + closest.quaternion.asM() * n # noqa add (multiples) of this orientation to average noqa eig, vec = np.linalg.eig(M/N) - return Orientation(quaternion = Quaternion(quatArray = np.real(vec.T[eig.argmax()])), + return Orientation(quaternion = Quaternion(quat = np.real(vec.T[eig.argmax()])), symmetry = reference.symmetry.lattice) diff --git a/processing/post/addGrainID.py b/processing/post/addGrainID.py index 45034034b..c3b98f4e6 100755 --- a/processing/post/addGrainID.py +++ b/processing/post/addGrainID.py @@ -200,9 +200,9 @@ for name in filenames: if gID != -1 and gID not in alreadyChecked: # indexed point belonging to a grain not yet tested? alreadyChecked[gID] = True # remember not to check again disorientation = o.disorientation(orientations[gID],SST = False)[0] # compare against other orientation - if disorientation.quaternion.w > cos_disorientation: # within threshold ... + if disorientation.quaternion.q > cos_disorientation: # within threshold ... candidates.append(gID) # remember as potential candidate - if disorientation.quaternion.w >= bestDisorientation.w: # ... and better than current best? + if disorientation.quaternion.q >= bestDisorientation.q: # ... and better than current best? matched = True matchedID = gID # remember that grain bestDisorientation = disorientation.quaternion diff --git a/processing/pre/geom_fromTable.py b/processing/pre/geom_fromTable.py index 3cdd1b2e6..e1157d325 100755 --- a/processing/pre/geom_fromTable.py +++ b/processing/pre/geom_fromTable.py @@ -258,7 +258,7 @@ for name in filenames: if len(grains) > 0: # check immediate neighborhood first cos_disorientations = np.array([o.disorientation(orientations[grainID], - SST = False)[0].quaternion.w \ + SST = False)[0].quaternion.q \ for grainID in grains]) # store disorientation per grainID closest_grain = np.argmax(cos_disorientations) # grain among grains with closest orientation to myself match = 'local' @@ -269,7 +269,7 @@ for name in filenames: if len(grains) > 0: cos_disorientations = np.array([o.disorientation(orientations[grainID], - SST = False)[0].quaternion.w \ + SST = False)[0].quaternion.q \ for grainID in grains]) # store disorientation per grainID closest_grain = np.argmax(cos_disorientations) # grain among grains with closest orientation to myself match = 'global'