from_miller#

classmethod ReciprocalLatticeVector.from_miller(miller)[source]#

Create a new instance from a Miller instance.

Parameters:

miller (orix.vector.Miller) – Reciprocal lattice vectors \((hk(i)l)\).

Return type:

ReciprocalLatticeVector

Examples

>>> from diffpy.structure import Atom, Lattice, Structure
>>> from orix.crystal_map import Phase
>>> from orix.vector import Miller
>>> from diffsims.crystallography import ReciprocalLatticeVector
>>> phase = Phase(
...     "al",
...     space_group=225,
...     structure=Structure(
...         lattice=Lattice(4.04, 4.04, 4.04, 90, 90, 90),
...         atoms=[Atom("Al", [0, 0, 1])],
...     ),
... )
>>> miller = Miller(hkl=[[1, 1, 1], [2, 0, 0]], phase=phase)
>>> miller
Miller (2,), point group m-3m, hkl
[[1. 1. 1.]
 [2. 0. 0.]]
>>> rlv = ReciprocalLatticeVector.from_miller(miller)
>>> rlv
ReciprocalLatticeVector (2,), al (m-3m)
[[1. 1. 1.]
 [2. 0. 0.]]
>>> rlv.to_miller()
Miller (2,), point group m-3m, hkl
[[1. 1. 1.]
 [2. 0. 0.]]