Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
SplineSpectrum Class Reference

Data structure for spline interpolation of MS1 spectra. More...

#include <OpenMS/FILTERING/DATAREDUCTION/SplineSpectrum.h>

Classes

class  Navigator
 iterator class for access of spline packages More...
 

Public Member Functions

 SplineSpectrum (const std::vector< double > &mz, const std::vector< double > &intensity)
 constructor taking two vectors (and an optional scaling factor for the m/z step width) More...
 
 SplineSpectrum (const std::vector< double > &mz, const std::vector< double > &intensity, double scaling)
 
 SplineSpectrum (MSSpectrum &raw_spectrum)
 constructor taking an MSSpectrum (and an optional scaling factor for the m/z step width) More...
 
 SplineSpectrum (MSSpectrum &raw_spectrum, double scaling)
 
 ~SplineSpectrum ()
 destructor More...
 
double getMzMin () const
 returns the minimum m/z of the spectrum More...
 
double getMzMax () const
 returns the maximum m/z of the spectrum More...
 
size_t getSplineCount () const
 
SplineSpectrum::Navigator getNavigator ()
 returns an iterator for access of spline packages More...
 

Private Member Functions

 SplineSpectrum ()
 hide default C'tor More...
 
void init_ (const std::vector< double > &mz, const std::vector< double > &intensity, double scaling)
 section common for all constructors More...
 

Private Attributes

double mz_min_
 m/z limits of the spectrum More...
 
double mz_max_
 
std::vector< SplinePackagepackages_
 set of spline packages each interpolating in a certain m/z range More...
 

Detailed Description

Data structure for spline interpolation of MS1 spectra.

The data structure consists of a set of splines, each interpolating the MS1 spectrum in a certain m/z range. Between these splines no raw data points exist and the spectrum intensity is identical to zero.

See also
SplinePackage
MSSpectrum

Constructor & Destructor Documentation

◆ SplineSpectrum() [1/5]

SplineSpectrum ( const std::vector< double > &  mz,
const std::vector< double > &  intensity 
)

constructor taking two vectors (and an optional scaling factor for the m/z step width)

Note
Vectors are assumed to be sorted by m/z!

◆ SplineSpectrum() [2/5]

SplineSpectrum ( const std::vector< double > &  mz,
const std::vector< double > &  intensity,
double  scaling 
)

◆ SplineSpectrum() [3/5]

SplineSpectrum ( MSSpectrum raw_spectrum)

constructor taking an MSSpectrum (and an optional scaling factor for the m/z step width)

◆ SplineSpectrum() [4/5]

SplineSpectrum ( MSSpectrum raw_spectrum,
double  scaling 
)

◆ ~SplineSpectrum()

destructor

◆ SplineSpectrum() [5/5]

SplineSpectrum ( )
private

hide default C'tor

Member Function Documentation

◆ getMzMax()

double getMzMax ( ) const

returns the maximum m/z of the spectrum

Referenced by SpectraMerger::averageProfileSpectra_().

◆ getMzMin()

double getMzMin ( ) const

returns the minimum m/z of the spectrum

Referenced by SpectraMerger::averageProfileSpectra_().

◆ getNavigator()

SplineSpectrum::Navigator getNavigator ( )

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 SplineSpectrum does not run out-of-scope since the Navigator relies on its data.

Exceptions
Exception::InvalidSizeif packages is empty

Referenced by SpectraMerger::averageProfileSpectra_().

◆ getSplineCount()

size_t getSplineCount ( ) 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.

◆ init_()

void init_ ( const std::vector< double > &  mz,
const std::vector< double > &  intensity,
double  scaling 
)
private

section common for all constructors

Member Data Documentation

◆ mz_max_

double mz_max_
private

◆ mz_min_

double mz_min_
private

m/z limits of the spectrum

◆ packages_

std::vector<SplinePackage> packages_
private

set of spline packages each interpolating in a certain m/z range


OpenMS / TOPP release 2.3.0 Documentation generated on Tue Jan 9 2018 18:22:13 using doxygen 1.8.13