ReciprocalLatticeVector#
- class diffsims.crystallography.ReciprocalLatticeVector(phase, xyz=None, hkl=None, hkil=None)[source]#
Bases:
Vector3dReciprocal 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.Vector3dto 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,ortuple,optional Cartesian coordinates of indices of reciprocal lattice vector(s)
hkl. Default isNone. This,hkl, orhkilis required.- hkl
numpy.ndarray,list,ortuple,optional Indices of reciprocal lattice vector(s). Default is
None. This,xyz, orhkilis required.- hkil
numpy.ndarray,list,ortuple,optional Indices of reciprocal lattice vector(s), often preferred over
hklin trigonal and hexagonal lattices. Default isNone. This,xyz, orhklis required.
- phase
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.
Azimuth spherical coordinate, i.e. the angle \(\phi \in [0, 2\pi]\) from the positive z-axis to a point on the sphere, according to the ISO 31-11 standard :cite:`weisstein2005spherical`.
Vector coordinate format, either
"hkl"or"hkil".Miller or Miller-Bravais indices.
Return the data.
ReciprocalLatticeVector.dimReturn the number of dimensions for this object.
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.
Return the number of navigation dimensions of the object.
Return the norm of the data.
Return the perpendicular vectors.
Polar spherical coordinate, i.e. the angle \(\theta \in [0, \pi]\) from the positive z-axis to a point on the sphere, according to the ISO 31-11 standard :cite:`weisstein2005spherical`.
Return the radial spherical coordinate, i.e. the distance from a point on the sphere to the origin, according to the ISO 31-11 standard :cite:`weisstein2005spherical`.
Scattering parameter \(0.5 \cdot g\).
Return the shape of the object.
Return the total number of entries in this object.
Kinematical structure factors \(F\).
Twice the Bragg angle.
Unit reciprocal lattice vectors.
Return or set the x coordinates.
Return the coordinates as three arrays, useful for plotting.
Return or set the y coordinates.
Return or set the z coordinate.
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_factorwith the complex kinematical structure factor \(F_{hkl}\) for each vector.Populate
thetawith 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.
Draw great or small circles with a given
opening_angleto to the vectors in the stereographic projection.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
Millerinstance.Create a set of unique reciprocal lattice vectors with a a direct space interplanar spacing greater than a lower threshold.
Return vectors along the shortest path on the sphere between two or more consectutive vectors.
ReciprocalLatticeVector.from_polar(azimuth, ...)Initialize from spherical coordinates according to the ISO 31-11 standard :cite:`weisstein2005spherical`.
Get vectors delineating great or small circle(s) with a given
opening_angleabout each vector.Get unique sets of \({hkl}\) for the vectors and the indices of vectors in each set.
ReciprocalLatticeVector.get_nearest(*args, ...)Return the vector in
xwith the smallest angle to this vector.Return a new flattened object from a random sample of a given size.
Project vectors to a symmetry's fundamental sector (inverse pole figure).
ReciprocalLatticeVector.inverse_pole_density_function([...])Plot the Inverse Pole Density Function (IPDF) within the fundamental sector of a given point group symmetry in the stereographic projection.
Return the mean vector.
Plot the Pole Density Function (PDF) on a given hemisphere in the stereographic projection.
Table with indices, structure factor values and multiplicity of each set of \({hkl}\).
ReciprocalLatticeVector.random([shape])Return uniformly distributed random data.
ReciprocalLatticeVector.reshape(*shape)A new instance with these reciprocal lattice vectors reshaped.
ReciprocalLatticeVector.rotate(*args, **kwargs)Convenience function for rotating this vector.
Sanitise the
phaseinplace for calculation of structure factors.Plot vectors in the stereographic projection.
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
Millerinstance.ReciprocalLatticeVector.to_polar([degrees])Return the azimuth \(\phi\), polar \(\theta\), and radial \(r\) spherical coordinates defined as in the ISO 31-11 standard :cite:`weisstein2005spherical`.
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.