fixed UnboundLocalError (calling variable before assignment) in “inversePole” function
This commit is contained in:
parent
38943c1e94
commit
f5801601d8
|
@ -827,12 +827,12 @@ class Orientation:
|
||||||
axis rotated according to orientation (using crystal symmetry to ensure location falls into SST)
|
axis rotated according to orientation (using crystal symmetry to ensure location falls into SST)
|
||||||
'''
|
'''
|
||||||
|
|
||||||
if SST: # pole requested to be within SST
|
for i,q in enumerate(self.symmetry.equivalentQuaternions(self.quaternion)): # test all symmetric equivalent orientations
|
||||||
for i,q in enumerate(self.symmetry.equivalentQuaternions(self.quaternion)): # test all symmetric equivalent orientations
|
if SST: # pole requested to be within SST
|
||||||
pole = q.conjugated()*axis # align crystal direction to axis
|
pole = q.conjugated()*axis # align crystal direction to axis
|
||||||
if self.symmetry.inSST(pole): break
|
if self.symmetry.inSST(pole): break
|
||||||
else:
|
else:
|
||||||
pole = q.conjugated()*axis # align crystal direction to axis
|
pole = q.conjugated()*axis # align crystal direction to axis
|
||||||
|
|
||||||
return pole
|
return pole
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue