ProteoWizard
Namespaces | Classes | Typedefs | Functions
ralab::base::resample Namespace Reference

Namespaces

 utilities
 

Classes

struct  Bin1D
 
struct  Bucket1D
 
struct  Convert2Dense
 
struct  DaCompFunctor
 Da Comparator - constant mass error. More...
 
struct  FTMSCompFunctor
 FTMS Comparator. More...
 
struct  PPMCompFunctor
 TODO Do checking on TReal thats a real. More...
 
struct  SamplingWith
 
struct  SquareRoot
 

Typedefs

typedef boost::int32_t int32_t
 
typedef boost::int64_t int64_t
 
typedef boost::uint32_t uint32_t
 

Functions

template<typename TMassComparator >
void breaks (double minMass, double maxMass, TMassComparator tmassComp, std::vector< double > &breaks, bool exact=false)
 Segment mass range according to Mass Compare functor could be used to histogram a dataset or to compute minima for each segment in order to perform baseline subtraction. More...
 
template<typename TInputIterator , typename TOutputIterator >
TOutputIterator getMids (TInputIterator breaksBeg, TInputIterator breaksEnd, TOutputIterator midsBeg)
 
void getMids (const std::vector< double > &breaks, std::vector< double > &mids)
 Dummy version of getMids. More...
 
double resolution2ppm (double resolution)
 

Typedef Documentation

§ int32_t

typedef boost::int32_t ralab::base::resample::int32_t

Definition at line 40 of file bin1d.hpp.

§ int64_t

typedef boost::int64_t ralab::base::resample::int64_t

Definition at line 41 of file bin1d.hpp.

§ uint32_t

typedef boost::uint32_t ralab::base::resample::uint32_t

breaks and data compute frequencies in bins

Definition at line 37 of file bucket1d.hpp.

Function Documentation

§ breaks()

template<typename TMassComparator >
void ralab::base::resample::breaks ( double  minMass,
double  maxMass,
TMassComparator  tmassComp,
std::vector< double > &  breaks,
bool  exact = false 
)

Segment mass range according to Mass Compare functor could be used to histogram a dataset or to compute minima for each segment in order to perform baseline subtraction.

Definition at line 41 of file breakspec.hpp.

Referenced by ralab::base::resample::Bucket1D::Bucket1D(), ralab::base::resample::Convert2Dense::defBreak(), and ralab::base::resample::Bucket1D::set().

48  {
49  double startMass;
50  double endMass = maxMass;
51  if(exact)
52  {
53  startMass = minMass;
54  }
55  else
56  {
57  startMass = minMass - tmassComp(minMass)/2.;
58  }
59 
60  breaks.push_back(startMass);
61  do
62  {
63  startMass = startMass + tmassComp(startMass);
64  breaks.push_back(startMass );
65  }while( startMass < endMass);
66 
67  if(exact)
68  {
69  breaks.back() = endMass;
70  }
71  }

§ getMids() [1/2]

template<typename TInputIterator , typename TOutputIterator >
TOutputIterator ralab::base::resample::getMids ( TInputIterator  breaksBeg,
TInputIterator  breaksEnd,
TOutputIterator  midsBeg 
)

Definition at line 79 of file breakspec.hpp.

Referenced by getMids(), and ralab::base::resample::Convert2Dense::getMids().

83  {
84  typedef typename std::iterator_traits<TInputIterator>::value_type TReal;
85  TReal oldval = *breaksBeg;
86  TReal divider = TReal(0.5);
87  ++breaksBeg;
88  for( ; breaksBeg != breaksEnd; ++breaksBeg, ++midsBeg )
89  {
90  TReal newval = *(breaksBeg);
91  *midsBeg = (oldval + newval)*divider;
92  oldval = newval;
93  }
94  return midsBeg;
95  }

§ getMids() [2/2]

void ralab::base::resample::getMids ( const std::vector< double > &  breaks,
std::vector< double > &  mids 
)
inline

Dummy version of getMids.

Definition at line 98 of file breakspec.hpp.

References getMids().

102  {
103  mids.resize(breaks.size()-1);
104  getMids(breaks.begin(), breaks.end(), mids.begin() );
105  }
void getMids(const std::vector< double > &breaks, std::vector< double > &mids)
Dummy version of getMids.
Definition: breakspec.hpp:98

§ resolution2ppm()

double ralab::base::resample::resolution2ppm ( double  resolution)
inline

Definition at line 42 of file masscomparefunctors.hpp.

Referenced by ralab::base::ms::PeakPicker< TReal, TIntegrator >::PeakPicker().

42  {
43  return 1/resolution * 1e6;
44  }