From f5801601d8d88a510e89c9c01c0daa04e3b39c23 Mon Sep 17 00:00:00 2001 From: Tias Maiti Date: Sun, 29 Mar 2015 19:16:45 +0000 Subject: [PATCH] =?UTF-8?q?fixed=20UnboundLocalError=20(calling=20variable?= =?UTF-8?q?=20before=20assignment)=20in=20=E2=80=9CinversePole=E2=80=9D=20?= =?UTF-8?q?function?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/damask/orientation.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/damask/orientation.py b/lib/damask/orientation.py index 486ce1808..60b65967c 100644 --- a/lib/damask/orientation.py +++ b/lib/damask/orientation.py @@ -826,13 +826,13 @@ class Orientation: ''' 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 - pole = q.conjugated()*axis # align crystal direction to axis - if self.symmetry.inSST(pole): break - else: - pole = q.conjugated()*axis # align crystal direction to axis + + 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 + if self.symmetry.inSST(pole): break + else: + pole = q.conjugated()*axis # align crystal direction to axis return pole