dodal.devices.i09_1_shared#

Functions

calculate_gap_i09_hu(photon_energy_kev, ...)

Calculate the undulator gap required to produce a given energy at a given harmonic order.

get_hu_lut_as_dict(lut_path)

dodal.devices.i09_1_shared.calculate_gap_i09_hu(photon_energy_kev: float, look_up_table: dict[int, ndarray], order: int = 1, gap_offset: float = 0.0, undulator_period_mm: int = 27) float[source]#

Calculate the undulator gap required to produce a given energy at a given harmonic order. This algorithm was provided by the I09 beamline scientists, and is based on the physics of undulator radiation. https://cxro.lbl.gov//PDF/X-Ray-Data-Booklet.pdf

Parameters:
  • photon_energy_kev (float) – Requested photon energy in keV.

  • look_up_table (dict[int, np.ndarray]) – Lookup table containing undulator and beamline parameters for each harmonic order.

  • order (int, optional) – Harmonic order for which to calculate the gap. Defaults to 1.

  • gap_offset (float, optional) – Additional gap offset to apply (in mm). Defaults to 0.0.

  • undulator_period_mm (int, optional) – Undulator period in mm. Defaults to 27.

Returns:

Calculated undulator gap in millimeters.

Return type:

float

async dodal.devices.i09_1_shared.get_hu_lut_as_dict(lut_path: str) dict[source]#
Parameters:

lut_path (str)

Return type:

dict