MultiPeakFit Class Reference

#include <MultiPeakFit.h>

Inheritance diagram for MultiPeakFit:

Fit Filter GaussFit LorentzFit

List of all members.

Public Types

enum  PeakProfile { Gauss, Lorentz }

Public Member Functions

void enablePeakCurves (bool on)
virtual double eval (double *par, double x)
 Calculates the data for the output fit curve.
double evalPeak (double *par, double x, int peak)
void guessInitialValues ()
 Used by the GaussFit and LorentzFit derived classes to calculate initial values for the parameters.
 MultiPeakFit (ApplicationWindow *parent, Table *t, const QString &xCol, const QString &yCol, int startRow=0, int endRow=-1, PeakProfile profile=Gauss, int peaks=1)
 MultiPeakFit (ApplicationWindow *parent, Graph *g=0, PeakProfile profile=Gauss, int peaks=1)
int peaks ()
void setNumPeaks (int n)
void setPeakCurvesColor (int colorIndex)

Static Public Member Functions

static QStringList generateExplanationList (int order)
static QString generateFormula (int order, PeakProfile profile)
static QStringList generateParameterList (int order)

Private Member Functions

void customizeFitResults ()
 Customs and stores the fit results according to the derived class specifications. Used by exponential fits.
void generateFitCurve ()
 Adds the result curve to the plot.
void init (int)
void insertPeakFunctionCurve (double *x, double *y, int peak)
 Inserts a peak function curve into the plot.
QString logFitInfo (int iterations, int status)
 Output string added to the result log.

Static Private Member Functions

static QString peakFormula (int peakIndex, PeakProfile profile)

Private Attributes

int d_peaks
 Number of peaks.
int d_peaks_color
 Color index for the peak curves.
PeakProfile d_profile
 The peak profile.
bool generate_peak_curves
 Tells weather the peak curves should be displayed together with the best line fit.


Member Enumeration Documentation

Enumerator:
Gauss 
Lorentz 


Constructor & Destructor Documentation

MultiPeakFit::MultiPeakFit ( ApplicationWindow parent,
Graph g = 0,
PeakProfile  profile = Gauss,
int  peaks = 1 
)

References Fit::init().

MultiPeakFit::MultiPeakFit ( ApplicationWindow parent,
Table t,
const QString &  xCol,
const QString &  yCol,
int  startRow = 0,
int  endRow = -1,
PeakProfile  profile = Gauss,
int  peaks = 1 
)

References Fit::init().


Member Function Documentation

void MultiPeakFit::customizeFitResults (  )  [private, virtual]

Customs and stores the fit results according to the derived class specifications. Used by exponential fits.

Reimplemented from Fit.

References d_peaks, and Fit::d_results.

Referenced by generateFitCurve().

void MultiPeakFit::enablePeakCurves ( bool  on  )  [inline]

double MultiPeakFit::eval ( double *  ,
double   
) [virtual]

Calculates the data for the output fit curve.

Reimplemented from Fit.

References Fit::d_p, d_peaks, evalPeak(), and Filter::y().

double MultiPeakFit::evalPeak ( double *  par,
double  x,
int  peak 
)

References d_profile, and Gauss.

Referenced by eval(), and generateFitCurve().

QStringList MultiPeakFit::generateExplanationList ( int  order  )  [static]

Referenced by setNumPeaks().

void MultiPeakFit::generateFitCurve (  )  [private, virtual]

QString MultiPeakFit::generateFormula ( int  order,
PeakProfile  profile 
) [static]

References Fit::formula(), Gauss, Lorentz, and peakFormula().

Referenced by setNumPeaks().

QStringList MultiPeakFit::generateParameterList ( int  order  )  [static]

Referenced by setNumPeaks().

void MultiPeakFit::guessInitialValues (  )  [virtual]

Used by the GaussFit and LorentzFit derived classes to calculate initial values for the parameters.

Reimplemented from Fit.

References Filter::d_n, Fit::d_param_init, d_peaks, d_profile, Filter::d_x, Filter::d_y, and Lorentz.

void MultiPeakFit::init ( int  peaks  )  [private]

void MultiPeakFit::insertPeakFunctionCurve ( double *  x,
double *  y,
int  peak 
) [private]

QString MultiPeakFit::logFitInfo ( int  iterations,
int  status 
) [private, virtual]

Output string added to the result log.

Reimplemented from Fit.

References d_peaks, Filter::d_prec, d_profile, Fit::d_results, ApplicationWindow::locale(), Fit::logFitInfo(), and Lorentz.

QString MultiPeakFit::peakFormula ( int  peakIndex,
PeakProfile  profile 
) [static, private]

int MultiPeakFit::peaks (  )  [inline]

References d_peaks.

void MultiPeakFit::setNumPeaks ( int  n  ) 

void MultiPeakFit::setPeakCurvesColor ( int  colorIndex  )  [inline]


Member Data Documentation

int MultiPeakFit::d_peaks [private]

Color index for the peak curves.

Referenced by generateFitCurve(), init(), insertPeakFunctionCurve(), and setPeakCurvesColor().

Tells weather the peak curves should be displayed together with the best line fit.

Referenced by enablePeakCurves(), generateFitCurve(), and init().


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

Generated on Sun Jun 15 21:32:24 2008 for QtiPlot by  doxygen 1.5.6