|
OpenMS
2.6.0
|
Go to the documentation of this file.
85 template <
typename SpectrumType>
88 if (spectrum.empty())
return;
95 if (method_ ==
"to_one")
97 divisor = spectrum.begin()->getIntensity();
98 for (ConstIterator it = spectrum.begin(); it != spectrum.end(); ++it)
100 if (divisor < it->getIntensity()) divisor = it->getIntensity();
103 else if (method_ ==
"to_TIC")
105 for (ConstIterator it = spectrum.begin(); it != spectrum.end(); ++it)
107 divisor += it->getIntensity();
117 for (
Iterator it = spectrum.begin(); it != spectrum.end(); ++it)
119 it->setIntensity(it->getIntensity() / divisor);
129 void filterPeakMap(
PeakMap & exp)
const;
131 void updateMembers_()
override;
Normalizes the peak intensities spectrum-wise.
Definition: Normalizer.h:57
Invalid value exception.
Definition: Exception.h:335
A more convenient string class.
Definition: String.h:59
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:77
void filterSpectrum(SpectrumType &spectrum) const
Definition: Normalizer.h:86
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:92
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
String method_
Definition: Normalizer.h:136
ContainerType::iterator Iterator
Mutable iterator.
Definition: MSSpectrum.h:126
ContainerType::const_iterator ConstIterator
Non-mutable iterator.
Definition: MSSpectrum.h:128
The representation of a 1D spectrum.
Definition: MSSpectrum.h:67