Estimates the signal/noise (S/N) ratio of each data point in a scan by using the median (histogram based). More...
#include <OpenMS/FILTERING/NOISEESTIMATION/SignalToNoiseEstimatorMedian.h>
Public Types | |
| enum | IntensityThresholdCalculation { MANUAL = -1, AUTOMAXBYSTDEV = 0, AUTOMAXBYPERCENT = 1 } |
method to use for estimating the maximal intensity that is used for histogram calculation More... | |
| typedef SignalToNoiseEstimator < Container >::PeakIterator | PeakIterator |
| typedef SignalToNoiseEstimator < Container >::PeakType | PeakType |
| typedef SignalToNoiseEstimator < Container > ::GaussianEstimate | GaussianEstimate |
Public Member Functions | |
| SignalToNoiseEstimatorMedian () | |
| default constructor | |
| SignalToNoiseEstimatorMedian (const SignalToNoiseEstimatorMedian &source) | |
| Copy Constructor. | |
| virtual | ~SignalToNoiseEstimatorMedian () |
| Destructor. | |
Assignment | |
| SignalToNoiseEstimatorMedian & | operator= (const SignalToNoiseEstimatorMedian &source) |
Protected Member Functions | |
| void | computeSTN_ (const PeakIterator &scan_first_, const PeakIterator &scan_last_) |
| void | updateMembers_ () |
| overridden function from DefaultParamHandler to keep members up to date, when a parameter is changed | |
Protected Attributes | |
| double | max_intensity_ |
| maximal intensity considered during binning (values above get discarded) | |
| double | auto_max_stdev_Factor_ |
| parameter for initial automatic estimation of "max_intensity_": a stdev multiplier | |
| double | auto_max_percentile_ |
| parameter for initial automatic estimation of "max_intensity_" percentile or a stdev | |
| int | auto_mode_ |
| determines which method shall be used for estimating "max_intensity_". valid are MANUAL=-1, AUTOMAXBYSTDEV=0 or AUTOMAXBYPERCENT=1 | |
| double | win_len_ |
| range of data points which belong to a window in Thomson | |
| int | bin_count_ |
| number of bins in the histogram | |
| int | min_required_elements_ |
| minimal number of elements a window needs to cover to be used | |
| double | noise_for_empty_window_ |
Estimates the signal/noise (S/N) ratio of each data point in a scan by using the median (histogram based).
For each datapoint in the given scan, we collect a range of data points around it (param: win_len). The noise for a datapoint is estimated to be the median of the intensities of the current window. If the number of elements in the current window is not sufficient (param: MinReqElements), the noise level is set to a default value (param: noise_for_empty_window). The whole computation is histogram based, so the user will need to supply a number of bins (param: bin_count), which determines the level of error and runtime. The maximal intensity for a datapoint to be included in the histogram can be either determined automatically (params: AutoMaxIntensity, auto_mode) by two different methods or can be set directly by the user (param: max_intensity). If the (estimated) max_intensity value is too low and the median is found to be in the last (&highest) bin, a warning to std:err will be given. In this case you should increase max_intensity (and optionally the bin_count).
Changing any of the parameters will invalidate the S/N values (which will invoke a recomputation on the next request).
| Name | Type | Default | Restrictions | Description |
|---|---|---|---|---|
| max_intensity | int | -1 | min: -1 | maximal intensity considered for histogram construction. By default, it will be calculated automatically (see auto_mode). Only provide this parameter if you know what you are doing (and change 'auto_mode' to '-1')! All intensities EQUAL/ABOVE 'max_intensity' will be added to the LAST histogram bin. If you choose 'max_intensity' too small, the noise estimate might be too small as well. If chosen too big, the bins become quite large (which you could counter by increasing 'bin_count', which increases runtime). In general, the Median-S/N estimator is more robust to a manual max_intensity than the MeanIterative-S/N. |
| auto_max_stdev_factor | float | 3 | min: 0 max: 999 | parameter for 'max_intensity' estimation (if 'auto_mode' == 0): mean + 'auto_max_stdev_factor' * stdev |
| auto_max_percentile | int | 95 | min: 0 max: 100 | parameter for 'max_intensity' estimation (if 'auto_mode' == 1): auto_max_percentile th percentile |
| auto_mode | int | 0 | min: -1 max: 1 | method to use to determine maximal intensity: -1 --> use 'max_intensity'; 0 --> 'auto_max_stdev_factor' method (default); 1 --> 'auto_max_percentile' method |
| win_len | float | 200 | min: 1 | window length in Thomson |
| bin_count | int | 30 | min: 3 | number of bins for intensity values |
| min_required_elements | int | 10 | min: 1 | minimum number of elements required in a window (otherwise it is considered sparse) |
| noise_for_empty_window | float | 1e+20 | noise value used for sparse windows |
| typedef SignalToNoiseEstimator<Container>::GaussianEstimate GaussianEstimate |
| typedef SignalToNoiseEstimator<Container>::PeakIterator PeakIterator |
Reimplemented from SignalToNoiseEstimator< Container >.
| typedef SignalToNoiseEstimator<Container>::PeakType PeakType |
Reimplemented from SignalToNoiseEstimator< Container >.
| SignalToNoiseEstimatorMedian | ( | ) | [inline] |
default constructor
| SignalToNoiseEstimatorMedian | ( | const SignalToNoiseEstimatorMedian< Container > & | source | ) | [inline] |
Copy Constructor.
| virtual ~SignalToNoiseEstimatorMedian | ( | ) | [inline, virtual] |
Destructor.
| void computeSTN_ | ( | const PeakIterator & | scan_first_, | |
| const PeakIterator & | scan_last_ | |||
| ) | [inline, protected, virtual] |
calculate StN values for all datapoints given, by using a sliding window approach
| scan_first_ | first element in the scan | |
| scan_last_ | last element in the scan (disregarded) |
| Throws | Exception::InvalidValue |
Implements SignalToNoiseEstimator< Container >.
| SignalToNoiseEstimatorMedian& operator= | ( | const SignalToNoiseEstimatorMedian< Container > & | source | ) | [inline] |
| void updateMembers_ | ( | ) | [inline, protected] |
overridden function from DefaultParamHandler to keep members up to date, when a parameter is changed
Referenced by SignalToNoiseEstimatorMedian< OpenMS::MSSpectrum< PeakT > >::operator=(), and SignalToNoiseEstimatorMedian< OpenMS::MSSpectrum< PeakT > >::SignalToNoiseEstimatorMedian().
double auto_max_percentile_ [protected] |
parameter for initial automatic estimation of "max_intensity_" percentile or a stdev
Referenced by SignalToNoiseEstimatorMedian< OpenMS::MSSpectrum< PeakT > >::computeSTN_(), and SignalToNoiseEstimatorMedian< OpenMS::MSSpectrum< PeakT > >::updateMembers_().
double auto_max_stdev_Factor_ [protected] |
parameter for initial automatic estimation of "max_intensity_": a stdev multiplier
Referenced by SignalToNoiseEstimatorMedian< OpenMS::MSSpectrum< PeakT > >::computeSTN_(), and SignalToNoiseEstimatorMedian< OpenMS::MSSpectrum< PeakT > >::updateMembers_().
int auto_mode_ [protected] |
determines which method shall be used for estimating "max_intensity_". valid are MANUAL=-1, AUTOMAXBYSTDEV=0 or AUTOMAXBYPERCENT=1
Referenced by SignalToNoiseEstimatorMedian< OpenMS::MSSpectrum< PeakT > >::computeSTN_(), and SignalToNoiseEstimatorMedian< OpenMS::MSSpectrum< PeakT > >::updateMembers_().
int bin_count_ [protected] |
number of bins in the histogram
Referenced by SignalToNoiseEstimatorMedian< OpenMS::MSSpectrum< PeakT > >::computeSTN_(), and SignalToNoiseEstimatorMedian< OpenMS::MSSpectrum< PeakT > >::updateMembers_().
double max_intensity_ [protected] |
maximal intensity considered during binning (values above get discarded)
Referenced by SignalToNoiseEstimatorMedian< OpenMS::MSSpectrum< PeakT > >::computeSTN_(), and SignalToNoiseEstimatorMedian< OpenMS::MSSpectrum< PeakT > >::updateMembers_().
int min_required_elements_ [protected] |
minimal number of elements a window needs to cover to be used
Referenced by SignalToNoiseEstimatorMedian< OpenMS::MSSpectrum< PeakT > >::computeSTN_(), and SignalToNoiseEstimatorMedian< OpenMS::MSSpectrum< PeakT > >::updateMembers_().
double noise_for_empty_window_ [protected] |
used as noise value for windows which cover less than "min_required_elements_" use a very high value if you want to get a low S/N result
Referenced by SignalToNoiseEstimatorMedian< OpenMS::MSSpectrum< PeakT > >::computeSTN_(), and SignalToNoiseEstimatorMedian< OpenMS::MSSpectrum< PeakT > >::updateMembers_().
range of data points which belong to a window in Thomson
Referenced by SignalToNoiseEstimatorMedian< OpenMS::MSSpectrum< PeakT > >::computeSTN_(), and SignalToNoiseEstimatorMedian< OpenMS::MSSpectrum< PeakT > >::updateMembers_().
| OpenMS / TOPP release 1.10.0 | Documentation generated on Thu Mar 7 2013 09:42:53 using doxygen 1.7.1 |