prsctrl.measurement.measurement.LockInHandler#
- class LockInHandler(mode: str, lockin: LockInAmp, lockin_settings: LockInSettings)[source]#
Bases:
objectWrapper class for a lock-in amplifier, that abstracts the model-specific task of setting up a buffer.
Setting up a buffer, involves quantities (max. number of values and the available sample rates) that depend on the model.
:method:`__getattr__` is implemented to make all of the lock-in’s attributes available to the handler as well.
Methods
Convert the target sample rate to one that is compatible with the device.
- __annotations__ = {}#
- __dict__ = mappingproxy({'__module__': 'prsctrl.measurement.measurement', '__firstlineno__': 33, '__doc__': "Wrapper class for a lock-in amplifier, that abstracts the model-specific task of setting up a buffer.\n\nSetting up a buffer, involves quantities (max. number of values and the available sample rates) that depend on the model.\n\n:method:`__getattr__` is implemented to make all of the lock-in's attributes available to the handler as well.\n", '__init__': <function LockInHandler.__init__>, 'set_measurement_time': <function LockInHandler.set_measurement_time>, '__getattr__': <function LockInHandler.__getattr__>, '__static_attributes__': ('Model7260', 'SR830', 'lockin', 'lockin_settings', 'mode', 'n_bins', 'n_try', 'sample_rate_Hz'), '__dict__': <attribute '__dict__' of 'LockInHandler' objects>, '__weakref__': <attribute '__weakref__' of 'LockInHandler' objects>, '__annotations__': {'mode': 'str', 'lockin': 'LockInAmp', 'lockin_settings': 'LockInSettings'}})#
- __firstlineno__ = 33#
- __getattr__(name)[source]#
Allows any LockInAmp method to be called on an LockInHandler object.
A wrapper is added, so that if an IO error occurs during that method, a recovery attempt is performed.
- __init__(mode: str, lockin: LockInAmp, lockin_settings: LockInSettings)[source]#
- __module__ = 'prsctrl.measurement.measurement'#
- __static_attributes__ = ('Model7260', 'SR830', 'lockin', 'lockin_settings', 'mode', 'n_bins', 'n_try', 'sample_rate_Hz')#
- __weakref__#
list of weak references to the object
- set_measurement_time(measurement_time_s, target_sample_rate_Hz=None)[source]#
Convert the target sample rate to one that is compatible with the device.
Also calculates the number of values to be recorded for a given measurement time :param target_sample_rate_Hz: targeted sample rate, or ‘max’ to use the maximum for the given measurement time