mpylab.device.prb_lumiloop_lsprobe_multichannel module

Channel-oriented SCPI driver for LUMILOOP LSProbe systems.

Each FIELDPROBE instance represents one physical probe and returns its calibrated x-, y- and z-axis field components. Communication and the settings shared by all probes on one TCP server are owned by a common controller.

class mpylab.device.prb_lumiloop_lsprobe_multichannel.FIELDPROBE(**kwargs)

Bases: SharedFacade, FIELDPROBE

Expose each physical LSProbe as one independently addressable channel.

acquisition=independent is the default. It selects the physical probe by its discovered serial number and measures only that probe. With acquisition=synchronized, one acquisition is shared by all probe facades in a read cycle.

measurement_duration selects time-domain averaging in seconds. A positive duration records a triggered waveform whose sample count is derived from the effective hardware sample rate. The type-A uncertainty of its mean is combined with the non-reducible probe specification. A value of zero retains the continuous single-value query.

Example configuration:

[Init_Value]
acquisition: synchronized
measurement_duration: 0.1
minimum_samples: 2
trigger_timeout: 30

Hardware probe count from :SYST:COU? is authoritative. An optional channels or nr_of_channels value is an expected count and causes a warning on mismatch. Virtual operation requires an explicit count.

Logical channels can be tied to physical probes independently of discovery order:

[Channel_1]
probe_serial_number: 101
probe_version: 2.0

If one channel specifies a serial number, every configured channel must do so. probe_version is required only when equal serial numbers must be disambiguated, but may always be supplied for stricter identity checking.

Raw waveforms remain an internal acquisition detail; GetData() consistently returns the averaged calibrated three-axis field vector.

Parameters:

kwargs (mapping) – Keyword arguments forwarded to the field-probe base class.

GetBatteryState()

Return the externally powered probe status placeholder.

Returns:

Status code and placeholder state 1.0.

Return type:

tuple of (int, float)

GetData()

Return calibrated x-, y-, and z-axis values for this probe.

A positive measurement_duration averages waveform samples and combines their type-A uncertainty with the probe specification.

Returns:

Status code and three electric-field components in V/m.

Return type:

tuple of (int, list of scuq.quantities.Quantity)

Raises:
  • RuntimeError – If no correction frequency has been set or acquisition data are inconsistent.

  • ValueError – If the probe returns a non-finite value.

GetWaveform()

Report that raw waveform access is not part of this facade API.

Returns:

(-1, None, None, None, None). Waveforms remain an internal implementation detail used for duration-based averaging.

Return type:

tuple

Init(ini=None, channel=None, ignore_bus=None)

Initialize one probe facade and its shared physical controller.

Parameters:
  • ini (path-like or file-like, optional) – INI configuration source shared by all probe facades.

  • channel (int, optional) – One-based logical probe channel.

Returns:

Zero on success.

Return type:

int

Raises:

ValueError – If channel identities or shared settings are inconsistent.

SetFreq(freq)

Set a validated correction frequency for the shared controller.

Parameters:

freq (float) – Frequency in hertz.

Returns:

Status code and applied frequency in hertz.

Return type:

tuple of (int, float)

Trigger()

Start a new logical acquisition generation.

Returns:

(status, 0).

Return type:

tuple of int

Zero(state='on')

Acknowledge zeroing without changing continuous acquisition.

Parameters:

state (object, optional) – Requested state, accepted for field-probe API compatibility.

Returns:

Status code and canonical "on" or "off" state. Zeroing is acknowledged but remains a no-op for continuous LSProbe data.

Return type:

tuple of (int, str)

conftmpl = {'channel_%d': {'name': <class 'str'>, 'probe_serial_number': <class 'int'>, 'probe_version': <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': {'acquisition': <class 'str'>, 'channels': <class 'int'>, 'fstart': <class 'float'>, 'fstep': <class 'float'>, 'fstop': <class 'float'>, 'gpib': <class 'int'>, 'measurement_duration': <class 'float'>, 'mfreq': <class 'float'>, 'minimum_samples': <class 'int'>, 'mode': <class 'str'>, 'ready_timeout': <class 'float'>, 'trigger_timeout': <class 'float'>, 'virtual': <function strbool>, 'virtual_sample_rate': <class 'int'>, 'visa': <class 'str'>}}
mpylab.device.prb_lumiloop_lsprobe_multichannel.main()

Execute and display the embedded virtual LSProbe example.

Returns:

Zero after a successful example run.

Return type:

int

mpylab.device.prb_lumiloop_lsprobe_multichannel.virtual_smoke_test()

Run the embedded two-probe example without accessing hardware.

Returns:

Three-axis field vectors for both virtual probes.

Return type:

list of list of scuq.quantities.Quantity