errorcalculator¶
- class pyvale.errorcalculator.EErrDep(value)[source]¶
Bases:
Enum
Enumeration defining error dependence.
- EErrDep.INDEPENDENT:
Errors are calculated based on the ground truth sensor values interpolated from the input simulation.
- EErrDep.DEPENDENT:
Errors are calculated based on the accumulated sensor reading due to all preceeding errors in the chain.
- DEPENDENT = 2¶
- INDEPENDENT = 1¶
- class pyvale.errorcalculator.EErrType(value)[source]¶
Bases:
Enum
Enumeration defining the error type for separation of error types for later analysis.
- EErrType.SYSTEMATIC:
Also known as an epistemic error and is due to a lack of knowledge. Common examples include spatial or temporal averaging, digitisation / round off error and calibration errors.
- EErrType.RANDOM:
Also known as aleatory error and is generally a result of sensor noise.
- RANDOM = 2¶
- SYSTEMATIC = 1¶
- class pyvale.errorcalculator.IErrCalculator[source]¶
Bases:
ABC
Interface (abstract base class) for sensor error calculation allowing for chaining of errors.
- abstractmethod calc_errs(err_basis: ndarray, sens_data: SensorData) tuple[ndarray, SensorData] [source]¶
Abstract method that calculates the error array based on the input err_basis array. The output error array will be the same shape as the input err_basis array.
- Parameters:
err_basis (np.ndarray) -- Used as the base array for calculating the returned error
sens_data (SensorData) -- Sensor data object holding the current sensor state before applying this error calculation.
- Returns:
tuple[np.ndarray, SensorData] -- Tuple containing the error array from this calculator and a SensorData object with the current accumulated sensor state starting from the nominal state up to and including this error calculator in the error chain. Note that many errors do not modify the sensor data so the sensor data class is passed through this function unchanged.
- abstractmethod get_error_dep() EErrDep [source]¶
Abstract method for getting the error dependence.
- Returns:
EErrDependence -- Enumeration definining RANDOM or SYSTEMATIC error types.