dodal.devices.insertion_device.EnergyMotorLookup#

class dodal.devices.insertion_device.EnergyMotorLookup[source]#

Handles a lookup table for Apple2 ID, converting energy/polarisation to a motor position.

After update_lookup_table() has populated the lookup table, find_value_in_lookup_table() can be used to compute gap / phase for a requested energy / polarisation pair.

Parameters:

lut (LookupTable | None, default: None)

Methods

find_value_in_lookup_table(energy, pol)

Convert energy and polarisation to a value from the lookup table.

update_lookup_table()

Do nothing by default.

update_lookup_table() None[source]#

Do nothing by default. Sub classes may override this method to provide logic on what updating lookup table does.

Return type:

None

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

Convert energy and polarisation to a value from the lookup table.

Parameters:
  • energy (float) – Desired energy.

  • pol (Pol) – Polarisation mode.

Returns:

gap / phase motor position from the lookup table.

Return type:

float