using doctest style
https://docs.python.org/3/library/doctest.html https://numpy.org/doc/stable/docs/howto_document.html#sections (section 15)
This commit is contained in:
parent
6f3b526811
commit
66b928c5af
|
@ -229,19 +229,20 @@ class Symmetry:
|
||||||
Return inverse pole figure color if requested.
|
Return inverse pole figure color if requested.
|
||||||
Bases are computed from
|
Bases are computed from
|
||||||
|
|
||||||
basis = {'cubic' : np.linalg.inv(np.array([[0.,0.,1.], # direction of red
|
>>> basis = {'cubic' : np.linalg.inv(np.array([[0.,0.,1.], # direction of red
|
||||||
[1.,0.,1.]/np.sqrt(2.), # direction of green
|
... [1.,0.,1.]/np.sqrt(2.), # direction of green
|
||||||
[1.,1.,1.]/np.sqrt(3.)]).T), # direction of blue
|
... [1.,1.,1.]/np.sqrt(3.)]).T), # direction of blue
|
||||||
'hexagonal' : np.linalg.inv(np.array([[0.,0.,1.], # direction of red
|
... 'hexagonal' : np.linalg.inv(np.array([[0.,0.,1.], # direction of red
|
||||||
[1.,0.,0.], # direction of green
|
... [1.,0.,0.], # direction of green
|
||||||
[np.sqrt(3.),1.,0.]/np.sqrt(4.)]).T), # direction of blue
|
... [np.sqrt(3.),1.,0.]/np.sqrt(4.)]).T), # direction of blue
|
||||||
'tetragonal' : np.linalg.inv(np.array([[0.,0.,1.], # direction of red
|
... 'tetragonal' : np.linalg.inv(np.array([[0.,0.,1.], # direction of red
|
||||||
[1.,0.,0.], # direction of green
|
... [1.,0.,0.], # direction of green
|
||||||
[1.,1.,0.]/np.sqrt(2.)]).T), # direction of blue
|
... [1.,1.,0.]/np.sqrt(2.)]).T), # direction of blue
|
||||||
'orthorhombic' : np.linalg.inv(np.array([[0.,0.,1.], # direction of red
|
... 'orthorhombic': np.linalg.inv(np.array([[0.,0.,1.], # direction of red
|
||||||
[1.,0.,0.], # direction of green
|
... [1.,0.,0.], # direction of green
|
||||||
[0.,1.,0.]]).T), # direction of blue
|
... [0.,1.,0.]]).T), # direction of blue
|
||||||
}
|
... }
|
||||||
|
|
||||||
"""
|
"""
|
||||||
if self.lattice == 'cubic':
|
if self.lattice == 'cubic':
|
||||||
basis = {'improper':np.array([ [-1. , 0. , 1. ],
|
basis = {'improper':np.array([ [-1. , 0. , 1. ],
|
||||||
|
|
Loading…
Reference in New Issue