17 #define DEBUG_PEAK_PICKING
18 #undef DEBUG_PEAK_PICKING
37 double cm, toti, min_dh;
40 std::vector<double> masses, intens;
44 for (
Size k = 0;
k < input.size() - 1; ++
k)
49 if (input[
k].getIntensity() >= 50.0)
51 masses.push_back(input[
k].getMZ());
52 intens.push_back(input[
k].getIntensity());
57 hw = fWindowWidth / 2;
59 for (i = 2; i < (int)masses.size() - 2; i++)
63 if (intens[i] > min_dh && intens[i] > intens[i - 1] + min_dh && intens[i] >= intens[i + 1] && intens[i - 1] > intens[i - 2] + min_dh && intens[i + 1] >= intens[i + 2])
69 for (j = -hw; j <= hw; j++)
71 double inte = intens[i - j];
72 double mz = masses[i - j];
75 toti += (double) intens[i - j];
82 output.push_back(peak);
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:66
In-Memory representation of a mass spectrometry run.
Definition: MSExperiment.h:46
The representation of a 1D spectrum.
Definition: MSSpectrum.h:44
A 1-dimensional raw data point or peak.
Definition: Peak1D.h:28
void setIntensity(IntensityType intensity)
Mutable access to the data point intensity (height)
Definition: Peak1D.h:84
void setMZ(CoordinateType mz)
Mutable access to m/z.
Definition: Peak1D.h:93
Definition: PeakPickerSH.h:25
void pickExperiment(const PeakMap &input, PeakMap &output)
Applies the peak-picking algorithm to a map (MSExperiment).
void pick(const MSSpectrum &input, MSSpectrum &output, float fWindowWidth)
Picks peaks in one spectrum.
Definition: PeakPickerSH.h:34
Base class for all classes that want to report their progress.
Definition: ProgressLogger.h:27
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:101
const double k
Definition: Constants.h:132
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22