ReciprocalLatticeVector#
- class diffsims.crystallography.ReciprocalLatticeVector(phase, xyz=None, hkl=None, hkil=None)[source]#
Bases:
Vector3d
Reciprocal lattice vectors \((hkl)\) for use in electron diffraction analysis and simulation.
All lengths are assumed to be given in Å or inverse Å.
This class extends
orix.vector.Vector3d
to reciprocal lattice vectors \((hkl)\) specifically for diffraction experiments and simulations. It is thus different fromorix.vector.Miller
, which is a general class for Miller indices both in reciprocal and direct space. It supports relevant methods also supported in Miller, like obtaining a set of vectors from a minimal interplanar spacing.Create a set of reciprocal lattice vectors from \((hkl)\) or \((hkil)\).
The vectors are stored internally as cartesian coordinates in
data
.- Parameters:
phase (orix.crystal_map.Phase) – A phase with a crystal lattice and symmetry.
xyz (numpy.ndarray, list, or tuple, optional) – Cartesian coordinates of indices of reciprocal lattice vector(s)
hkl
. Default isNone
. This,hkl
, orhkil
is required.hkl (numpy.ndarray, list, or tuple, optional) – Indices of reciprocal lattice vector(s). Default is
None
. This,xyz
, orhkil
is required.hkil (numpy.ndarray, list, or tuple, optional) – Indices of reciprocal lattice vector(s), often preferred over
hkl
in trigonal and hexagonal lattices. Default isNone
. This,xyz
, orhkl
is required.
Examples
>>> from diffpy.structure import Atom, Lattice, Structure >>> from orix.crystal_map import Phase >>> 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])], ... ), ... ) >>> rlv = ReciprocalLatticeVector(phase, hkl=[[1, 1, 1], [2, 0, 0]]) >>> rlv ReciprocalLatticeVector (2,), al (m-3m) [[1. 1. 1.] [2. 0. 0.]]
Attributes
Return whether vectors diffract according to diffraction selection rules assuming kinematic scattering theory.
Vector coordinate format, either
"hkl"
or"hkil"
.Miller or Miller-Bravais indices.
Direct lattice interplanar spacing \(d = 1 / g\).
Reciprocal lattice vector spacing \(g\).
First reciprocal lattice vector index.
Whether the crystal lattice is hexagonal/trigonal.
Miller-Bravais indices.
Miller indices.
Third reciprocal lattice vector index in 4-index Miller-Bravais indices, equal to \(-(h + k)\).
Second reciprocal lattice vector index.
Third reciprocal lattice vector index, or fourth index in 4-index Miller Bravais indices.
Number of symmetrically equivalent directions per vector.
Scattering parameter \(0.5 \cdot g\).
Kinematical structure factors \(F\).
Twice the Bragg angle.
Unit reciprocal lattice vectors.
Methods
ReciprocalLatticeVector.angle_with
(other[, ...])Calculate angles between reciprocal lattice vectors, possibly using symmetrically equivalent vectors to find the smallest angle under symmetry.
Populate
structure_factor
with the complex kinematical structure factor \(F_{hkl}\) for each vector.Populate
theta
with the Bragg angle \(theta_B\) in radians.Cross product between reciprocal lattice vectors producing zone axes \([uvw]\) or \([UVTW]\) in the direct lattice.
Get a deepcopy of the vectors.
ReciprocalLatticeVector.dot
(other)Dot product of the vectors with other reciprocal lattice vectors.
Outer dot product of the vectors with other reciprocal lattice vectors.
Return an empty object with the appropriate dimensions.
A new instance with these reciprocal lattice vectors in a single column.
Create a set of unique reciprocal lattice vectors from three highest indices.
Create a new instance from a
Miller
instance.Create a set of unique reciprocal lattice vectors with a a direct space interplanar spacing greater than a lower threshold.
ReciprocalLatticeVector.from_polar
(azimuth, ...)Initialize from spherical coordinates according to the ISO 31-11 standard :cite:`weisstein2005spherical`.
Get unique sets of \({hkl}\) for the vectors and the indices of vectors in each set.
ReciprocalLatticeVector.get_nearest
(*args, ...)Return the vector in
x
with the smallest angle to this vector.Return a random sample of a given size in a flattened instance.
Project vectors to a symmetry's fundamental sector (inverse pole figure).
Return the mean vector.
Table with indices, structure factor values and multiplicity of each set of \({hkl}\).
ReciprocalLatticeVector.reshape
(*shape)A new instance with these reciprocal lattice vectors reshaped.
ReciprocalLatticeVector.rotate
(*args, **kwargs)Convenience function for rotating this vector.
Sanitise the
phase
inplace for calculation of structure factors.A new instance with these reciprocal lattice vectors where singleton dimensions are removed.
ReciprocalLatticeVector.stack
(sequence)A new instance from a sequence of reciprocal lattice vectors.
Unique vectors symmetrically equivalent to the vectors.
Return the vectors as a
Miller
instance.A new instance with the navigation shape of these reciprocal lattice vectors transposed.
The unique vectors.
Return a unit vector in the x-direction.
Return a unit vector in the y-direction.
ReciprocalLatticeVector.zero
([shape])Return zero vectors in the specified shape.
Return a unit vector in the z-direction.