deerlab.noiselevel¶
- noiselevel(V, mode='der', *args)[source]¶
Estimate the noise level in a dataset.
Returns the standard deviation estimation of the noise in a given signal using different methods:
sigma = noiselevel(V,'der')
: Employs the DER_SNR [1] method for estimating the noise standard deviation.sigma = noiselevel(V,'scans')
: IfV
is a 2D-dataset of different scans, the noise standard deviation is estimated from the deviations between scans. The second dimension ofV2D
must contain the different scans. The function returns the standard deviation of the averaged signal not of the individual scans.sigma = noiselevel(V,'movmean',winsize)
: The noise level is estimated via filtering of the signal with a moving mean filter. The sizewinsize
of the moving mean window must be specified as well.sigma = noiselevel(V,'movmean',winsize,order)
: The noise level is estimated via filtering of the signal with a Savitzky-Golay filter. The window sizewinsize
and polynomial orderorder
must be specified as well.sigma = noiselevel(V,'reference',Vref)
: If a reference model signalVref
is given, the noise level is estimated from the difference between both signals.sigma = noiselevel(V,'complex')
: If the input signalV
contains an imaginary component, the noise level is estimated form the imaginary component after phase optimization.
- Parameters:
- Varray_like
Input signal. Must be a real-valued 2D-matrix for the
'scans'
method. Otherwise it must be a real-valued 1D-array.- methodstring
'der'
- Estimation via the DER_SNR method [1].'scans'
- Estimation from deviations between scans.'movmean'
- Estimation from a moving mean filtered signal.'savgol'
- Estimation from a Savitzky-Golay filtered signal.'reference'
- Estimation from comparison with a reference signal.'complex'
- Estimation from phase-corrected imaginary part of a complex signal.
The default is
'der'
.- winsizescalar integer
Filter window size
- orderscalar integer
Savitzky-Golay polynomial order.
- Vrefarray_like
Reference dipolar signal.
- Vcoarray_like
Complex-valued dipolar signal.
- Returns:
- sigmascalar
Estimated noise standard deviation
References
[1]S. Czesla, T. Molle and J. H. M. M. Schmitt A posteriori noise estimation in variable data sets - With applications to spectra and light curves, A&A, 609 (2018) A39