prsctrl.measurement.settings.MonochromatorSettings#
- class MonochromatorSettings(resolution_nm: float = 1.0, resolution_eV: float = -1)[source]#
Bases:
SettingsClassMonochromator settings, to apply a bandwidth/resolution
Methods
applyConvenience wrapper for dataclasses.asdict(self)
Recursively construct a SettingsClass from a dictionary.
load_yamlsave_yamlAttributes
Resolution in eV.
Resolution in nm.
- as_dict() dict#
Convenience wrapper for dataclasses.asdict(self)
- classmethod from_dict(data: dict)#
Recursively construct a SettingsClass from a dictionary. If the value of a field is another SettingsClass, from_dict will be called for that field as well. Handled are: - SettingsClass - list[SettingsClass] - dict[<any>, SettingsClass] - all of the above as Optional
- Raises:
ValueError – If data contains a value that has the wrong type for the field of cls (ONLY if the type is a subclass of SettingsClass! Other types are not enforced)
KeyError – If data contains a key that is not a field name of cls
- resolution_eV: float = -1#
Resolution in eV. Will be applied if > 0.
- resolution_nm: float = 1.0#
Resolution in nm. Will be applied if resolution_eV < 0.