libpappsomspp
Library for mass spectrometry
ralab::base::ms::SimplePeakArea< TReal > Struct Template Reference

#include <peakpickerqtof.hpp>

Public Member Functions

 SimplePeakArea (TReal integwith)
 
template<typename Tzerocross , typename Tintensity , typename Tout >
void operator() (Tzerocross beginZ, Tzerocross endZ, [[maybe_unused]] Tintensity intensity, Tintensity resmpled, Tout area) const
 intagrates the peak intesnities More...
 

Public Attributes

TReal integwith_
 

Detailed Description

template<typename TReal>
struct ralab::base::ms::SimplePeakArea< TReal >

resamples spectrum, apply smoothing, determines zero crossings, integrates peaks.

Definition at line 44 of file peakpickerqtof.hpp.

Constructor & Destructor Documentation

◆ SimplePeakArea()

template<typename TReal >
ralab::base::ms::SimplePeakArea< TReal >::SimplePeakArea ( TReal  integwith)
inline

Definition at line 47 of file peakpickerqtof.hpp.

47 :integwith_(integwith) {}

Member Function Documentation

◆ operator()()

template<typename TReal >
template<typename Tzerocross , typename Tintensity , typename Tout >
void ralab::base::ms::SimplePeakArea< TReal >::operator() ( Tzerocross  beginZ,
Tzerocross  endZ,
[[maybe_unused] ] Tintensity  intensity,
Tintensity  resmpled,
Tout  area 
) const
inline

intagrates the peak intesnities

Definition at line 51 of file peakpickerqtof.hpp.

56  {
57  typedef typename std::iterator_traits<Tout>::value_type AreaType;
58  for( ; beginZ != endZ ; ++beginZ, ++area )
59  {
60  size_t idx = static_cast<size_t>( *beginZ );
61  size_t start = static_cast<size_t>( std::round( idx - integwith_ ) );
62  size_t end = static_cast<size_t>( std::round( idx + integwith_ + 2.) );
63  AreaType aread = 0.;
64  for( ; start != end ; ++start )
65  {
66  aread += *(resmpled + start);
67  }
68  *area = aread;
69  }
70  }

References ralab::base::ms::SimplePeakArea< TReal >::integwith_.

Member Data Documentation

◆ integwith_

template<typename TReal >
TReal ralab::base::ms::SimplePeakArea< TReal >::integwith_

The documentation for this struct was generated from the following file:
ralab::base::ms::SimplePeakArea::integwith_
TReal integwith_
Definition: peakpickerqtof.hpp:45