laue_dials.diagnostics namespace
Submodules
laue_dials.diagnostics.compare_A_matrices module
laue_dials.diagnostics.diffgeolib module
- class laue_dials.diagnostics.diffgeolib.Detector(ax1, ax2, ori)[source]
Bases:
object
- class laue_dials.diagnostics.diffgeolib.LaueAssigner(s0, s1, cell, R, lam_min, lam_max, dmin, spacegroup='1')[source]
Bases:
object
An object to assign miller indices to a laue still.
- property H
- property RB
- assign()[source]
Assign miller indices to the inlier reflections
- This method will update:
self.H – miller indices self.wav – wavelengths self.qpred – predicted scattering vector
- property harmonics
- property qobs
- property qpred
- property s1
- property wav
- class laue_dials.diagnostics.diffgeolib.LauePredictor(s0, cell, R, lam_min, lam_max, dmin, spacegroup='1')[source]
Bases:
object
An object to predict spots given a Laue experiment.
- property RB
- predict_s1(delete_harmonics=False)[source]
Predicts all s1 vectors for all feasible spots given some resolution-dependent bandwidth
- This method provides:
s1_pred – predicted feasible s1 vectors lams – the wavelengths (in Angstroms) associated with these s1 vectors qall – the q vectors associated with these s1 vectors
- laue_dials.diagnostics.diffgeolib.align_hkls(reference, target, spacegroup, anomalous=True)[source]
Use the point group operators in spacegroup to align target hkls to reference.
- Parameters:
reference (array) – n x 3 array of miller indices
target (array) – n x 3 array of miller indices
spacegroup (gemmi.Spacegroup) – The space group of reference/target.
anomalous (bool(optional)) – If true, test Friedel symmetries too.
- Returns:
aligned – n x 3 array of miller indices equivalent to target
- Return type:
array
- laue_dials.diagnostics.diffgeolib.hkl2ray(hkl, wavelength=None)[source]
Convert a miller index to the shortest member of its central ray. Optionally, adjust its wavelength accordingly.
- Parameters:
hkl (array) – n x 3 array of miller indices. the dtype must be interpretable as an integeger
wavelength (array (optional)) – length n array of wavelengths corresponding to each miller index
- Returns:
reduced_hkl (array) – The miller index of the shortest vector on the same central ray as hkl
reduced_wavelength (array (optional)) – The wavelengths corresponding to reduced_hkl
- laue_dials.diagnostics.diffgeolib.indexing_rotation_tril(A)[source]
Convert the reciprocal space indexing matrix, A into the product of an orthogonal matrix U and a lower triangular matrix B
- Parameters:
A (np.array) – A 3x3 indexing matrix such that the scattering vector S1-S0=Q=A@h
- Returns:
U (np.array) – An orthogonal 3x3 matrix
B (np.array) – A 3x3 lower triangular matrix
- laue_dials.diagnostics.diffgeolib.is_ray_equivalent(hkl1, hkl2)[source]
Test for equivalency between two miller indices in a Laue experiment. Returns a boolean array for each of the n hkls in hkl{1,2}.
- laue_dials.diagnostics.diffgeolib.mat_to_rot_xyz(R, deg=True)[source]
Decompose a rotation matrix into euler angles
- laue_dials.diagnostics.diffgeolib.normalize(A)[source]
Normalize the last dimension of an array by dividing by its L2 norm