neutronpy.crystal.Sample¶
-
class
neutronpy.crystal.Sample(a, b, c, alpha, beta, gamma, u=None, v=None, mosaic=None, vmosaic=None, direct=1, width=None, height=None, depth=None, shape='rectangular', distance=None)[source]¶ Private class containing sample information.
Parameters: - a : float
Unit cell length in angstroms
- b : float
Unit cell length in angstroms
- c : float
Unit cell length in angstroms
- alpha : float
Angle between b and c in degrees
- beta : float
Angle between a and c in degrees
- gamma : float
Angle between a and b in degrees
- u : array_like
First orientation vector
- v : array_like
Second orientation vector
- mosaic : float, optional
Horizontal sample mosaic (FWHM) in arc minutes
- vmosaic : float, optional
Vertical sample mosaic (FWHM) in arc minutes
- direct : ±1, optional
Direction of the crystal (left or right, -1 or +1, respectively)
- width : float, optional
Sample width in cm. Default: 1
- height : float, optional
Sample height in cm. Default: 1
- depth : float, optional
Sample thickness in cm. Default: 1
- shape : str, optional
Sample shape type. Accepts ‘rectangular’ or ‘cylindrical’. Default: ‘rectangular’
- distance : float, optional
Distance from source (used for Time of Flight resolution calculations). Default: None
Attributes: aFirst lattice constant in Angstrom
bSecond lattice constant in Angstrom
cThird lattice constant in Angstrom
alphaFirst lattice angle in degrees
betaSecond lattice angle in degrees
gammaThird lattice angle in degrees
uFirst orientation vector
vSecond orientation vector
- mosaic
- vmosaic
- direct
- width
- height
- depth
- shape
astarFirst inverse lattice constant in inverse Angstrom
bstarSecond inverse lattice constant in inverse Angstrom
cstarThird inverse lattice constant in inverse Angstrom
alpha_radFirst lattice angle in radians
beta_radSecond lattice angle in radians
gamma_radThird lattice angle in radians
alphastarFirst inverse lattice angle in degrees
betastarFirst inverse lattice angle in degrees
gammastarFirst inverse lattice angle in degrees
alphastar_radFirst inverse lattice angle in radians
betastar_radSecond inverse lattice angle in radians
gammastar_radThird inverse lattice angle in radians
abg_radLattice angles in radians returned in list
reciprocal_abcReciprocal lattice constants in inverse Angstrom returned in list
reciprocal_abgReciprocal lattice angles in degrees returned in list
reciprocal_abg_radReciprocal lattice angles in radians returned in list
lattice_typeType of lattice determined by the provided lattice constants and angles
volumeVolume of the unit cell in Å3
reciprocal_volumeVolume of the reciprocal unit cell in (Å-1)3
GMetric tensor of the real space lattice
GstarMetric tensor of the reciprocal lattice
BmatrixCartesian basis matrix in reciprocal units such that
UmatrixRotation matrix that rotates the sample’s reference frame into the spectrometer’s
UBmatrixOrientation matrix of the sample
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). get_phi(Q)Get out-of-plane scattering angle.