de_twin.crystal.library.CrystalLibrary#
- class de_twin.crystal.library.CrystalLibrary(phase, *, max_g_inv_nm=25.0, debye_waller_a2=0.0, scattering_params='lobato', cache_dir=None)[source]#
Bases:
objectReciprocal lattice + kinematic
|F|^2of one phase, computed once.- Parameters:
- __init__(phase, *, max_g_inv_nm=25.0, debye_waller_a2=0.0, scattering_params='lobato', cache_dir=None)[source]#
Methods
__init__(phase, *[, max_g_inv_nm, ...])excite(matrices, wavelength_nm, ...[, ...])Excited reflections of each crystal->lab matrix (N, 3, 3) at thickness (N,) nm.
extinction_distance_nm(hkl, ht_kv, wavelength_nm)geometry(matrices, wavelength_nm[, ...])(owner, index, gx, gy, s) of the reflections near the Ewald sphere for each crystal->lab matrix (N, 3, 3) - the orientation-only part of
excite(), sorted by owner.intensity_at(idx, s, thickness_nm, ht_kv, ...)Kinematic fraction
(pi t / xi_g)^2 <sinc^2>of reflectionsidxat excitation errorssand thicknessesthickness_nm(all (K,)): the thickness-dependent part ofexcite(), element by element.inv_xi(ht_kv, wavelength_nm)pi / xi_g in 1/nm (xi_g: kinematic extinction distance).
rings(ht_kv, wavelength_nm)(ring radius g [1/nm], orientation-averaged intensity per nm of thickness) per family.
template_library([resolution_deg, ht_kv, ...])A diffsims
Simulation2Dover the reduced fundamental zone (orixget_sample_reduced_fundamental), i.e. an orientation-mapping template library in the twin's own convention (pyxemget_orientation).- geometry(matrices, wavelength_nm, convergence_mrad=0.0)[source]#
(owner, index, gx, gy, s) of the reflections near the Ewald sphere for each crystal->lab matrix (N, 3, 3) - the orientation-only part of
excite(), sorted by owner.
- intensity_at(idx, s, thickness_nm, ht_kv, wavelength_nm, convergence_mrad=0.0)[source]#
Kinematic fraction
(pi t / xi_g)^2 <sinc^2>of reflectionsidxat excitation errorssand thicknessesthickness_nm(all (K,)): the thickness-dependent part ofexcite(), element by element.
- excite(matrices, wavelength_nm, thickness_nm, ht_kv, convergence_mrad=0.0, min_intensity=0.0)[source]#
Excited reflections of each crystal->lab matrix (N, 3, 3) at thickness (N,) nm.
thickness_nmmay also be (N, T): every orientation at T thicknesses;intensityis then (K, T) andtotal(N, T) (min_intensitymust be 0).
- rings(ht_kv, wavelength_nm)[source]#
(ring radius g [1/nm], orientation-averaged intensity per nm of thickness) per family.
- template_library(resolution_deg=1.0, ht_kv=200.0, max_excitation_error=0.05, **generator_options)[source]#
A diffsims
Simulation2Dover the reduced fundamental zone (orixget_sample_reduced_fundamental), i.e. an orientation-mapping template library in the twin’s own convention (pyxemget_orientation).