dodal.devices.insertion_device.lookup_table_models.EnergyCoverage#
- class dodal.devices.insertion_device.lookup_table_models.EnergyCoverage[source]#
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.- Parameters:
data (
Any)
Methods
generate(min_energies, max_energies, ...)get_energy_index(energy)Binary search assumes self.energy_entries is sorted by min_energy.
get_poly(energy)Return the numpy.poly1d polynomial applicable for the given energy.
Attributes
max_energymin_energymodel_configConfiguration for the model, should be a dictionary conforming to [
ConfigDict][pydantic.config.ConfigDict].energy_entries