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, or hkil 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 is None.

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 is None.

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

Miller.azimuth

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].

Miller.coordinate_format

Return or set the vector coordinate format.

Miller.coordinates

Return the vector coordinates.

Miller.data

Return the data.

Miller.h

Return the first reciprocal lattice vector index.

Miller.hkil

Return or set the reciprocal lattice vectors expressed as 4-index Miller-Bravais indices.

Miller.hkl

Return or set the reciprocal lattice vectors.

Miller.i

Return the third reciprocal lattice vector index in 4-index Miller-Bravais indices, equal to \(-(h + k)\).

Miller.is_hexagonal

Return whether the crystal reference frame is hexagonal/trigonal.

Miller.k

Return the second reciprocal lattice vector index.

Miller.l

Return the third reciprocal lattice vector index, or fourth index in 4-index Miller Bravais indices.

Miller.length

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".

Miller.multiplicity

Return the number of symmetrically equivalent directions per vector.

Miller.ndim

Return the number of navigation dimensions of the object.

Miller.norm

Return the norm of the data.

Miller.perpendicular

Return the perpendicular vectors.

Miller.polar

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].

Miller.radial

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].

Miller.shape

Return the shape of the object.

Miller.size

Return the total number of entries in this object.

Miller.space

Return whether the vector is in direct ("d") or reciprocal ("r") space.

Miller.u

Return the first direct lattice vector index.

Miller.unit

Return unit vectors.

Miller.uvw

Return or set the direct lattice vectors.

Miller.v

Return the second direct lattice vector index.

Miller.w

Return the third direct lattice vector index.

Miller.x

Return or set the x coordinates.

Miller.xyz

Return the coordinates as three arrays, useful for plotting.

Miller.y

Return or set the y coordinates.

Miller.z

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.

Miller.deepcopy()

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.

Miller.empty()

Return an empty object with the appropriate dimensions.

Miller.flatten()

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).

Miller.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.

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.

Miller.squeeze()

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.

Miller.xvector()

Return a unit vector in the x-direction.

Miller.yvector()

Return a unit vector in the y-direction.

Miller.zero([shape])

Return zero vectors in the specified shape.

Miller.zvector()

Return a unit vector in the z-direction.

Examples using Miller#

Misorientation from aligning directions

Misorientation from aligning directions

Orientation from aligning directions

Orientation from aligning directions

Subplots

Subplots

Rotating z-vector to high-symmetry crystal directions

Rotating z-vector to high-symmetry crystal directions

Restrict to fundamental sector

Restrict to fundamental sector