ertkit.ErrorModel#
- class ertkit.ErrorModel(*, relative=0.03, absolute=0.0)#
Standard deviation of measurement errors on the transfer resistance.
Errors are specified on the transfer resistance \(R = \Delta V / I\) (LaBrecque et al. 1996) as
\[s_R = a + b \, |R|,\]with an absolute part \(a\) in ohms (voltage noise) and a relative part \(b\). Since apparent resistivity is \(\rho_a = K R\), the data \(d = \ln \rho_a\) have log-space standard deviation \(s = b + a / |R|\).
- Parameters:
- relativefloat, optional
Relative part \(b\), as a fraction: 0.03 means 3%. The default, 0.03, is a common choice; 2 to 5% is typical, and up to 10% where the earth is far from layered. It should include a floor for modeling errors: reciprocal or repeated readings (Tso et al. 2017) measure the noise only, so they do not justify a value below about 2%.
- absolutefloat, optional
Absolute part \(a\), in ohms: about the voltage noise divided by the current. Default 0.
- Raises:
- ValueError
If a part is negative or not finite, or if both are zero.
- Warns:
- DataWarning
If
relativeis above 0.5, which suggests a percentage given where a fraction is expected.
Examples
>>> from ertkit import ErrorModel >>> noise = ErrorModel(relative=0.03, absolute=1e-4) >>> round(float(noise.log_std(0.01)[0]), 6) 0.04
- log_std(resistance)#
Standard deviation \(s = b + a/|R|\) of \(\ln \rho_a\).
- Parameters:
- resistancearray_like
Transfer resistances \(R\) in ohms.
- Returns:
- ndarray of float
Standard deviations of the natural logarithm of the data.
- resistance_std(resistance)#
Standard deviation \(s_R = a + b|R|\) of transfer resistances.
- Parameters:
- resistancearray_like
Transfer resistances \(R\) in ohms.
- Returns:
- ndarray of float
Standard deviations in ohms.
- usable(resistance)#
Readings that can be inverted in log space.
A reading is usable when \(R > 0\) and, if there is an absolute part, \(|R| \ge 3a\); below that the logarithm is dominated by noise.
- Parameters:
- resistancearray_like
Transfer resistances \(R\) in ohms.
- Returns:
- ndarray of bool
True for each usable reading.