mpylab.device.pm_lumiloop_lspm_multichannel moduleΒΆ
Channel-oriented SCPI driver for LUMILOOP LSPM power meters.
Each POWERMETER instance represents one LSPM measurement channel.
The physical meter state and communication session are shared by a controller
associated with the VISA resource and optional meter selector.
- class mpylab.device.pm_lumiloop_lspm_multichannel.POWERMETER(**kwargs)
Bases:
SharedFacade,POWERMETERExpose each LSPM power channel as an independently addressable driver.
The acquisition policy is selected in the common INI section:
[Init_Value] acquisition: independent
independentissues a dedicated:MEAS:POW:P<n>?query for each logical channel.synchronizedobtains one:MEAS:POW:ALL?snapshot and distributes it to the channel facades. If the setting is omitted,independentis used.Frequency and detector mode are properties of the physical LSPM and are therefore shared by all channel facades attached to the same controller.
A positive
measurement_durationswitchesGetData()to triggered waveform acquisition. Samples are converted from dBm to watts before the mean and its type-A uncertainty are calculated. This is essential because arithmetic averaging on the logarithmic dBm scale is not equivalent.For hardware devices,
:SYST:CHAN?determines the available channel count. An optionalchannelsornr_of_channelsINI value is treated as an expected value and produces a warning if it differs. Virtual devices require one of these INI settings because no hardware discovery exists.- GetData()
Read this logical channel using the configured acquisition policy.
- Init(ini=None, channel=None, ignore_bus=None)
Initialize one channel facade and its shared physical controller.
- Zero(state='on')
LSPM power meters do not expose a zero command in this driver.
- conftmpl = {'channel_%d': {'file': <function _file_source>, 'filter': <class 'int'>, 'interpolation': <class 'str'>, 'manrange': <class 'float'>, 'name': <class 'str'>, 'rangemode': <class 'str'>, 'resolution': <class 'int'>, 'sensor': <class 'str'>, 'swr1': <class 'float'>, 'swr2': <class 'float'>, 'unit': <class 'str'>}, 'description': {'description': <class 'str'>, 'deviceid': <class 'str'>, 'driver': <class 'str'>, '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'>, 'meter_serial_number': <class 'str'>, 'mfreq': <class 'float'>, 'minimum_samples': <class 'int'>, 'mode': <class 'str'>, 'nr_of_channels': <class 'int'>, 'ready_timeout': <class 'float'>, 'trigger_timeout': <class 'float'>, 'virtual': <function strbool>, 'virtual_sample_rate': <class 'int'>, 'visa': <class 'str'>}}
- mpylab.device.pm_lumiloop_lspm_multichannel.main()
Execute and display the embedded virtual LSPM example.
- mpylab.device.pm_lumiloop_lspm_multichannel.virtual_smoke_test()
Run the embedded two-channel example without accessing hardware.