HKL Utils¶
Auxilary HKL functions.
|
Change selected sample in hklpy. |
List all samples currently defined in hklpy; specify current one. |
|
|
Lists all reflections in defined in hklpy. |
|
Swaps the two orientation reflections in hklpy. |
|
Sets the primary orientation in hklpy. |
|
Sets the primary secondary in hklpy. |
Change the primary secondary orienting reflections to existing reflecitons in reflection list in hklpy. |
|
|
Prints the two reflections used in the UB matrix. |
|
Sets the primary orientation in hklpy using the current motor positions. |
|
Sets the secondary orientation in hklpy using the current motor positions. |
Calculates the UB matrix. |
|
|
Compute the UB matrix with two reflections. |
|
Set the mode of the currently selected diffractometer. |
|
Calculate the motors position of a reflection. |
|
Move the motors to a reciprocal space point. |
|
Moves the delta and theta motors. |
|
Retrieve information on the current reciprocal space position. |
|
Set the lattice constants. |
- polartools.hkl_utils.br(h, k, l)[source]¶
Move the motors to a reciprocal space point.
- Parameters:
- h, k, lfloat
H, K, and L values.
- Returns:
- Generator for the bluesky Run Engine.
- polartools.hkl_utils.ca(h, k, l)[source]¶
Calculate the motors position of a reflection.
- Parameters:
- h, k, lfloat
H, K, and L values.
- polartools.hkl_utils.calc_UB(r1, r2, wavelength=None, output=False)[source]¶
Compute the UB matrix with two reflections.
- Parameters:
- r1, r2hklpy reflections
Orienting reflections from hklpy.
- wavelengthfloat, optional
This is not used…
- outputboolean
Toggle to decide whether to print the UB matrix.
- polartools.hkl_utils.compute_UB()[source]¶
Calculates the UB matrix.
This fixes one issue with the hklpy calc_UB in that using wh() right after will not work, it needs to run one calculation first.
- Parameters:
- h, k, lfloat, optional
Values of H, K, L positions for current reflection. If None, it will ask for it.
- polartools.hkl_utils.list_orienting(all_samples=False)[source]¶
Prints the two reflections used in the UB matrix.
WARNING: This function will only work with six circles. This will be fixed in future releases.
- Parameters:
- all_samplesboolean, optional
If True, it will print the reflections of all samples, if False, only of the current one.
- polartools.hkl_utils.list_reflections(all_samples=False)[source]¶
Lists all reflections in defined in hklpy.
WARNING: This function will only work with six circles. This will be fixed in future releases.
- Parameters:
- all_samplesboolean, optional
If True, it will list the reflections for all samples, if False, only the current sample. Defaults to False.
- polartools.hkl_utils.or0(h=None, k=None, l=None)[source]¶
Sets the primary orientation in hklpy using the current motor positions.
WARNING: This function will only work with six circles. This will be fixed in future releases.
- Parameters:
- h, k, lfloat, optional
Values of H, K, L positions for current reflection. If None, it will ask for it.
- polartools.hkl_utils.or1(h=None, k=None, l=None)[source]¶
Sets the secondary orientation in hklpy using the current motor positions.
WARNING: This function will only work with six circles. This will be fixed in future releases.
- Parameters:
- h, k, lfloat, optional
Values of H, K, L positions for current reflection. If None, it will ask for it.
- polartools.hkl_utils.sampleChange(sample_key=None)[source]¶
Change selected sample in hklpy.
- Parameters:
- sample_keystring, optional
Name of the sample as set in hklpy. If None it will ask for which sample.
- polartools.hkl_utils.sampleList()[source]¶
List all samples currently defined in hklpy; specify current one.
- polartools.hkl_utils.set_orienting()[source]¶
Change the primary secondary orienting reflections to existing reflecitons in reflection list in hklpy.
WARNING: This function will only work with six circles. This will be fixed in future releases.
- polartools.hkl_utils.setlat(a=None, b=None, c=None, alpha=None, beta=None, gamma=None)[source]¶
Set the lattice constants.
- Parameters:
- a, b, c, alpha, beta, gammafloat, optional
Lattice constants. If None, it will ask for input.
- polartools.hkl_utils.setmode(mode=None)[source]¶
Set the mode of the currently selected diffractometer.
WARNING: This function will only work with six circles. This will be fixed in future releases.
- Parameters:
- modestring, optional
Mode to be selected. If None, it will ask.
- polartools.hkl_utils.setor0(*args)[source]¶
Sets the primary orientation in hklpy.
WARNING: This function will only work with six circles. This will be fixed in future releases.
- Parameters:
- delta, th, chi, phi, gamma, mufloat, optional
Values of motor positions for current reflection. If None, it will ask for it.
- h, k, lfloat, optional
Values of H, K, L positions for current reflection. If None, it will ask for it.
- polartools.hkl_utils.setor1(delta=None, th=None, chi=None, phi=None, gamma=None, mu=None, h=None, k=None, l=None)[source]¶
Sets the primary secondary in hklpy.
WARNING: This function will only work with six circles. This will be fixed in future releases.
- Parameters:
- delta, th, chi, phi, gamma, mufloat, optional
Values of motor positions for current reflection. If None, it will ask for it.
- h, k, lfloat, optional
Values of H, K, L positions for current reflection. If None, it will ask for it.
- polartools.hkl_utils.uan(delta=None, th=None)[source]¶
Moves the delta and theta motors.
WARNING: This function will only work with six circles. This will be fixed in future releases.
- Parameters:
- delta, th: float, optional??
Delta and th motor angles to be moved to.
- Returns:
- Generator for the bluesky Run Engine.