dodal.devices.util.lookup_tables_apple2.EnergyMotorLookup#

class dodal.devices.util.lookup_tables_apple2.EnergyMotorLookup[source]#

Handles lookup tables for Apple2 ID, converting energy and polarisation to gap and phase. Fetches and parses lookup tables from a config server, supports dynamic updates, and validates input. If custom logic is required for lookup tables, sub classes should override the _update_gap_lut and _update_phase_lut methods.

After update_lookuptable() has populated the ‘gap’ and ‘phase’ tables, get_motor_from_energy() can be used to compute (gap, phase) for a requested (energy, pol) pair.

Parameters:

Initialise the EnergyMotorLookup class with lookup table headers provided.

Parameters:#

config_client:

The config server client to fetch the look up table data.

lut_config:

Configuration that defines how to process file contents into a LookupTable

gap_path:

File path to the gap lookup table.

phase_path:

File path to the phase lookup table.

param config_client:

type config_client:

ConfigServer

param lut_config:

type lut_config:

LookupTableConfig

param gap_path:

type gap_path:

Path | None, default: None

param phase_path:

type phase_path:

Path | None, default: None

Methods

get_motor_from_energy(energy, pol)

Convert energy and polarisation to gap and phase motor positions.

update_lookuptables()

Update lookup tables from files and validate their format.

Attributes

available_pol

update_lookuptables()[source]#

Update lookup tables from files and validate their format.

get_motor_from_energy(energy: float, pol: Pol) tuple[float, float][source]#

Convert energy and polarisation to gap and phase motor positions.

Return type:

tuple[float, float]

Parameters:#

energyfloat

Desired energy in eV.

polPol

Polarisation mode.

Returns:#

: tuple[float, float]

(gap, phase) motor positions.

param energy:

type energy:

float

param pol:

type pol:

Pol