4 space indentation
This commit is contained in:
parent
76caf422aa
commit
1e178287fe
|
@ -385,7 +385,7 @@ class Result:
|
|||
try:
|
||||
f[k]
|
||||
path.append(k)
|
||||
except KeyError as e:
|
||||
except KeyError:
|
||||
pass
|
||||
for o,p in zip(['constituents','materialpoints'],['con_physics','mat_physics']):
|
||||
for oo in self.iterate(o):
|
||||
|
@ -394,7 +394,7 @@ class Result:
|
|||
try:
|
||||
f[k]
|
||||
path.append(k)
|
||||
except KeyError as e:
|
||||
except KeyError:
|
||||
pass
|
||||
return path
|
||||
|
||||
|
@ -661,8 +661,8 @@ class Result:
|
|||
|
||||
lattice = q['meta']['Lattice']
|
||||
|
||||
for i,q in enumerate(q['data']):
|
||||
o = Orientation(np.array([q['w'],q['x'],q['y'],q['z']]),lattice).reduced()
|
||||
for i,qu in enumerate(q['data']):
|
||||
o = Orientation(np.array([qu['w'],qu['x'],qu['y'],qu['z']]),lattice).reduced()
|
||||
colors[i] = np.uint8(o.IPFcolor(d_unit)*255)
|
||||
|
||||
return {
|
||||
|
@ -814,8 +814,8 @@ class Result:
|
|||
m = util.scale_to_coprime(pole)
|
||||
coords = np.empty((len(q['data']),2))
|
||||
|
||||
for i,q in enumerate(q['data']):
|
||||
o = Rotation(np.array([q['w'],q['x'],q['y'],q['z']]))
|
||||
for i,qu in enumerate(q['data']):
|
||||
o = Rotation(np.array([qu['w'],qu['x'],qu['y'],qu['z']]))
|
||||
rotatedPole = o*unit_pole # rotate pole according to crystal orientation
|
||||
(x,y) = rotatedPole[0:2]/(1.+abs(unit_pole[2])) # stereographic projection
|
||||
coords[i] = [np.sqrt(x*x+y*y),np.arctan2(y,x)] if polar else [x,y]
|
||||
|
@ -1048,7 +1048,7 @@ class Result:
|
|||
|
||||
N_digits = int(np.floor(np.log10(int(self.increments[-1][3:]))))+1
|
||||
|
||||
for i,inc in enumerate(util.show_progress(self.iterate('increments'),len(self.selection['increments']))):
|
||||
for inc in util.show_progress(self.iterate('increments'),len(self.selection['increments'])):
|
||||
|
||||
materialpoints_backup = self.selection['materialpoints'].copy()
|
||||
self.pick('materialpoints',False)
|
||||
|
|
Loading…
Reference in New Issue