rtd_sensor.uncertainty
The core uncertainty helpers, resistance propagation, and temperature-budget APIs
were introduced in project release 0.3.0 under pt100-core / rtd; their current
rtd_sensor.uncertainty import path began with rtd-sensor 0.4.0. Fitted-parameter
covariance propagation into resistance and inferred temperature was added in
rtd-sensor 0.7.0.
Type aliases
Introduced in: project release 0.3.0 (pt100-core); current import path
since rtd-sensor 0.4.0.
RTDUncertaintyModel
Introduced in: project release 0.3.0 (pt100-core); current import path
since rtd-sensor 0.4.0.
A structural protocol requiring resistance-to-temperature conversion and local
dT/dR sensitivity. Full RTDModel objects satisfy this narrower uncertainty
interface.
Scalar helpers
All four scalar helpers were introduced in project release 0.3.0; current
rtd_sensor.uncertainty paths date to rtd-sensor 0.4.0.
standard_uncertainty_from_expanded(
expanded_uncertainty_value: float,
*,
coverage_factor: float,
) -> float
TemperatureUncertaintyComponent
Introduced in: project release 0.3.0 (pt100-core); current import path
since rtd-sensor 0.4.0.
TemperatureUncertaintyComponent(
name: str,
standard_uncertainty_c: float,
evaluation_method: Literal["A", "B"] | None = None,
source: str | None = None,
note: str | None = None,
)
ResistanceUncertaintyPropagation
Introduced in: project release 0.3.0 (pt100-core); current import path
since rtd-sensor 0.4.0.
Result fields:
resistance_ohms: float
temperature_c: float
resistance_standard_uncertainty_ohms: float
temperature_sensitivity_celsius_per_ohm: float
temperature_standard_uncertainty_c: float
propagate_resistance_uncertainty
Introduced in: project release 0.3.0 (pt100-core); current import path
since rtd-sensor 0.4.0.
propagate_resistance_uncertainty(
resistance_ohms: float,
resistance_standard_uncertainty_ohms: float,
*,
model: RTDUncertaintyModel,
) -> ResistanceUncertaintyPropagation
TemperatureUncertaintyBudget
Introduced in: project release 0.3.0 (pt100-core); current import path
since rtd-sensor 0.4.0.
Result fields:
resistance: ResistanceUncertaintyPropagation
additional_components: tuple[TemperatureUncertaintyComponent, ...]
combined_standard_uncertainty_c: float
coverage_factor: float | None
expanded_uncertainty_c: float | None
temperature_c: float # read-only property
temperature_uncertainty_budget
Introduced in: project release 0.3.0 (pt100-core); current import path
since rtd-sensor 0.4.0.
temperature_uncertainty_budget(
resistance_ohms: float,
resistance_standard_uncertainty_ohms: float,
*,
model: RTDUncertaintyModel,
additional_components: Iterable[TemperatureUncertaintyComponent] = (),
coverage_factor: float | None = None,
) -> TemperatureUncertaintyBudget
FitCovarianceResistancePropagation
Introduced in: rtd-sensor 0.7.0.
Result fields:
temperature_c: float
resistance_ohms: float
parameter_covariance: FitParameterCovariance
parameter_sensitivity_vector: tuple[float, ...]
resistance_variance_ohms_squared: float
resistance_standard_uncertainty_ohms: float
The sensitivity vector follows the covariance parameter order and represents
dR/dtheta for the fitted parameters. Individual sensitivity entries may have
different physical dimensions because the parameters themselves can have
different dimensions.
propagate_fit_covariance_to_resistance
Introduced in: rtd-sensor 0.7.0.
propagate_fit_covariance_to_resistance(
temperature_c: float,
*,
fit_result: CallendarVanDusenFitResult | IEC60751R0FitResult | PolynomialFitResult,
) -> FitCovarianceResistancePropagation
Applies covariance propagation J Cov(theta) J.T to the parameter covariance
retained by a supported fit. For IEC-R0 and polynomial fit-space
parameterizations, resistance is linear in the retained parameters, so the
resistance covariance transformation is exact at fixed temperature. For custom
CVD fits, covariance is retained in the public R0/A/B/C parameter basis;
when R0 and shape coefficients are jointly estimated, forward propagation is a
first-order local transformation because those parameters enter multiplicatively.
The fit must have available parameter covariance. This result covers fitted-model uncertainty only; it does
not automatically combine acquisition uncertainty, reference-temperature
uncertainty, drift, tolerance, or other budget components.
See Measurement & uncertainty.
FitCovarianceTemperaturePropagation
Introduced in: rtd-sensor 0.7.0.
Result fields:
resistance_ohms: float
temperature_c: float
parameter_covariance: FitParameterCovariance
resistance_parameter_sensitivity_vector: tuple[float, ...]
temperature_sensitivity_celsius_per_ohm: float
parameter_sensitivity_vector: tuple[float, ...]
temperature_variance_celsius_squared: float
temperature_standard_uncertainty_c: float
parameter_sensitivity_vector follows the covariance parameter order and
represents dT/dtheta for the fitted parameters with the measured resistance
held fixed. It is obtained from the retained resistance-parameter sensitivities
and the model's local inverse sensitivity.
propagate_fit_covariance_to_temperature
Introduced in: rtd-sensor 0.7.0.
propagate_fit_covariance_to_temperature(
resistance_ohms: float,
*,
fit_result: CallendarVanDusenFitResult | IEC60751R0FitResult | PolynomialFitResult,
) -> FitCovarianceTemperaturePropagation
Converts the supplied resistance with the fitted model and propagates the full retained parameter covariance into inferred temperature using the implicit first-order sensitivity
The resistance is treated as fixed. This result therefore covers fitted-model parameter uncertainty only; uncertainty in the resistance measurement itself, reference-temperature uncertainty, drift, tolerance, and other budget components remain separate.