30 template <
typename Container = MSSpectrum>
40 typedef typename PeakIterator::value_type
PeakType;
62 if (&source ==
this)
return *
this;
75 virtual void init(
const Container&
c)
120 while (run != scan_last_)
122 m += (*run).getIntensity();
131 while (run != scan_last_)
133 double tmp(m - (*run).getIntensity());
137 v = v / ((double)size);
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:66
DefaultParamHandler & operator=(const DefaultParamHandler &rhs)
Assignment operator.
In-Memory representation of a mass spectrometry run.
Definition: MSExperiment.h:46
Base class for all classes that want to report their progress.
Definition: ProgressLogger.h:27
ProgressLogger & operator=(const ProgressLogger &other)
Assignment Operator.
This class represents the abstract base class of a signal to noise estimator.
Definition: SignalToNoiseEstimator.h:33
virtual void init(const Container &c)
Set the start and endpoint of the raw data interval, for which signal to noise ratios will be estimat...
Definition: SignalToNoiseEstimator.h:75
double variance
variance of estimated Gaussian
Definition: SignalToNoiseEstimator.h:108
SignalToNoiseEstimator & operator=(const SignalToNoiseEstimator &source)
Assignment operator.
Definition: SignalToNoiseEstimator.h:60
PeakIterator::value_type PeakType
Definition: SignalToNoiseEstimator.h:40
SignalToNoiseEstimator(const SignalToNoiseEstimator &source)
Copy constructor.
Definition: SignalToNoiseEstimator.h:53
virtual void computeSTN_(const Container &c)=0
computes the S/N values when init() is called
GaussianEstimate estimate_(const PeakIterator &scan_first_, const PeakIterator &scan_last_) const
calculate mean & stdev of intensities of a spectrum
Definition: SignalToNoiseEstimator.h:113
~SignalToNoiseEstimator() override
Destructor.
Definition: SignalToNoiseEstimator.h:71
virtual double getSignalToNoise(const Size index) const
Definition: SignalToNoiseEstimator.h:83
double mean
mean of estimated Gaussian
Definition: SignalToNoiseEstimator.h:107
std::vector< double > stn_estimates_
stores the noise estimate for each peak
Definition: SignalToNoiseEstimator.h:146
Container::const_iterator PeakIterator
Definition: SignalToNoiseEstimator.h:39
SignalToNoiseEstimator()
Constructor.
Definition: SignalToNoiseEstimator.h:46
protected struct to store parameters my, sigma for a Gaussian distribution
Definition: SignalToNoiseEstimator.h:106
unsigned int UInt
Unsigned integer type.
Definition: Types.h:64
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:97
#define OPENMS_POSTCONDITION(condition, message)
Postcondition macro.
Definition: openms/include/OpenMS/CONCEPT/Macros.h:101
const double c
Definition: Constants.h:188
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
float estimateNoiseFromRandomScans(const MSExperiment &exp, const UInt ms_level, const UInt n_scans=10, const double percentile=80)