prsctrl.measurement.measurement.LockInHandler#

class LockInHandler(mode: str, lockin: LockInAmp, lockin_settings: LockInSettings)[source]#

Bases: object

Wrapper class for a lock-in amplifier, that abstracts some model-specific things like setting up a buffer, where the number of quantities, max. number of values and the available sample rates depend on the model.

Methods

set_measurement_time

Convert the target sample rate to one that is compatible with the device.

__annotations__ = {}#
__dict__ = mappingproxy({'__module__': 'prsctrl.measurement.measurement', '__firstlineno__': 31, '__doc__': '\nWrapper class for a lock-in amplifier, that abstracts some model-specific things like setting up a buffer,\nwhere the number of quantities, max. number of values and the available sample rates depend on the model.\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__ = 31#
__getattr__(name)[source]#

This 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