@@ -43,7 +43,8 @@ class Orientation(Rotation,Crystal):
4343 - cubic
4444
4545 and enables symmetry-related operations such as
46- "equivalent", "reduced", "disorientation", "IPF_color", or "to_SST".
46+ :func:`equivalent`, :func:`reduced` :func:`disorientation`,
47+ :func:`IPF_color`, or :func:`to_SST`.
4748
4849 The Bravais lattice is given in the Pearson notation:
4950
@@ -74,8 +75,9 @@ class Orientation(Rotation,Crystal):
7475
7576 and inherits the corresponding crystal family.
7677 Specifying a Bravais lattice, compared to just the crystal family,
77- extends the functionality of Orientation objects to include operations such as
78- "Schmid", "related", or "to_frame" that require a lattice type and its parameters.
78+ extends the functionality of Orientation objects to include operations
79+ such as :func:`Schmid`, :func:`related`, or :func:`to_frame` that
80+ require a lattice type and its parameters.
7981
8082 Examples
8183 --------
@@ -1177,7 +1179,7 @@ def disorientation(self: MyType,
11771179 >>> b = damask.Orientation.from_Euler_angles(phi=[104,11,87],degrees=True,family='hexagonal')
11781180 >>> a.disorientation(b)
11791181 Crystal family: hexagonal
1180- Quaternion [0.976 0.189 0.018 0.103]
1182+ array((0.976478 , 0.18880082, 0.01784483, 0.10259889))
11811183
11821184 Plot a sample from the Mackenzie distribution.
11831185
@@ -1188,8 +1190,8 @@ def disorientation(self: MyType,
11881190 >>> b = damask.Orientation.from_random(shape=N,family='cubic')
11891191 >>> n,omega = a.disorientation(b).as_axis_angle(degrees=True,pair=True)
11901192 >>> plt.hist(omega,25)
1191- [ ...]
1192- >>> plt.show()
1193+ ( ...)
1194+ >>> plt.show(block=False )
11931195 """
11941196 # For extension to cases with differing symmetry see
11951197 # https://doi.org/10.1107/S0021889808016373 and https://doi.org/10.1107/S0108767391006864
@@ -1495,10 +1497,10 @@ def IPF_color(self,
14951497 >>> coord = damask.util.project_equal_area(o.to_SST(lab))
14961498 >>> color = o.IPF_color(lab)
14971499 >>> plt.scatter(coord[:,0],coord[:,1],color=color,s=.06)
1498- [...]
1500+ <matplotlib.collections.PathCollection object at ...>
14991501 >>> plt.axis('scaled')
1500- [ ...]
1501- >>> plt.show()
1502+ ( ...)
1503+ >>> plt.show(block=False )
15021504 """
15031505 if np .array (vector ).shape [- 1 ] != 3 :
15041506 raise ValueError ('input is not a field of three-dimensional vectors' )
@@ -1565,11 +1567,11 @@ def to_lattice(self, *,
15651567 >>> import numpy as np
15661568 >>> import damask
15671569 >>> cubic = damask.Orientation.from_axis_angle(n_omega=[1,0,0,90],degrees=True,lattice='cI')
1568- >>> cubic.to_lattice(direction=[1, 0, 0])
1570+ >>> np.round( cubic.to_lattice(direction=[1, 0, 0]),3 )
15691571 array([1., 0., 0.])
1570- >>> cubic.to_lattice(direction=[0, 1, 0])
1571- array([0., 0., -1.])
1572- >>> cubic.to_lattice(direction=[0, 0, 1])
1572+ >>> np.round( cubic.to_lattice(direction=[0, 1, 0]),3 )
1573+ array([ 0., 0., -1.])
1574+ >>> np.round( cubic.to_lattice(direction=[0, 0, 1]),3 )
15731575 array([-0., 1., 0.])
15741576 >>> tetragonal = damask.Orientation(lattice='tI',c=0.5)
15751577 >>> damask.util.scale_to_coprime(tetragonal.to_lattice(direction=[1,1,1]))
@@ -1656,9 +1658,9 @@ def Schmid(self, *,
16561658 >>> import damask
16571659 >>> O = damask.Orientation.from_Euler_angles(phi=[0,45,0],degrees=True,lattice='cF')
16581660 >>> O.Schmid(N_slip=[12])[0]
1659- array([[ 0.000 , 0.000 , 0.000 ],
1660- [ 0.577, -0.000 , 0.816 ],
1661- [ 0.000, 0.000, 0.000 ]])
1661+ array([[ 0. , 0. , 0. ],
1662+ [ 0.408, 0.408 , 0.408 ],
1663+ [-0.408, -0.408, -0.408 ]])
16621664 """
16631665 if len (self .shape ) == 0 :
16641666 return self @ super ().Schmid (N_slip = N_slip , N_twin = N_twin )
@@ -1700,10 +1702,9 @@ def related(self: MyType,
17001702 Bravais lattice: cI
17011703 a=1 m, b=1 m, c=1 m
17021704 α=90°, β=90°, γ=90°
1703- Quaternions of shape (3,)
1704- [[ 6.53281482e-01 2.70598050e-01 6.53281482e-01 2.70598050e-01]
1705- [ 2.70598050e-01 -2.70598050e-01 -6.53281482e-01 -6.53281482e-01]
1706- [ 9.23879533e-01 -5.55111512e-17 -2.77555756e-17 -3.82683432e-01]]
1705+ array([( 6.53281482e-01, 2.70598050e-01, 6.53281482e-01, 2.70598050e-01),
1706+ ( 2.70598050e-01, -2.70598050e-01, -6.53281482e-01, -6.53281482e-01),
1707+ ( 9.23879533e-01, -5.55111512e-17, -2.77555756e-17, -3.82683432e-01)])
17071708 """
17081709 lattice ,o = self .relation_operations (model ,target )
17091710 target = Crystal (lattice = lattice ) if target is None else target
0 commit comments