Mass++ Common Libraries v2.7.5
 All Classes Namespaces Files Functions Variables Enumerations Macros
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
kome::objects::AveragedSpectrum Class Reference

averaged spectrum class More...

#include <AveragedSpectrum.h>

Inheritance diagram for kome::objects::AveragedSpectrum:
Inheritance graph
[legend]
Collaboration diagram for kome::objects::AveragedSpectrum:
Collaboration graph
[legend]

Public Member Functions

 AveragedSpectrum (DataGroupNode *group)
 constructor More...
 
virtual ~AveragedSpectrum ()
 destructor
 
void addSpectrum (Spectrum *spectrum)
 add spectrum to array More...
 
unsigned int getNumberOfSpectra ()
 gets the number of spectra More...
 
SpectrumgetSpectrum (const unsigned int idx)
 gets spectrum More...
 
void setMergeDistance (const double d)
 sets the merge disntace More...
 
double getMergeDistance ()
 gets the merge distance More...
 
- Public Member Functions inherited from kome::objects::Spectrum
 Spectrum (Sample *sample, const char *name)
 constructor More...
 
virtual ~Spectrum ()
 destructor
 
void setId (int id)
 sets spectrum id More...
 
int getId ()
 gets spectrum id More...
 
void setOperationFlag (const bool op)
 sets the operation flag value More...
 
bool getOperationFlag ()
 gets the operation flag value More...
 
SamplegetSample ()
 gets the sample that has this spectrum More...
 
void setName (const char *name)
 sets spectrum name More...
 
const char * getName ()
 gets spectrum name More...
 
void setRt (const double rt)
 sets retention time More...
 
void setRt (const double startRt, const double endRt)
 gets retention time More...
 
void setStartRt (const double rt)
 sets start retention time More...
 
void setEndRt (const double rt)
 sets end retention time More...
 
double getRt ()
 gets retention time More...
 
double getStartRt ()
 gets the start of retention time More...
 
double getEndRt ()
 gets the end of retention time More...
 
void setSpecType (const char *type)
 sets spectrum type More...
 
const char * getSpecType ()
 gets spectrum type More...
 
void setTitle (const char *title)
 sets spectrum title More...
 
const char * getTitle ()
 gets spectrum title More...
 
void setIcon (const char *icon)
 sets icon name More...
 
const char * getIcon ()
 gets icon name More...
 
kome::core::XYDatagetXYData ()
 gets xy data from data manager More...
 
void deleteXYData ()
 deletes xy data of data manager
 
void getXYData (kome::core::XYData *const xyData, const bool op)
 gets data points More...
 
void getXYData (kome::core::XYData *const xyData, const double minX, const double maxX, const bool zero)
 gets data points that spectrum has More...
 
void setXRange (const double minX, const double maxX)
 sets x range More...
 
void setMinX (const double minX)
 sets min x More...
 
double getMinX ()
 gets min x More...
 
void setMaxX (const double maxX)
 sets max x More...
 
double getMaxX ()
 gets max x More...
 
void setTotalIntensity (const double intensity)
 sets total intensity of spectrum More...
 
double getTotalIntensity (const double minX=-1.0, const double maxX=-1.0)
 gets total intensity in specified range More...
 
void setMaxIntensity (const double intensity)
 sets max intensity of spectrum More...
 
double getMaxIntensity (const double minX=-1.0, const double maxX=-1.0)
 gets max intensity in specified range More...
 
void setBasePeakMass (const double mass)
 sets base peak mass More...
 
double getBasePeakMass ()
 gets base peak mass More...
 
void setMsStage (const int stage)
 sets ms stage More...
 
int getMsStage ()
 gets ms stage More...
 
void setPrecursor (const int stage, const double precursor)
 sets precursor More...
 
void setPrecursor (const double precursor)
 sets precursor More...
 
double getPrecursor (const int stage)
 gets precursor More...
 
double getPrecursor ()
 gets the precursor mass of precursor ion spectrum. More...
 
void setPrecursorIntensity (const int stage, const double intensity)
 sets precursor intensity More...
 
void setPrecursorIntensity (const double intensity)
 sets precursor intensity More...
 
double getPrecursorIntensity (const int stage)
 gets the precursor intensity More...
 
double getPrecursorIntensity ()
 gets the precursor intensity of the precursor ion spectrum. More...
 
void setPrecursorCharge (const int charge)
 sets the precursor charge More...
 
int getPrecursorCharge ()
 gets the precursor charge More...
 
void setParentSpectrum (Spectrum *const parent)
 sets parent spectrum More...
 
SpectrumgetParentSpectrum ()
 gets parent spectrum More...
 
void getChildSpectra (std::vector< Spectrum * > &children)
 gets child spectra More...
 
void setHasChromatogram (const bool chromatogram)
 sets wheher this spectrum has chromatogram More...
 
bool hasChromatogram ()
 judges whether this spectrum has chromatogram More...
 
void setGroup (DataGroupNode *group)
 sets spectrum group More...
 
DataGroupNodegetGroup ()
 gets spectrum group More...
 
void setScanNumber (const int scan)
 sets scan number More...
 
int getScanNumber ()
 gets scan number More...
 
void setPolarity (Polarity polarity)
 sets polarity More...
 
Polarity getPolarity ()
 gets polarity More...
 
void setCentroidMode (const bool centroidMode)
 sets centroid mode or not More...
 
bool isCentroidMode ()
 judget wheter this spectrum is centroid mode More...
 
void setResolution (const double resolution)
 sets resolution More...
 
double getResolution ()
 gets resolution More...
 
void setCollisionEnergy (const char *collisionEnergy)
 sets the collision energy More...
 
const char * getCollisionEnergy ()
 gets the collision energy More...
 
void setVisible (const bool visible)
 sets the visible flag More...
 
bool isVisible ()
 gets the visible flag value More...
 
void setAutoZeroPoints (const bool autoZero)
 sets auto zero points flag value More...
 
bool isAutoZeroPoints ()
 gets auto zero points flag value More...
 
kome::core::PropertiesgetProperties ()
 gets properties More...
 
kome::core::PropertiesgetUserProperties ()
 gets user properties More...
 
void setOrgSpectrum (Spectrum *spec)
 sets original spectrum More...
 
SpectrumgetOrgSpectrum ()
 gets original spectrum More...
 
void getProperties (kome::core::Properties &properties)
 gets spectrum and spectrum group properties More...
 
void getUserProperties (kome::core::Properties &userProperties)
 gets spectrum and spectrum group user properties More...
 
void setSpotId (const char *pcSpotId)
 set spot id param[in] pcSpotId SpotId information
 
const char * getSpotId (void)
 get spot id More...
 
void setRequestLoadData (void)
 set the flag of request load data More...
 
void resetRequestLoadData (void)
 
bool isRequestLoadData (void)
 check the flag of request load data More...
 
void setFirstAccess (void)
 set the flag of first access
 
void resetFirstAccess (void)
 reset the flag of first access
 
bool isFirstAccess (void)
 check the flag of first access More...
 
bool loadData (void)
 load data More...
 

Static Public Member Functions

static void getAveragedDataPoints (kome::objects::Spectrum **spectra, const unsigned int num, kome::core::XYData &xyData)
 gets the averaged data points More...
 
static void mergeDataPoints (kome::core::XYData &src0, kome::core::XYData &src1, kome::core::XYData &dst)
 merges data points More...
 
- Static Public Member Functions inherited from kome::objects::Spectrum
static bool isCommonProperty (const char *key)
 check whther the specified property key is common property or not More...
 

Protected Member Functions

void updateTitle ()
 update title
 
virtual void onGetXYData (kome::core::XYData *const xyData, const double minX, const double maxX)
 This method is called by getXYData method. (override method) More...
 
virtual void onGetXRange (double *minX, double *maxX)
 This method is called by getMinX or getMaxX method. (override method) More...
 
virtual double onGetTotalIntensity (const double minX, const double maxX)
 This method is called by getTotalIntensity method. (override method) More...
 
virtual double onGetMaxIntensity (const double minX, const double maxX)
 This method is called by getMaxIntensity method. (override method) More...
 
- Protected Member Functions inherited from kome::objects::Spectrum
virtual void onSetRequestLoadData (void)
 This method is called by setRequestLoadData method. (abstract method)
 
virtual void onResetRequestLoadData (void)
 This method is called by resetRequestLoadData method. (abstract method)
 
virtual bool onIsRequestLoadData (void)
 This method is called by isRequestLoadData method. (abstract method) More...
 
virtual void onSetFirstAccess (void)
 This method is called by setFirstAccess method. (abstract method)
 
virtual void onResetFirstAccess (void)
 This method is called by resetFirstAccess method. (abstract method)
 
virtual bool onIsFirstAccess (void)
 This method is called by isFirstAccess method. (abstract method) More...
 
virtual bool onLoadData (void)
 This method is called by loadData method. (abstract method) More...
 
bool firstAccessProcess (void)
 method for processing when accessing the first item of this class More...
 

Protected Attributes

std::vector< Spectrum * > m_spectra
 
double m_d
 
- Protected Attributes inherited from kome::objects::Spectrum
Spectrumm_orgSpec
 
bool m_op
 
int m_specId
 

Additional Inherited Members

- Public Types inherited from kome::objects::Spectrum
enum  Polarity { POLARITY_UNKNOWN = 0, POLARITY_POSITIVE = 1, POLARITY_NEGATIVE = 2 }
 polarity definition
 
- Static Protected Attributes inherited from kome::objects::Spectrum
static std::vector< std::string > m_commonProps
 

Detailed Description

averaged spectrum class

Definition at line 29 of file AveragedSpectrum.h.

Constructor & Destructor Documentation

kome::objects::AveragedSpectrum::AveragedSpectrum ( DataGroupNode group)

constructor

Parameters
[in]groupspectrum group object that has this spectrum

Definition at line 35 of file AveragedSpectrum.cpp.

36  : Spectrum( ( group == NULL ? NULL : group->getSample() ), "" ) {
37  m_d = 0.05;
38  setGroup( group );
39 }
Spectrum(Sample *sample, const char *name)
constructor
Definition: Spectrum.cpp:42
#define NULL
Definition: CoreMacros.h:18
Sample * getSample()
gets sample
Definition: DataSet.cpp:49
void setGroup(DataGroupNode *group)
sets spectrum group
Definition: Spectrum.cpp:893

Here is the call graph for this function:

Member Function Documentation

void kome::objects::AveragedSpectrum::addSpectrum ( Spectrum spectrum)

add spectrum to array

Parameters
[in]spectrumspectrum object to be added

Definition at line 46 of file AveragedSpectrum.cpp.

46  {
47  // update stage
48  if( m_spectra.size() == 0 ) {
49  setMsStage( spectrum->getMsStage() );
50  }
51  else if( spectrum->getMsStage() != getMsStage() ) {
52  setMsStage( -1 );
53  }
54 
55  // update RT
56  double startRt = getStartRt();
57  if( spectrum->getStartRt() >= 0.0
58  && ( spectrum->getStartRt() < startRt || startRt < 0.0 ) ) {
59  setStartRt( spectrum->getStartRt() );
60  }
61  double endRt = getEndRt();
62  if( spectrum->getEndRt() >= 0.0
63  && ( spectrum->getEndRt() > endRt || endRt < 0.0 ) ) {
64  setEndRt( spectrum->getEndRt() );
65  }
66 
67  // TIC, BPC, BPI
68  if( m_spectra.size() == 0 ) {
69  setTotalIntensity( spectrum->getTotalIntensity() );
70  setMaxIntensity( spectrum->getMaxIntensity() );
71  setBasePeakMass( spectrum->getBasePeakMass() );
72  }
73  else {
74  // TIC
75  double tic = getTotalIntensity() * (double)m_spectra.size();
76  tic += spectrum->getTotalIntensity();
77  tic /= (double)( m_spectra.size() + 1 );
78  setTotalIntensity( tic );
79 
80  // BPC, BPI
81  if( spectrum->getMaxIntensity() > getMaxIntensity() ) {
82  setMaxIntensity( spectrum->getMaxIntensity() );
83  setBasePeakMass( spectrum->getBasePeakMass() );
84  }
85  }
86 
87  // precursor
88  double precursor = 0.0;
89  int precCnt = 0;
90  for( unsigned int i = 0; i < m_spectra.size(); i++ ) {
91  double tmpPrec = m_spectra[ i ]->getPrecursor();
92  if( tmpPrec > 0.0 ) {
93  precursor += tmpPrec;
94  precCnt++;
95  }
96  }
97  if( precCnt > 0 ) {
98  precursor /= (double)precCnt;
99  setPrecursor( precursor );
100  }
101 
102  // add spectrum to array
103  m_spectra.push_back( spectrum );
104 
105  // update title @date 2011.02.07 <Add> M.Izumi
106  updateTitle();
107 }
double getStartRt()
gets the start of retention time
Definition: Spectrum.cpp:191
void setTotalIntensity(const double intensity)
sets total intensity of spectrum
Definition: Spectrum.cpp:505
void setMaxIntensity(const double intensity)
sets max intensity of spectrum
Definition: Spectrum.cpp:537
std::vector< Spectrum * > m_spectra
void setPrecursor(const int stage, const double precursor)
sets precursor
Definition: Spectrum.cpp:640
void setEndRt(const double rt)
sets end retention time
Definition: Spectrum.cpp:172
int getMsStage()
gets ms stage
Definition: Spectrum.cpp:634
double getTotalIntensity(const double minX=-1.0, const double maxX=-1.0)
gets total intensity in specified range
Definition: Spectrum.cpp:516
void setMsStage(const int stage)
sets ms stage
Definition: Spectrum.cpp:587
void setStartRt(const double rt)
sets start retention time
Definition: Spectrum.cpp:160
void setBasePeakMass(const double mass)
sets base peak mass
Definition: Spectrum.cpp:569
double getEndRt()
gets the end of retention time
Definition: Spectrum.cpp:197
double getMaxIntensity(const double minX=-1.0, const double maxX=-1.0)
gets max intensity in specified range
Definition: Spectrum.cpp:548
double getBasePeakMass()
gets base peak mass
Definition: Spectrum.cpp:581

Here is the call graph for this function:

static void kome::objects::AveragedSpectrum::getAveragedDataPoints ( kome::objects::Spectrum **  spectra,
const unsigned int  num,
kome::core::XYData xyData 
)
static

gets the averaged data points

Parameters
[in]spectrathe array of spectra
[in]numthe spectrum array size
[out]xyDatathe object to store data points.

Definition at line 234 of file AveragedSpectrum.cpp.

234  {
235  // check parameters
236  if( spectra == NULL || num == 0 ) {
237  return;
238  }
239 
240  // get data points
241  if( num == 1 ) {
242  spectra[ 0 ]->getXYData( &xyData, -1.0, -1.0, false );
243  }
244  else {
245  unsigned int mid = num / 2;
246 
248  getAveragedDataPoints( spectra, mid, dps0 );
249 
251  getAveragedDataPoints( spectra + mid, num - mid, dps1 );
252 
253  mergeDataPoints( dps0, dps1, xyData );
254  }
255 }
static void mergeDataPoints(kome::core::XYData &src0, kome::core::XYData &src1, kome::core::XYData &dst)
merges data points
data points data of profile management class
Definition: DataPoints.h:25
static void getAveragedDataPoints(kome::objects::Spectrum **spectra, const unsigned int num, kome::core::XYData &xyData)
gets the averaged data points
#define NULL
Definition: CoreMacros.h:18
kome::core::XYData * getXYData()
gets xy data from data manager
Definition: Spectrum.cpp:279

Here is the call graph for this function:

double kome::objects::AveragedSpectrum::getMergeDistance ( )

gets the merge distance

Returns
merge distance

Definition at line 128 of file AveragedSpectrum.cpp.

128  {
129  return m_d;
130 }
unsigned int kome::objects::AveragedSpectrum::getNumberOfSpectra ( )

gets the number of spectra

Returns
the number of spectra

Definition at line 110 of file AveragedSpectrum.cpp.

110  {
111  return m_spectra.size();
112 }
std::vector< Spectrum * > m_spectra
Spectrum * kome::objects::AveragedSpectrum::getSpectrum ( const unsigned int  idx)

gets spectrum

Parameters
[in]idxspectrum index
Returns
spectrum (If NULL, the index is illegal.)

Definition at line 115 of file AveragedSpectrum.cpp.

115  {
116  if( idx >= m_spectra.size() ) {
117  return NULL;
118  }
119  return m_spectra[ idx ];
120 }
std::vector< Spectrum * > m_spectra
#define NULL
Definition: CoreMacros.h:18
static void kome::objects::AveragedSpectrum::mergeDataPoints ( kome::core::XYData src0,
kome::core::XYData src1,
kome::core::XYData dst 
)
static

merges data points

Parameters
[in]src0source data points
[in]src1source data points
[out]dstthe object to store merged data points

Definition at line 258 of file AveragedSpectrum.cpp.

258  {
259  // points
260  class Point {
261  public:
262  Point() {};
263  virtual ~Point() {};
264  public:
265  double x;
266  double y;
267  int spec;
268  public:
269  static bool lessPoint( Point& p0, Point& p1 ) {
270  return ( p0.x < p1.x );
271  };
272  };
273  std::vector< Point > points;
274 
275  double d = 0.05;
276  double prevX = -1.0;
277 
278  // first data points
279  const unsigned int len0 = src0.getLength();
280  for( unsigned int i = 0; i < len0; i++ ) {
281  const double x = src0.getX( i );
282  const double y = src0.getY( i );
283  if( y > 0.0 ) {
284  points.resize( points.size() + 1 );
285  points.back().x = x;
286  points.back().y = y;
287  points.back().spec = 0;
288 
289  if( prevX > 0.0 ) {
290  double tmpD = fabs( x - prevX );
291  if( tmpD < d ) {
292  d = tmpD;
293  }
294  }
295  prevX = x;
296  }
297  }
298 
299  // second data points
300  const unsigned int len1 = src1.getLength();
301  for( unsigned int i = 0; i < len1; i++ ) {
302  const double x = src1.getX( i );
303  const double y = src1.getY( i );
304  if( y > 0.0 ) {
305  points.resize( points.size() + 1 );
306  points.back().x = x;
307  points.back().y = y;
308  points.back().spec = 1;
309 
310  if( prevX > 0.0 ) {
311  double tmpD = fabs( x - prevX );
312  if( tmpD < d ) {
313  d = tmpD;
314  }
315  }
316  prevX = x;
317  }
318  }
319 
320  // sort
321  std::sort( points.begin(), points.end(), Point::lessPoint );
322 
323  // add point
324  std::set< int > specSet;
325  double sumX = 0.0;
326  double sumY = 0.0;
327  for( unsigned int i = 0; i < points.size(); i++ ) {
328  const double x = points[ i ].x;
329  const double y = points[ i ].y;
330  const int spec = points[ i ].spec;
331 
332  if( !specSet.empty() ) {
333  double tmpX = sumX / sumY;
334  if( specSet.find( spec ) != specSet.end() || tmpX + d < x ) {
335  double tmpY = sumY;
336  dst.addPoint( tmpX, tmpY );
337  specSet.clear();
338  }
339  }
340 
341  if( specSet.empty() ) {
342  sumX = x * y;
343  sumY = y;
344  }
345  else {
346  sumX = sumX + x * y;
347  sumY = sumY + y;
348  }
349 
350  specSet.insert( spec );
351  }
352 
353  if( !specSet.empty() ) {
354  double tmpX = sumX / sumY;
355  double tmpY = sumY;
356  dst.addPoint( tmpX, tmpY );
357  }
358 }
double getX(const unsigned int index)
gets x coordinate
Definition: XYData.cpp:224
double getY(const unsigned int index)
gets y coordinate
Definition: XYData.cpp:243
void addPoint(const double x, const double y)
adds point
Definition: XYData.cpp:149
unsigned int getLength()
gets the number of points @return the number of points
Definition: XYData.cpp:216

Here is the call graph for this function:

double kome::objects::AveragedSpectrum::onGetMaxIntensity ( const double  minX,
const double  maxX 
)
protectedvirtual

This method is called by getMaxIntensity method. (override method)

Parameters
[in]minXminimum x of range (If minX is negative number, minimum x value is unbounded.)
[in]maxXmaximum x of range (If maxX is negative number, maximum x value is unbounded.)
Returns
max intensity

Implements kome::objects::Spectrum.

Definition at line 220 of file AveragedSpectrum.cpp.

220  {
221  // get max intensity
222  double intensity = 0.0;
223  for( unsigned int i = 0; i < m_spectra.size(); i++ ) {
224  double y = m_spectra[ i ]->getMaxIntensity( minX, maxX );
225  if( y > intensity ) {
226  intensity = y;
227  }
228  }
229 
230  return intensity;
231 }
std::vector< Spectrum * > m_spectra
double kome::objects::AveragedSpectrum::onGetTotalIntensity ( const double  minX,
const double  maxX 
)
protectedvirtual

This method is called by getTotalIntensity method. (override method)

Parameters
[in]minXminimum x of range (If minX is negative number, minimum x value is unbounded.)
[in]maxXmaximum x of range (If maxX is negative number, maximum x value is unbounded.)
Returns
total intensity

Implements kome::objects::Spectrum.

Definition at line 208 of file AveragedSpectrum.cpp.

208  {
209  // get total intensity
210  double intensity = 0.0;
211  for( unsigned int i = 0; i < m_spectra.size(); i++ ) {
212  intensity += m_spectra[ i ]->getTotalIntensity( minX, maxX );
213  }
214  intensity /= (double)m_spectra.size();
215 
216  return intensity;
217 }
std::vector< Spectrum * > m_spectra
void kome::objects::AveragedSpectrum::onGetXRange ( double *  minX,
double *  maxX 
)
protectedvirtual

This method is called by getMinX or getMaxX method. (override method)

Parameters
[out]minXthe pointer to store minimum x value
[out]maxXthe pointer to store maximum x value

Implements kome::objects::Spectrum.

Definition at line 184 of file AveragedSpectrum.cpp.

184  {
185  double minXX = double();
186  double maxXX = double();
187 
188  // get x range
189  if( m_spectra.size() > 0 ) {
190  minXX = m_spectra[ 0 ]->getMinX();
191  maxXX = m_spectra[ 0 ]->getMaxX();
192 
193  for( unsigned int i = 1; i < m_spectra.size(); i++ ) {
194  double tmpMinX = m_spectra[ i ]->getMinX();
195  double tmpMaxX = m_spectra[ i ]->getMaxX();
196 
197  minXX = MIN( minXX, tmpMinX );
198  maxXX = MAX( maxXX, tmpMaxX );
199  }
200  }
201 
202  // store
203  *minX = minXX;
204  *maxX = maxXX;
205 }
std::vector< Spectrum * > m_spectra
#define MIN(x, y)
Definition: CoreMacros.h:30
#define MAX(x, y)
Definition: CoreMacros.h:27
void kome::objects::AveragedSpectrum::onGetXYData ( kome::core::XYData *const  xyData,
const double  minX,
const double  maxX 
)
protectedvirtual

This method is called by getXYData method. (override method)

Parameters
[out]xyDatathe object to store data points
[in]minXminimum x value. (If minX is negative number, minimum x value is not unbounded.)
[in]maxXmaximum x value. (If maxX is negative number, maximum x value is not unbounded.)

Implements kome::objects::Spectrum.

Definition at line 147 of file AveragedSpectrum.cpp.

151  {
152  // check spectra
153  if( m_spectra.size() == 0 ) {
154  return;
155  }
156 
157  bool isProfile = false;;
158  for( unsigned int i = 0; i < m_spectra.size() && !isProfile; i++ ) {
159  if( !m_spectra[ i ]->isCentroidMode() ) {
160  isProfile = true;
161  }
162  }
163 
164  setCentroidMode( !isProfile );
165 
166 
167  // data points
169  if( m_spectra.size() > 0 ) {
170  getAveragedDataPoints( &( m_spectra[ 0 ] ), m_spectra.size(), dps );
171 
172  for( unsigned int i = 0; i < dps.getLength(); i++ ) {
173  const double x = dps.getX( i );
174  const double y = dps.getY( i ) / (double)m_spectra.size();
175 
176  if( ( minX < 0.0 || x >= minX ) && ( maxX < 0.0 || x <= maxX ) ) {
177  xyData->addPoint( x, y );
178  }
179  }
180  }
181 }
data points data of profile management class
Definition: DataPoints.h:25
std::vector< Spectrum * > m_spectra
static void getAveragedDataPoints(kome::objects::Spectrum **spectra, const unsigned int num, kome::core::XYData &xyData)
gets the averaged data points
double getX(const unsigned int index)
gets x coordinate
Definition: XYData.cpp:224
void setCentroidMode(const bool centroidMode)
sets centroid mode or not
Definition: Spectrum.cpp:935
double getY(const unsigned int index)
gets y coordinate
Definition: XYData.cpp:243
void addPoint(const double x, const double y)
adds point
Definition: XYData.cpp:149
bool isCentroidMode()
judget wheter this spectrum is centroid mode
Definition: Spectrum.cpp:941
unsigned int getLength()
gets the number of points @return the number of points
Definition: XYData.cpp:216

Here is the call graph for this function:

void kome::objects::AveragedSpectrum::setMergeDistance ( const double  d)

sets the merge disntace

Parameters
[in]dmerge disntance

Definition at line 123 of file AveragedSpectrum.cpp.

123  {
124  m_d = std::max( d, 0.0 );
125 }

Member Data Documentation

double kome::objects::AveragedSpectrum::m_d
protected

merge distance

Definition at line 49 of file AveragedSpectrum.h.

std::vector< Spectrum* > kome::objects::AveragedSpectrum::m_spectra
protected

the array of spectra

Definition at line 46 of file AveragedSpectrum.h.


The documentation for this class was generated from the following files: