neutronpy.crystal.lattice.Lattice

class neutronpy.crystal.lattice.Lattice(a, b, c, alpha, beta, gamma)[source]

Class to describe a generic lattice system defined by lattice six parameters, (three constants and three angles).

Parameters:
a : float

Lattice constant a in Å

b : float

Lattice constant b in Å

c : float

Lattice constant c in Å

alpha : float

Lattice angle 𝛼 in degrees

beta : float

Lattice angle 𝛽 in degrees

gamma : float

Lattice angle 𝛾 in degrees

Returns:
lattice : object

Object containing lattice information

Attributes:
a

First lattice constant in Angstrom

b

Second lattice constant in Angstrom

c

Third lattice constant in Angstrom

astar

First inverse lattice constant in inverse Angstrom

bstar

Second inverse lattice constant in inverse Angstrom

cstar

Third inverse lattice constant in inverse Angstrom

alpha

First lattice angle in degrees

beta

Second lattice angle in degrees

gamma

Third lattice angle in degrees

alpha_rad

First lattice angle in radians

beta_rad

Second lattice angle in radians

gamma_rad

Third lattice angle in radians

alphastar

First inverse lattice angle in degrees

betastar

First inverse lattice angle in degrees

gammastar

First inverse lattice angle in degrees

alphastar_rad

First inverse lattice angle in radians

betastar_rad

Second inverse lattice angle in radians

gammastar_rad

Third inverse lattice angle in radians

abg_rad

Lattice angles in radians returned in list

reciprocal_abc

Reciprocal lattice constants in inverse Angstrom returned in list

reciprocal_abg

Reciprocal lattice angles in degrees returned in list

reciprocal_abg_rad

Reciprocal lattice angles in radians returned in list

lattice_type

Type of lattice determined by the provided lattice constants and angles

volume

Volume of the unit cell in Å3

reciprocal_volume

Volume of the reciprocal unit cell in (Å-1)3

G

Metric tensor of the real space lattice

Gstar

Metric tensor of the reciprocal lattice

Bmatrix

Cartesian basis matrix in reciprocal units such that

Methods

get_d_spacing(hkl) Returns the d-spacing of a given reciprocal lattice vector.
get_q(hkl) Returns the magnitude of Q for a given reciprocal lattice vector in Å-1.
get_two_theta(hkl, wavelength) Returns the detector angle 2𝜃 for a given reciprocal lattice vector and incident wavelength.
get_angle_between_planes(v1, v2) Returns the angle \(\phi\) between two reciprocal lattice vectors (or planes as defined by the vectors normal to the plane).