prsctrl.measurement.settings.ModeSettings#

class ModeSettings(pre_amplifier: prsctrl.measurement.settings.AmplifierSettings | None = None, lock_in: prsctrl.measurement.settings.LockInSettings = <factory>)[source]#

Bases: SettingsClass

Methods

as_dict

Convenience wrapper for dataclasses.asdict(self)

from_dict

Recursively construct a SettingsClass from a dictionary.

load_yaml

save_yaml

Attributes

__annotations__ = {'lock_in': <class 'prsctrl.measurement.settings.LockInSettings'>, 'pre_amplifier': typing.Optional[prsctrl.measurement.settings.AmplifierSettings]}#
__dataclass_fields__ = {'lock_in': Field(name='lock_in',type=<class 'prsctrl.measurement.settings.LockInSettings'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<class 'prsctrl.measurement.settings.LockInSettings'>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'pre_amplifier': Field(name='pre_amplifier',type=typing.Optional[prsctrl.measurement.settings.AmplifierSettings],default=None,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD)}#
__dataclass_params__ = _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False,match_args=True,kw_only=False,slots=False,weakref_slot=False)#
__dict__ = mappingproxy({'__module__': 'prsctrl.measurement.settings', '__firstlineno__': 181, '__annotations__': {'pre_amplifier': typing.Optional[prsctrl.measurement.settings.AmplifierSettings], 'lock_in': <class 'prsctrl.measurement.settings.LockInSettings'>}, 'pre_amplifier': None, '__static_attributes__': (), '__doc__': 'ModeSettings(pre_amplifier: Optional[prsctrl.measurement.settings.AmplifierSettings] = None, lock_in: prsctrl.measurement.settings.LockInSettings = <factory>)', '__dataclass_params__': _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False,match_args=True,kw_only=False,slots=False,weakref_slot=False), '__dataclass_fields__': {'pre_amplifier': Field(name='pre_amplifier',type=typing.Optional[prsctrl.measurement.settings.AmplifierSettings],default=None,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'lock_in': Field(name='lock_in',type=<class 'prsctrl.measurement.settings.LockInSettings'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<class 'prsctrl.measurement.settings.LockInSettings'>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD)}, '__replace__': <function _replace>, '__hash__': None, '__init__': <function ModeSettings.__init__>, '__repr__': <function ModeSettings.__repr__>, '__eq__': <function ModeSettings.__eq__>, '__match_args__': ('pre_amplifier', 'lock_in')})#
__eq__(other)#

Return self==value.

__firstlineno__ = 181#
__hash__ = None#
__init__(pre_amplifier: AmplifierSettings | None = None, lock_in: LockInSettings = <factory>) None#
__match_args__ = ('pre_amplifier', 'lock_in')#
__module__ = 'prsctrl.measurement.settings'#
__or__(other)#

Merge with another settings class or a dictionary.

__replace__(**changes)#
__repr__()#

Return repr(self).

__static_attributes__ = ()#
__weakref__#

list of weak references to the object

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

classmethod load_yaml(yaml_path: str, loader=<class 'yaml.loader.Loader'>)#
lock_in: LockInSettings#
pre_amplifier: AmplifierSettings | None = None#
save_yaml(yaml_path: str)#