dodal.devices.i10.i10_apple2#

Classes

EnergySetter

Compound device to set both ID and PGM energy at the same time.

I10Apple2

I10Apple2 is the i10 version of Apple2 ID, set and update_lookuptable function should be the only part that is I10 specific.

I10Apple2Pol

Compound device to set polorisation of ID.

I10Id

I10Id is a compound device that combines the I10-specific Apple2 undulator, energy setter, and polarization control.

LinearArbitraryAngle

Device to set polorisation angle of the ID. Linear Arbitrary Angle (laa)

LookupPath

LookupPath(Gap: pathlib.Path, Phase: pathlib.Path)

LookupTableConfig

LookupTableConfig(path: dodal.devices.i10.i10_apple2.LookupPath, source: tuple[str, str], mode: str | None, min_energy: str | None, max_energy: str | None, poly_deg: list | None)

Functions

convert_csv_to_lookup(file, source[, mode, ...])

Convert a CSV file to a dictionary compatible with the Apple2 lookup table format.

dodal.devices.i10.i10_apple2.convert_csv_to_lookup(file: str, source: tuple[str, str], mode: str | None = 'Mode', min_energy: str | None = 'MinEnergy', max_energy: str | None = 'MaxEnergy', poly_deg: list | None = None) dict[str | None, dict[str, dict[str, dict[str, Any]]]][source]#

Convert a CSV file to a dictionary compatible with the Apple2 lookup table format.

Parameters:
  • file (str) – Path to the CSV file.

  • source (tuple[str, str]) – Tuple specifying the column name and source name (e.g., (“Source”, “idu”)).

  • mode (str, optional) – Column name for the available modes (e.g., “lv”, “lh”, “pc”, “nc”), by default “Mode”.

  • min_energy (str, optional) – Column name for the minimum energy, by default “MinEnergy”.

  • max_energy (str, optional) – Column name for the maximum energy, by default “MaxEnergy”.

  • poly_deg (list, optional) – Column names for polynomial coefficients, starting with the least significant term.

Returns:

A dictionary conforming to the Apple2 lookup table format.

Return type:

dict