Skip to content

Commit

Permalink
Improve FindPeaks. Refs #7001.
Browse files Browse the repository at this point in the history
  • Loading branch information
wdzhou committed May 30, 2013
1 parent a9d4cf9 commit 227f891
Show file tree
Hide file tree
Showing 4 changed files with 233 additions and 71 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ class DLLExport FindPeaks : public API::Algorithm
const double& in_bg0, const double& in_bg1, const double& in_bg2);

void addInfoRow(const size_t spectrum, const std::vector<double> &params, const std::vector<double> &paramsRaw, const double mincost, bool error);

/// Add the fit record (failure) to output workspace
void addNonFitRecord(const size_t spectrum);

void updateFitResults(API::IAlgorithm_sptr fitAlg, std::vector<double> &bestEffparams, std::vector<double> &bestRawparams, double &mincost, const double expPeakPos, const double expPeakHeight);

API::IFunction_sptr createFunction(const double height, const double centre, const double sigma, const double a0, const double a1, const double a2, const bool withPeak = true);
Expand All @@ -146,7 +150,7 @@ class DLLExport FindPeaks : public API::Algorithm
PeakFittingRecord multiFitPeakBackground(API::MatrixWorkspace_sptr purepeakws, size_t purepeakindex,
API::MatrixWorkspace_sptr dataws, size_t datawsindex,
API::IPeakFunction_sptr peak,
double in_centre, double in_height, std::vector<double> in_sigmas,
double in_centre, double in_height, std::vector<double> in_fwhms,
double peakleftboundary, double peakrightboundary);

/// Set parameters values to a peak function
Expand Down Expand Up @@ -208,8 +212,8 @@ class DLLExport FindPeaks : public API::Algorithm
API::IFunction_sptr m_backgroundFunction;
API::IFunction_sptr m_peakAndBackgroundFunction;

size_t minGuessedPeakWidth;
size_t maxGuessedPeakWidth;
size_t m_minGuessedPeakWidth;
size_t m_maxGuessedPeakWidth;
size_t stepGuessedPeakWidth;

bool m_usePeakPositionTolerance;
Expand Down

0 comments on commit 227f891

Please sign in to comment.