mpylab.device.fieldprobe module¶
Base driver for field probe instruments.
- class mpylab.device.fieldprobe.FIELDPROBE(SearchPaths=None)
Bases:
DRIVERBase class for field-probe drivers.
The parent class is
mpylab.device.driver.DRIVER.- Parameters:
SearchPaths (sequence of path-like, optional) – Directories searched for device INI files and referenced data files.
- GetBatteryState()
Read the probe battery state.
- Returns:
(status, battery_state)with a driver-defined numeric relative value, orNonewhen unavailable.- Return type:
tuple
- GetData()
Read one field-probe data record.
- Returns:
(status, data). The concrete driver defines the data record, typically a sequence of threescuq.Quantitycomponents.- Return type:
tuple
- GetDataNB(retrigger=False)
Read data through the non-blocking-compatible probe interface.
The base implementation is a blocking fallback which calls
GetData(). Drivers with asynchronous hardware may override it while preserving the same return structure and retrigger semantics.- Parameters:
retrigger (bool or str, optional) – Request a new trigger after reading when true or equal to
"on".- Returns:
(status, data). A concrete driver may indicate that data is not yet available through its status value.- Return type:
tuple
- GetFreq()
Read the measurement frequency.
- Returns:
(status, frequency)with the value in hertz.- Return type:
tuple
- GetWaveform()
Return the base-class marker for unsupported waveform acquisition.
- Returns:
(-1, None, None, None, None). Drivers supporting waveforms may override this method with their documented data contract.- Return type:
tuple
- SetFreq(freq)
Set and read back the measurement frequency.
- Parameters:
freq (float) – Requested frequency in hertz.
- Returns:
(status, frequency)with the confirmed value in hertz.- Return type:
tuple
- Trigger()
Trigger one measurement cycle.
- Returns:
(status, 0).- Return type:
tuple of int
- Zero(state='on')
Enable or disable probe zeroing.
- Parameters:
state (str or bool-like, optional) –
"on"enables zeroing; every other value disables it.- Returns:
(status, state)with canonical"on"or"off".- Return type:
tuple
- conftmpl = {'channel_%d': {'name': <class 'str'>, 'unit': <class 'str'>}, 'description': {'description': <class 'str'>, 'deviceid': <class 'str'>, 'driver': <class 'str'>, 'nr_of_channels': <class 'int'>, 'serialnr': <class 'str'>, 'type': <class 'str'>, 'vendor': <class 'str'>}, 'init_value': {'fstart': <class 'float'>, 'fstep': <class 'float'>, 'fstop': <class 'float'>, 'gpib': <class 'int'>, 'virtual': <function strbool>, 'visa': <class 'str'>}}