using slicing method
This commit is contained in:
parent
c86e3e292c
commit
be21d1289d
|
@ -192,7 +192,7 @@ class Orientation: # ToDo: make subclass of lattice and Rotation
|
||||||
"""TSL color of inverse pole figure for given axis."""
|
"""TSL color of inverse pole figure for given axis."""
|
||||||
color = np.zeros(3,'d')
|
color = np.zeros(3,'d')
|
||||||
|
|
||||||
for o in self.equivalentOrientations():
|
for o in self.equivalent:
|
||||||
pole = o.rotation@axis # align crystal direction to axis
|
pole = o.rotation@axis # align crystal direction to axis
|
||||||
inSST,color = self.lattice.symmetry.inSST(pole,color=True)
|
inSST,color = self.lattice.symmetry.inSST(pole,color=True)
|
||||||
if inSST: break
|
if inSST: break
|
||||||
|
|
|
@ -34,7 +34,7 @@ class TestOrientation:
|
||||||
for rot in [Rotation.from_random() for r in range(n//100)]:
|
for rot in [Rotation.from_random() for r in range(n//100)]:
|
||||||
R = damask.Orientation(rot,lattice)
|
R = damask.Orientation(rot,lattice)
|
||||||
color = R.IPFcolor(direction)
|
color = R.IPFcolor(direction)
|
||||||
for equivalent in R.equivalentOrientations():
|
for equivalent in R.equivalent:
|
||||||
assert np.allclose(color,R.IPFcolor(direction))
|
assert np.allclose(color,R.IPFcolor(direction))
|
||||||
|
|
||||||
@pytest.mark.parametrize('model',['Bain','KS','GT','GT_prime','NW','Pitsch'])
|
@pytest.mark.parametrize('model',['Bain','KS','GT','GT_prime','NW','Pitsch'])
|
||||||
|
|
|
@ -29,13 +29,13 @@ class TestOrientation_vec:
|
||||||
|
|
||||||
for s in range(len(ori_vec.lattice.symmetry.symmetryOperations())):
|
for s in range(len(ori_vec.lattice.symmetry.symmetryOperations())):
|
||||||
assert all(ori_vec.equivalent.rotation.as_Eulers()[s,0] == \
|
assert all(ori_vec.equivalent.rotation.as_Eulers()[s,0] == \
|
||||||
ori0.equivalentOrientations()[s].rotation.as_Eulers())
|
ori0.equivalent[s].rotation.as_Eulers())
|
||||||
assert all(ori_vec.equivalent.rotation.as_quaternion()[s,1] == \
|
assert all(ori_vec.equivalent.rotation.as_quaternion()[s,1] == \
|
||||||
ori1.equivalentOrientations()[s].rotation.as_quaternion())
|
ori1.equivalent[s].rotation.as_quaternion())
|
||||||
assert all(ori_vec.equivalent.rotation.as_Rodrigues()[s,2] == \
|
assert all(ori_vec.equivalent.rotation.as_Rodrigues()[s,2] == \
|
||||||
ori2.equivalentOrientations()[s].rotation.as_Rodrigues())
|
ori2.equivalent[s].rotation.as_Rodrigues())
|
||||||
assert all(ori_vec.equivalent.rotation.as_cubochoric()[s,3] == \
|
assert all(ori_vec.equivalent.rotation.as_cubochoric()[s,3] == \
|
||||||
ori3.equivalentOrientations()[s].rotation.as_cubochoric())
|
ori3.equivalent[s].rotation.as_cubochoric())
|
||||||
|
|
||||||
@pytest.mark.parametrize('lattice',Lattice.lattices)
|
@pytest.mark.parametrize('lattice',Lattice.lattices)
|
||||||
def test_inFZ_vec(self,lattice):
|
def test_inFZ_vec(self,lattice):
|
||||||
|
|
Loading…
Reference in New Issue