plesty.pm100d
Thorlabs PM100D optical power and energy meter device module.
Submodules
Attributes
Classes
Thorlabs PM100D optical power and energy meter. |
Package Contents
- class plesty.pm100d.Device(address: str = 'USB::0x1313::0x8078::INSTR', timeout: int = 200)
Bases:
plesty.pm100d.base_device.BaseDeviceThorlabs PM100D optical power and energy meter.
Extends
BaseDevicewith composite orchestration methods that combine multiple schema operations and parameter reads into higher-level workflows.All measurement functions (
measure_power,measure_energy, etc.) and sensor utility functions (get_sensor_info,zero_sensor) are registered automatically fromschema_func.jsonand do not need to be overridden here.- Parameters:
address (str) – VISA resource string for the instrument. See
BaseDevicefor details.timeout (int) – VISA communication timeout in milliseconds; the default is derived from measured latency, see
BaseDevice.
Initialise the Device with a VISA address and timeout.
- Parameters:
address (str) – VISA resource string for the PM100D.
timeout (int) – VISA communication timeout in milliseconds.
- configure_and_measure_power(wavelength: float, averaging: int = 1) dict
Set wavelength and averaging, then perform a power measurement.
This composite method writes the two configuration parameters before triggering a fresh power reading. It is safe to call repeatedly in a measurement loop.
- Parameters:
wavelength (float) – Operating wavelength in nm. Must be within the sensor’s supported range (typically 185–25000 nm).
averaging (int) – Number of samples to average. Must be 1–3000. Default is 1.
- Returns:
'wavelength'– confirmed wavelength setting (nm, float).'averaging'– confirmed averaging count (int).'power'– measured optical power in Watts (float).
- Return type:
Dictionary with keys
- zero_and_measure_power() dict
Zero the sensor and then perform a power measurement.
Useful before a precision measurement session to eliminate dark-current offset.
- Returns:
'zero_success'–Trueif zeroing completed within timeout.'power'– measured optical power in Watts after zeroing (float).
- Return type:
Dictionary with keys
- plesty.pm100d.PlestyPm100dDevice
- plesty.pm100d.DocDevice