Miller#
- class orix.vector.Miller(xyz: np.ndarray | list | tuple | None = None, uvw: np.ndarray | list | tuple | None = None, UVTW: np.ndarray | list | tuple | None = None, hkl: np.ndarray | list | tuple | None = None, hkil: np.ndarray | list | tuple | None = None, phase: 'orix.crystal_map.Phase' | None = None)[source]#
Bases:
Vector3d
Direct crystal lattice vectors (uvw or UVTW) and reciprocal crystal lattice vectors (hkl or hkil), the latter known as Miller indices, describing directions with respect to the crystal reference frame defined by a phase’s crystal lattice and symmetry.
Exactly one of
xyz
,uvw
,UVTW
,hkl
, orhkil
must be passed.The vectors are stored internally as cartesian coordinates in
data
.- Parameters:
- xyz
Vector(s) given in cartesian coordinates. Default is
None
.- uvw
Indices of direct lattice vector(s). Default is
None
.- UVTW
Indices of direct lattice vector(s), often preferred over
uvw
in trigonal and hexagonal lattices. Default isNone
.- hkl
Indices of reciprocal lattice vector(s). Default is
None
.- hkil
Indices of reciprocal lattice vector(s), often preferred over
hkl
in trigonal and hexagonal lattices. Default isNone
.- phase
A phase with a crystal lattice and symmetry. Must be passed whenever direct or reciprocal lattice vectors are created.
Notes
The Miller-Bravais indices \(UVTW\) are defined as
\[\begin{split}U &= \frac{2u - v}{3}, \\ V &= \frac{2v - u}{3}, \\ T &= -\frac{u + v}{3}, \\ W &= w.\end{split}\]Attributes
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 [Weisstein, 2005].
Return or set the vector coordinate format.
Return the vector coordinates.
Return the data.
Return the first reciprocal lattice vector index.
Return or set the reciprocal lattice vectors expressed as 4-index Miller-Bravais indices.
Return or set the reciprocal lattice vectors.
Return the third reciprocal lattice vector index in 4-index Miller-Bravais indices, equal to \(-(h + k)\).
Return whether the crystal reference frame is hexagonal/trigonal.
Return the second reciprocal lattice vector index.
Return the third reciprocal lattice vector index, or fourth index in 4-index Miller Bravais indices.
Return the length of each vector given in lattice parameter units if the
coordinate_format
attribute equals"uvw"
or"UVTW"
, and inverse lattice parameter units if the attribute equals"hkl"
or"hkil"
.Return the 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 [Weisstein, 2005].
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 [Weisstein, 2005].
Return the shape of the object.
Return the total number of entries in this object.
Return whether the vector is in direct (
"d"
) or reciprocal ("r"
) space.Return the first direct lattice vector index.
Return unit vectors.
Return or set the direct lattice vectors.
Return the second direct lattice vector index.
Return the third direct lattice vector index.
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
Miller.angle_with
(other[, use_symmetry, degrees])Return the angles between these vectors and the other vectors possibly using symmetrically equivalent vectors to find the smallest angle under symmetry.
Miller.cross
(other)Return the cross products of the vectors with the other vectors, which is considered the zone axes between the vectors.
Return a deepcopy of the instance.
Miller.dot
(other)Return the dot products of the vectors and the other vectors.
Miller.dot_outer
(other)Return the outer dot products of the vectors and the other vectors.
Miller.draw_circle
([projection, figure, ...])Draw great or small circles with a given
opening_angle
to to the vectors in the stereographic projection.Return an empty object with the appropriate dimensions.
Return the flattened vectors.
Miller.from_highest_indices
(phase[, uvw, hkl])Create a set of unique direct or reciprocal lattice vectors from three highest indices and a phase (crystal lattice and symmetry).
Miller.from_min_dspacing
(phase[, min_dspacing])Create a set of unique reciprocal lattice vectors with a a direct space interplanar spacing greater than a lower threshold.
Miller.from_path_ends
(vectors[, close, steps])Return vectors along the shortest path on the sphere between two or more consectutive vectors.
Miller.from_polar
(azimuth, polar[, radial, ...])Initialize from spherical coordinates according to the ISO 31-11 standard [Weisstein, 2005].
Miller.get_circle
([opening_angle, steps])Get vectors delineating great or small circle(s) with a given
opening_angle
about each vector.Miller.get_nearest
(*args)NotImplemented.
Miller.get_random_sample
([size, replace, ...])Return a new flattened object from a random sample of a given size.
Miller.in_fundamental_sector
([symmetry])Project Miller indices to a symmetry's fundamental sector (inverse pole figure).
Plot the Inverse Pole Density Function (IPDF) within the fundamental sector of a given point group symmetry in the stereographic projection.
Miller.mean
([use_symmetry])Return the mean vector of the set of vectors.
Miller.pole_density_function
([resolution, ...])Plot the Pole Density Function (PDF) on a given hemisphere in the stereographic projection.
Miller.random
(phase[, shape, coordinate_format])Create random Miller indices.
Miller.reshape
(*shape)Return a new instance with the vectors reshaped.
Miller.rotate
([axis, angle])Convenience function for rotating this vector.
Miller.round
([max_index])Round a set of index triplet (Miller) or quartet (Miller-Bravais/Weber) to the closest smallest integers.
Miller.scatter
([projection, figure, ...])Plot vectors in the stereographic projection.
Return a new object with the same data with length 1-dimensions removed.
Miller.stack
(sequence)Return a stacked object from the sequence.
Miller.symmetrise
([unique, ...])Return vectors symmetrically equivalent to the vectors.
Miller.to_polar
([degrees])Return the azimuth \(\phi\), polar \(\theta\), and radial \(r\) spherical coordinates defined as in the ISO 31-11 standard [Weisstein, 2005].
Miller.transpose
(*axes)Return a new instance with the data transposed.
Miller.unique
([use_symmetry, return_index])Unique vectors in
self
.Return a unit vector in the x-direction.
Return a unit vector in the y-direction.
Miller.zero
([shape])Return zero vectors in the specified shape.
Return a unit vector in the z-direction.
Examples using Miller
#
Misorientation from aligning directions
Orientation from aligning directions
Rotating z-vector to high-symmetry crystal directions
Restrict to fundamental sector