stoner_measurement.instruments.nanovoltmeter.Nanovoltmeter

class stoner_measurement.instruments.nanovoltmeter.Nanovoltmeter(transport: BaseTransport, protocol: BaseProtocol)[source]

Bases: BaseInstrument

Abstract base class for nanovoltmeter instruments.

Provides a uniform interface for high-sensitivity DC voltage measurements. Nanovoltmeters are commonly used in low-resistance measurements, Hall-effect measurements, and thermoelectric studies.

Variables:

Examples

>>> # Demonstrate interface using a minimal concrete implementation
>>> from stoner_measurement.instruments.transport import NullTransport
>>> from stoner_measurement.instruments.protocol import ScpiProtocol
>>> from stoner_measurement.instruments.nanovoltmeter import Nanovoltmeter
>>> class _NVM(Nanovoltmeter):
...     def measure_voltage(self): return 1.23e-6
...     def get_range(self): return 0.1
...     def set_range(self, value): pass
...     def get_autorange(self): return True
...     def set_autorange(self, state): pass
...     def get_nplc(self): return 5.0
...     def set_nplc(self, value): pass
>>> nvm = _NVM(NullTransport(), ScpiProtocol())
>>> nvm.measure_voltage()
1.23e-06
CAPABILITIES: ClassVar[NanovoltmeterCapabilities] = NanovoltmeterCapabilities(has_function_selection=False, has_filter=False, has_trigger=False, has_buffer=False, has_data_format=False, has_byte_order=False, supported_functions=(<NanovoltmeterFunction.VOLT: 'VOLT'>,), fixed_voltage_ranges=(), nplc_values=(), digit_values=(), filter_types=(), default_nplc=None, default_digits=None, default_filter_type=None, counted_filter_types=(), analog_filter_time_multiplier=1.0, supports_filter_count=False, supports_analog_filter=False, supports_relative=False, supports_line_sync=False, supports_autozero=False, supports_safe_reset=True, relative_limits=None, max_buffer_points=None)
abort() → None[source]

Abort a running measurement sequence.

Raises:

NotImplementedError – If trigger configuration is not supported by the instrument.

clear_buffer() → None[source]

Clear the instrument reading buffer.

Raises:

NotImplementedError – If buffer operations are not supported by the instrument.

abstractmethod get_autorange() → bool[source]

Return True if autorange is currently enabled.

Returns:

True when the instrument selects the range automatically.

Return type:

(bool)

Raises:

ConnectionError – If the transport is not open.

get_buffer_count() → int[source]

Return the number of readings currently stored in the buffer.

Raises:

NotImplementedError – If buffer operations are not supported by the instrument.

abstractmethod get_capabilities() → NanovoltmeterCapabilities[source]

Return static capability metadata.

Returns:

Capability descriptor.

Return type:

(NanovoltmeterCapabilities)

get_filter_count() → int[source]

Return the configured filter averaging count.

Raises:

NotImplementedError – If filtering is not supported by the instrument.

get_filter_enabled() → bool[source]

Return whether filtering is enabled.

Raises:

NotImplementedError – If filtering is not supported by the instrument.

abstractmethod get_measure_function() → NanovoltmeterFunction[source]

Return the active measurement function.

Returns:

Active measurement function.

Return type:

(NanovoltmeterFunction)

abstractmethod get_nplc() → float[source]

Return the integration time in power-line cycles.

Returns:

Integration time in power-line cycles.

Return type:

(float)

Raises:

ConnectionError – If the transport is not open.

abstractmethod get_range() → float[source]

Return the current voltage measurement range in volts.

Returns:

Active measurement range in volts. 0.0 typically indicates autorange is active.

Return type:

(float)

Raises:

ConnectionError – If the transport is not open.

get_trigger_count() → int[source]

Return the configured trigger count.

Raises:

NotImplementedError – If trigger configuration is not supported by the instrument.

get_trigger_source() → NanovoltmeterTriggerSource[source]

Return the trigger source selection.

Raises:

NotImplementedError – If trigger configuration is not supported by the instrument.

initiate() → None[source]

Arm the trigger system and begin measurements.

Raises:

NotImplementedError – If trigger configuration is not supported by the instrument.

abstractmethod measure_voltage() → float[source]

Trigger a voltage measurement and return the result in volts.

Returns:

Measured voltage in volts.

Return type:

(float)

Raises:

ConnectionError – If the transport is not open.

read_buffer(count: int | None = None) → tuple[float, ...] | ndarray[source]

Read values from the instrument buffer.

Keyword Parameters:

count (int | None) – Optional number of points to read from the start of the buffer. If None, read all available points.

Returns:

Parsed buffer values.

Return type:

(tuple[float, …])

Raises:

NotImplementedError – If buffer operations are not supported by the instrument.

set_analog_filter_enabled(state: bool) → None[source]

Enable or disable analogue low-pass filtering.

Raises:

NotImplementedError – If analogue filtering is not supported by the instrument.

abstractmethod set_autorange(state: bool) → None[source]

Enable or disable automatic range selection.

Parameters:

state (bool) – True to enable autorange, False to use the manually set range.

Raises:

ConnectionError – If the transport is not open.

set_buffer_feed_continuous_next() → None[source]

Set buffer feed mode to continuous-next.

Raises:

NotImplementedError – If configurable buffer feed mode is not supported.

set_buffer_feed_sense() → None[source]

Set buffer feed source to measurement readings.

Raises:

NotImplementedError – If configurable buffer feed source is not supported.

set_buffer_size(size: int) → None[source]

Set reading-buffer capacity.

Raises:

NotImplementedError – If buffer sizing is not supported by the instrument.

set_digits(digits: int) → None[source]

Set display/data resolution digits.

Raises:

NotImplementedError – If digit-resolution control is not supported by the instrument.

set_filter_count(count: int) → None[source]

Set the filter averaging count.

Raises:

NotImplementedError – If filtering is not supported by the instrument.

set_filter_enabled(state: bool) → None[source]

Enable or disable measurement filtering.

Raises:

NotImplementedError – If filtering is not supported by the instrument.

abstractmethod set_measure_function(function: NanovoltmeterFunction) → None[source]

Set the active measurement function.

Parameters:

function (NanovoltmeterFunction) – Function to select.

abstractmethod set_nplc(value: float) → None[source]

Set the integration time in power-line cycles.

Parameters:

value (float) – Integration time in power-line cycles. Longer integration times improve resolution but reduce throughput.

Raises:
abstractmethod set_range(value: float) → None[source]

Set the voltage measurement range.

Parameters:

value (float) – Measurement range in volts. Pass 0.0 to enable autorange on instruments that conflate the two settings.

Raises:
set_relative_enabled(state: bool) → None[source]

Enable or disable relative (REL) mode.

Raises:

NotImplementedError – If relative mode is not supported by the instrument.

set_trigger_count(count: int) → None[source]

Set the trigger count.

Raises:

NotImplementedError – If trigger configuration is not supported by the instrument.

set_trigger_source(source: NanovoltmeterTriggerSource) → None[source]

Set the trigger source selection.

Raises:

NotImplementedError – If trigger configuration is not supported by the instrument.