dtscalibration.variance_stokes.variance_stokes_constant

dtscalibration.variance_stokes.variance_stokes_constant(st, sections, acquisitiontime, reshape_residuals=True)[source]

Approximate the variance of the noise in Stokes intensity measurements with one value, suitable for small setups.

  • variance_stokes_constant() for small setups with small variations in intensity. Variance of the Stokes measurements is assumed to be the same along the entire fiber.

  • variance_stokes_exponential() for small setups with very few time steps. Too many degrees of freedom results in an under estimation of the noise variance. Almost never the case, but use when calibrating pre time step.

  • variance_stokes_linear() for larger setups with more time steps. Assumes Poisson distributed noise with the following model:

        st_var = a * ds.st + b
    
    
    where `a` and `b` are constants. Requires reference sections at
    beginning and end of the fiber, to have residuals at high and low
    intensity measurements.
    

The Stokes and anti-Stokes intensities are measured with detectors, which inherently introduce noise to the measurements. Knowledge of the distribution of the measurement noise is needed for a calibration with weighted observations (Sections 5 and 6 of [1]_) and to project the associated uncertainty to the temperature confidence intervals (Section 7 of [1]_). Two sources dominate the noise in the Stokes and anti-Stokes intensity measurements (Hartog, 2017, p.125). Close to the laser, noise from the conversion of backscatter to electricity dominates the measurement noise. The detecting component, an avalanche photodiode, produces Poisson- distributed noise with a variance that increases linearly with the intensity. The Stokes and anti-Stokes intensities are commonly much larger than the standard deviation of the noise, so that the Poisson distribution can be approximated with a Normal distribution with a mean of zero and a variance that increases linearly with the intensity. At the far-end of the fiber, noise from the electrical circuit dominates the measurement noise. It produces Normal-distributed noise with a mean of zero and a variance that is independent of the intensity.

Calculates the variance between the measurements and a best fit at each reference section. This fits a function to the nt * nx measurements with ns * nt + nx parameters, where nx are the total number of reference locations along all sections. The temperature is constant along the reference sections, so the expression of the Stokes power can be split in a time series per reference section and a constant per observation location.

Idea from Discussion at page 127 in Richter, P. H. (1995). Estimating errors in least-squares fitting.

The timeseries and the constant are, of course, highly correlated (Equations 20 and 21 in [1]_), but that is not relevant here as only the product is of interest. The residuals between the fitted product and the Stokes intensity measurements are attributed to the noise from the detector. The variance of the residuals is used as a proxy for the variance of the noise in the Stokes and anti-Stokes intensity measurements. A non-uniform temperature of the reference sections results in an over estimation of the noise variance estimate because all temperature variation is attributed to the noise.

Parameters:
  • reshape_residuals

  • st (DataArray)

  • sections (Dict[str, List[slice]])

  • Returns

  • ——–

  • I_var (float) – Variance of the residuals between measured and best fit

  • resid (array_like) – Residuals between measured and best fit

  • Notes

  • ——

  • * Because there are a large number of unknowns, spend time on calculating an initial estimate. Can be turned off by setting to False.

  • * It is often not needed to use measurements from all time steps. If your variance estimate does not change when including measurements additional time steps, you have included enough measurements.

  • References

  • ———–

  • .. [1] des Tombe, B., Schilperoort, B., & Bakker, M. (2020). Estimation – of Temperature and Associated Uncertainty from Fiber-Optic Raman- Spectrum Distributed Temperature Sensing. Sensors, 20(8), 2235. https://doi.org/10.3390/s20082235

  • Examples

  • ———

  • - `Example notebook 4: Calculate variance Stokes intensity measurements <https://github.com/ dtscalibration/python-dts-calibration/blob/main/examples/notebooks/ 04Calculate_variance_Stokes.ipynb>`_

  • TODO (Account for varying acquisition times)