OpenMS
|
Data structure for spline interpolation of MS1 spectra and chromatograms. More...
#include <OpenMS/FILTERING/DATAREDUCTION/SplineInterpolatedPeaks.h>
Classes | |
class | Navigator |
iterator class for access of spline packages More... | |
Public Member Functions | |
SplineInterpolatedPeaks (const std::vector< double > &pos, const std::vector< double > &intensity) | |
constructor taking two vectors (and an optional scaling factor for the m/z (or RT) step width) More... | |
SplineInterpolatedPeaks (const MSSpectrum &raw_spectrum) | |
constructor taking an MSSpectrum (and an optional scaling factor for the m/z step width) More... | |
SplineInterpolatedPeaks (const MSChromatogram &raw_chromatogram) | |
constructor taking an MSChromatogram (and an optional scaling factor for the RT step width) More... | |
~SplineInterpolatedPeaks () | |
destructor More... | |
double | getPosMin () const |
returns the minimum m/z (or RT) of the spectrum More... | |
double | getPosMax () const |
returns the maximum m/z (or RT) of the spectrum More... | |
size_t | size () const |
Get number of spline packages found during initialization. More... | |
SplineInterpolatedPeaks::Navigator | getNavigator (double scaling=0.7) |
returns an iterator for access of spline packages More... | |
Private Member Functions | |
SplineInterpolatedPeaks () | |
hide default C'tor More... | |
void | init_ (const std::vector< double > &pos, const std::vector< double > &intensity) |
section common for all constructors More... | |
Private Attributes | |
double | pos_min_ |
m/z (or RT) limits of the spectrum More... | |
double | pos_max_ |
std::vector< SplinePackage > | packages_ |
set of spline packages each interpolating in a certain m/z (or RT) range More... | |
Data structure for spline interpolation of MS1 spectra and chromatograms.
The data structure consists of a set of splines, each interpolating the MS1 spectrum (or chromatogram) in a certain m/z (or RT) range. Between these splines no raw data points exist and the intensity is identical to zero.
A spline on non-equi-distant input data is not well supported in regions without data points. Hence, a spline tends to swing wildly in these regions and cannot be used for reliable interpolation. We assume that in m/z (or RT) regions without data points, the spectrum (or chromatogram) is identical to zero.
SplineInterpolatedPeaks | ( | const std::vector< double > & | pos, |
const std::vector< double > & | intensity | ||
) |
constructor taking two vectors (and an optional scaling factor for the m/z (or RT) step width)
SplineInterpolatedPeaks | ( | const MSSpectrum & | raw_spectrum | ) |
constructor taking an MSSpectrum (and an optional scaling factor for the m/z step width)
SplineInterpolatedPeaks | ( | const MSChromatogram & | raw_chromatogram | ) |
constructor taking an MSChromatogram (and an optional scaling factor for the RT step width)
destructor
|
private |
hide default C'tor
SplineInterpolatedPeaks::Navigator getNavigator | ( | double | scaling = 0.7 | ) |
returns an iterator for access of spline packages
Will throw an exception if no packages were found during construction. Check using getSplineCount().
Make sure that the underlying SplineInterpolatedPeaks does not run out-of-scope since the Navigator relies on its data.
scaling | step width scaling parameter |
Exception::InvalidSize | if packages is empty |
Referenced by SpectraMerger::averageProfileSpectra_().
double getPosMax | ( | ) | const |
returns the maximum m/z (or RT) of the spectrum
Referenced by SpectraMerger::averageProfileSpectra_().
double getPosMin | ( | ) | const |
returns the minimum m/z (or RT) of the spectrum
Referenced by SpectraMerger::averageProfileSpectra_().
|
private |
section common for all constructors
size_t size | ( | ) | const |
Get number of spline packages found during initialization.
Note that this function should be called right after the C'tor to ensure the spectrum has some usable data to work on. In case there are no packages, a subsequent call to getNavigator() will throw an exception.
|
private |
set of spline packages each interpolating in a certain m/z (or RT) range
|
private |
|
private |
m/z (or RT) limits of the spectrum