pyms.Noise
¶
Noise processing functions.
pyms.Noise.Analysis
¶
Noise analysis functions.
Functions:
|
A simple estimator of the signal noise based on randomly placed windows and median absolute deviation. |
-
window_analyzer
(ic, window=256, n_windows=1024, rand_seed=None)[source]¶ A simple estimator of the signal noise based on randomly placed windows and median absolute deviation.
The noise value is estimated by repeatedly and picking random windows (of a specified width) and calculating median absolute deviation (MAD). The noise estimate is given by the minimum MAD.
- Parameters:
- Return type:
- Returns:
The noise estimate.
- Author:
Vladimir Likic
pyms.Noise.SavitzkyGolay
¶
Savitzky-Golay noise filter.
Functions:
|
Applies Savitzky-Golay filter on an ion chromatogram. |
|
Applies Savitzky-Golay filter on Intensity Matrix. |
-
savitzky_golay
(ic, window=7, degree=2)[source]¶ Applies Savitzky-Golay filter on an ion chromatogram.
- Parameters:
ic (
IonChromatogram
) – The input ion chromatogram.window (
Union
[int
,str
]) – The window selection parameter. This can be an integer or time string. If an integer, taken as the number of points. If a string, must be the form'<NUMBER>s'
or'<NUMBER>m'
, specifying a time in seconds or minutes, respectively. Default7
.degree (
int
) – degree of the fitting polynomial for the Savitzky-Golay filter. Default2
.
- Return type:
- Returns:
Smoothed ion chromatogram.
- Authors:
Uwe Schmitt, Vladimir Likic, Dominic Davis-Foster
-
savitzky_golay_im
(im, window=7, degree=2)[source]¶ Applies Savitzky-Golay filter on Intensity Matrix.
Simply wraps around the Savitzky Golay function above.
- Parameters:
im (
BaseIntensityMatrix
)window (
Union
[int
,str
]) – The window selection parameter. Default7
.degree (
int
) – degree of the fitting polynomial for the Savitzky-Golay filter. Default2
.
- Returns:
Smoothed IntensityMatrix.
- Return type:
- Authors:
Sean O’Callaghan, Vladimir Likic, Dominic Davis-Foster
pyms.Noise.Window
¶
Moving window noise filter.
Functions:
|
Applies window smoothing on ion chromatogram. |
|
Applies window smoothing on Intensity Matrix. |
-
window_smooth
(ic, window=3, use_median=False)[source]¶ Applies window smoothing on ion chromatogram.
- Parameters:
ic (
IonChromatogram
)window (
Union
[int
,str
]) – The window selection parameter. This can be an integer or time string. If an integer, taken as the number of points. If a string, must be in the form'<NUMBER>s'
or'<NUMBER>m'
, specifying a time in seconds or minutes, respectively Default3
.use_median (
bool
) – Whether to use the the mean or median window smoothing. DefaultFalse
.
- Return type:
- Returns:
Smoothed ion chromatogram
- Authors:
Vladimir Likic, Dominic Davis-Foster (type assertions)