OpenMS  2.8.0
Public Member Functions | Private Attributes | List of all members
SplineInterpolatedPeaks::Navigator Class Reference

iterator class for access of spline packages More...

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

Collaboration diagram for SplineInterpolatedPeaks::Navigator:
[legend]

Public Member Functions

 Navigator (const std::vector< SplinePackage > *packages, double posMin, double posMax, double scaling)
 constructor of iterator More...
 
 Navigator ()
 constructor (for pyOpenMS) More...
 
 ~Navigator ()
 destructor More...
 
double eval (double pos)
 returns spline interpolated intensity at this position (fast access since we can start search from lastPackage) More...
 
double getNextPos (double pos)
 returns the next sensible m/z (or RT) position for scanning through a spectrum (or chromatogram) (fast access since we can start search from lastPackage) More...
 

Private Attributes

const std::vector< SplinePackage > * packages_
 list of spline packages to be accessed More...
 
size_t last_package_
 index of spline package last accessed More...
 
double pos_min_
 m/z (or RT) limits of the spectrum (or chromatogram) More...
 
double pos_max_
 
double pos_step_width_scaling_
 scaling of the step width More...
 

Detailed Description

iterator class for access of spline packages

Constructor & Destructor Documentation

◆ Navigator() [1/2]

Navigator ( const std::vector< SplinePackage > *  packages,
double  posMin,
double  posMax,
double  scaling 
)

constructor of iterator

Parameters
scalingThe step width can be scaled by this factor. Often it is advantageous to iterate in slightly smaller steps over the spectrum (or chromatogram).

◆ Navigator() [2/2]

Navigator ( )

constructor (for pyOpenMS)

◆ ~Navigator()

~Navigator ( )

destructor

Member Function Documentation

◆ eval()

double eval ( double  pos)

returns spline interpolated intensity at this position (fast access since we can start search from lastPackage)

Referenced by SpectraMerger::averageProfileSpectra_().

◆ getNextPos()

double getNextPos ( double  pos)

returns the next sensible m/z (or RT) position for scanning through a spectrum (or chromatogram) (fast access since we can start search from lastPackage)

In the middle of a package, we increase the position by the average spacing of the input data (times a scaling factor). At the end of a package, we jump straight to the beginning of the next package.

Member Data Documentation

◆ last_package_

size_t last_package_
private

index of spline package last accessed

◆ packages_

const std::vector<SplinePackage>* packages_
private

list of spline packages to be accessed

◆ pos_max_

double pos_max_
private

◆ pos_min_

double pos_min_
private

m/z (or RT) limits of the spectrum (or chromatogram)

◆ pos_step_width_scaling_

double pos_step_width_scaling_
private

scaling of the step width

Each package stores its own step width, which is the average spacing of the input data points. This step width can be adjusted by the scaling factor. Often it is advantageous to use a step width which is somewhat smaller than the average raw data spacing.

See also
getNextPos()