rminstr_specs

Submodules

Exceptions

CalibrationWarning

Base class for warnings generated by user code.

SpecsSettingWarning

Base class for warnings generated by user code.

Classes

Specification

Specification datasheet parent class.

Package Contents

class rminstr_specs.Specification(name: str, serial: str, n_mechanisms: int, mechanism_functions: list[Callable])

Bases: abc.ABC

Specification datasheet parent class.

All specification sheets will inherit from this class.

Attributes:
n_mechanismsint

Number of uncertanity mechanisms.

mechanism_functionslist

List of callable functions wite the mechanism functions.

namestr

Name of the instrument.

serialstr

Serial number of the instrument.

time_zeroint

Reference time. Set by the spec manager.

inst_list = []
n_mechanisms
mechanism_functions
name
serial
time_zero = None
abstract all_manufacturer_errors(readings: numpy.ndarray, addition_method: str = 'spec') numpy.ndarray

Return the sum of all manufacturer errors for readings.

Ensure that errors are added in the way specified by the data sheet, if provided. The default is spec unless overridden by a child class.

if spec, it will use the spec sheet addition method, if provided if linear, it will add linearly if quadrature, it will add in quadrature

Parameters:
readings_np.ndarray

Array of measurements to get uncertainties for.

addition_methodstr, optional

Specifies how the errors are added together. Linear will all the standard deviations linears, whereas quad will do a quadrature sum. Linear will give a worst case. The default is ‘linear’.

Returns:
np.ndarray

Array of manufacturer errors of same shape as readings.

exception rminstr_specs.CalibrationWarning

Bases: UserWarning

Base class for warnings generated by user code.

Initialize self. See help(type(self)) for accurate signature.

exception rminstr_specs.SpecsSettingWarning

Bases: UserWarning

Base class for warnings generated by user code.

Initialize self. See help(type(self)) for accurate signature.