12#include "MantidCurveFitting/DllConfig.h"
17namespace HistogramData {
21namespace CurveFitting {
43 void setProfileParameterValues(std::map<std::string, double> parammap);
46 void setFitProfileParameter(
const std::string ¶mname,
double minvalue,
double maxvalue);
49 void setPeakHeights(
const std::vector<double> &inheights);
52 bool hasProfileParameter(
const std::string ¶mname);
56 bool isParameterValid(
double maxfwhm = DBL_MAX)
const;
59 void setPeakCentreTolerance(
double peakpostol,
double tofmin,
double tofmax);
62 void addPeaks(std::vector<std::vector<int>> peakhkls);
65 void addBackgroundFunction(
const std::string &backgroundtype,
const unsigned int &order,
66 const std::vector<std::string> &vecparnames,
const std::vector<double> &vecparvalues,
67 double startx,
double endx);
73 Mantid::HistogramData::HistogramY function(
const Mantid::HistogramData::HistogramX &xvalues,
bool calpeaks,
77 Mantid::HistogramData::HistogramY calPeak(
size_t ipk,
const std::vector<double> &xvalues,
size_t ySize)
const;
89 double getPeakParameter(
size_t index,
const std::string &parname)
const;
92 double getPeakParameter(std::vector<int> hkl,
const std::string &parname)
const;
95 void fixPeakParameter(
const std::string ¶mname,
double paramvalue);
98 void fixBackgroundParameters();
101 void setFixPeakHeights();
104 bool calculatePeaksIntensities(
const std::vector<double> &vecX,
const std::vector<double> &vecY,
105 std::vector<double> &vec_summedpeaks);
108 double getPeakMaximumValue(std::vector<int> hkl,
const std::vector<double> &xvalues,
size_t &ix);
113 double peakheight,
bool setpeakheight);
119 void calculatePeakParameterValues()
const;
125 bool calculateGroupPeakIntensities(std::vector<std::pair<double, API::IPowderDiffPeakFunction_sptr>> peakgroup,
126 const std::vector<double> &vecX,
const std::vector<double> &vecY,
127 std::vector<double> &vec_summedpeaks);
130 void groupPeaks(std::vector<std::vector<std::pair<double, API::IPowderDiffPeakFunction_sptr>>> &peakgroupvec,
131 std::vector<API::IPowderDiffPeakFunction_sptr> &outboundpeakvec,
double xmin,
double xmax);
148 std::vector<std::pair<double, API::IPowderDiffPeakFunction_sptr>>
m_dspPeakVec;
std::map< DeltaEMode::Type, std::string > index
LeBailFunction : LeBailFunction is to calculate peak intensities in a composite function including ne...
bool m_isInputValue
Has first value set up.
size_t getNumberOfPeaks() const
Get number of peaks.
std::vector< std::string > m_peakParameterNameVec
Name of peak parameter names (be same as the order in IPowderDiffPeakFunction)
void calPeaksParameters()
Force to make all peaks to calculate peak parameters.
size_t m_numPeaks
Number of peaks.
std::vector< std::pair< double, API::IPowderDiffPeakFunction_sptr > > m_dspPeakVec
Vector of pair <peak position in d-space, Peak> sortable.
virtual ~LeBailFunction()
Destructor.
double m_maxTOFPeakCentre
double m_minTOFPeakCentre
Functions::BackgroundFunction_sptr m_background
Background function.
bool m_hasNewPeakValue
Has new peak values.
std::vector< API::IPowderDiffPeakFunction_sptr > m_vecPeaks
Vector of all peaks.
std::vector< double > heights
API::CompositeFunction_sptr m_compsiteFunction
Composite functions for all peaks and background.
std::vector< std::string > m_orderedProfileParameterNames
Ordered profile parameter names for search.
std::map< std::vector< int >, API::IPowderDiffPeakFunction_sptr > m_mapHKLPeak
Vector of all peak's Miller indexes.
std::map< std::string, double > m_functionParameters
Parameters.
std::string m_peakType
Peak type.
std::shared_ptr< IPowderDiffPeakFunction > IPowderDiffPeakFunction_sptr
std::shared_ptr< IFunction > IFunction_sptr
shared pointer to the function base class
std::shared_ptr< CompositeFunction > CompositeFunction_sptr
shared pointer to the composite function base class
std::shared_ptr< LeBailFunction > LeBailFunction_sptr
std::shared_ptr< BackgroundFunction > BackgroundFunction_sptr
Helper class which provides the Collimation Length for SANS instruments.