plesty.pm100d.device ==================== .. py:module:: plesty.pm100d.device .. autoapi-nested-parse:: Concrete device class for the Thorlabs PM100D optical power and energy meter. Classes ------- .. autoapisummary:: plesty.pm100d.device.Device Module Contents --------------- .. py:class:: Device(address: str = 'USB::0x1313::0x8078::INSTR', timeout: int = 200) Bases: :py:obj:`plesty.pm100d.base_device.BaseDevice` Thorlabs PM100D optical power and energy meter. Extends :class:`BaseDevice` with 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 from ``schema_func.json`` and do not need to be overridden here. :param address: VISA resource string for the instrument. See :class:`BaseDevice` for details. :param timeout: VISA communication timeout in milliseconds; the default is derived from measured latency, see :class:`BaseDevice`. Initialise the Device with a VISA address and timeout. :param address: VISA resource string for the PM100D. :param timeout: VISA communication timeout in milliseconds. .. py:method:: 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. :param wavelength: Operating wavelength in nm. Must be within the sensor's supported range (typically 185–25000 nm). :param averaging: 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). :rtype: Dictionary with keys .. py:method:: 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'`` – ``True`` if zeroing completed within timeout. * ``'power'`` – measured optical power in Watts after zeroing (float). :rtype: Dictionary with keys