35 #ifndef OPENMS_TRANSFORMATIONS_RAW2PEAK_PEAKPICKERSH_H 36 #define OPENMS_TRANSFORMATIONS_RAW2PEAK_PEAKPICKERSH_H 44 #define DEBUG_PEAK_PICKING 45 #undef DEBUG_PEAK_PICKING 64 double cm, toti, min_dh;
67 std::vector<double> masses, intens;
71 for (
Size k = 0;
k < input.size() - 1; ++
k)
76 if (input[
k].getIntensity() >= 50.0)
78 masses.push_back(input[
k].getMZ());
79 intens.push_back(input[
k].getIntensity());
84 hw = fWindowWidth / 2;
86 for (i = 2; i < (int)masses.size() - 2; i++)
90 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])
96 for (j = -hw; j <= hw; j++)
98 double inte = intens[i - j];
99 double mz = masses[i - j];
102 toti += (
double) intens[i - j];
109 output.push_back(peak);
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
void setMZ(CoordinateType mz)
Mutable access to m/z.
Definition: Peak1D.h:120
void setIntensity(IntensityType intensity)
Mutable access to the data point intensity (height)
Definition: Peak1D.h:111
Definition: PeakPickerSH.h:49
void pick(const MSSpectrum &input, MSSpectrum &output, float fWindowWidth)
Picks peaks in one spectrum.
Definition: PeakPickerSH.h:61
The representation of a 1D spectrum.
Definition: MSSpectrum.h:67
A 1-dimensional raw data point or peak.
Definition: Peak1D.h:55
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:82
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:128
Base class for all classes that want to report their progress.
Definition: ProgressLogger.h:55
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:92