From c53bf02feae4f32b46281ca82d3138639ccae26b Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 11 Sep 2015 15:38:03 +0000 Subject: [PATCH] changed back to old behavior --- processing/pre/geom_fromTable.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/processing/pre/geom_fromTable.py b/processing/pre/geom_fromTable.py index 8fa761563..ec5825dd8 100755 --- a/processing/pre/geom_fromTable.py +++ b/processing/pre/geom_fromTable.py @@ -122,7 +122,7 @@ for name in filenames: outname = os.path.splitext(name)[0]+'.geom' if name else name, buffered = False) except: continue - table.croak('\033[1m'+scriptName+'\033[0m'+(': '+name if name else '')) + table.croak(damask.util.emph(scriptName)+(': '+name if name else '')) # ------------------------------------------ read head --------------------------------------- @@ -216,14 +216,15 @@ for name in filenames: elif inputtype == 'quaternion': o = damask.Orientation(quaternion = myData[colOri:colOri+4], symmetry = mySym).reduced() - + + oInv = o.quaternion.conjugated() neighbors = KDTree.query_ball_point([x,y,z], 3) # search points within radius breaker = False for n in neighbors: # check each neighbor if myRank <= rank[n] or table.data[n,colPhase] != myData[colPhase]: continue # skip myself, anyone further ahead (cannot yet have a grain ID), and other phases for symQ in symQuats[microstructure[rank[n]]-1]: - if (symQ*o.quaternion).asAngleAxis(degrees = options.degrees)[0] <= options.tolerance: # found existing orientation resembling me + if (symQ*oInv).asAngleAxis(degrees = options.degrees)[0] <= options.tolerance: # found existing orientation resembling me microstructure[myRank] = microstructure[rank[n]] breaker = True; break if breaker: break @@ -231,7 +232,7 @@ for name in filenames: if microstructure[myRank] == 0: # no other orientation resembled me nGrains += 1 # make new grain ... microstructure[myRank] = nGrains # ... and assign to me - symQuats.append(o.symmetry.equivalentQuaternions(o.quaternion.conjugated())) # store all symmetrically equivalent orientations for future comparison + symQuats.append(o.symmetry.equivalentQuaternions(o.quaternion)) # store all symmetrically equivalent orientations for future comparison phases.append(myData[colPhase]) # store phase info for future reporting myRank += 1