Mantid
|
#include <ConvolutionFunctionModel.h>
Public Member Functions | |
boost::optional< QString > | backgroundPrefix () const |
boost::optional< QString > | convolutionPrefix () const |
boost::optional< QString > | deltaFunctionPrefix () const |
boost::optional< QString > | fitTypePrefix () const |
boost::optional< QStringList > | peakPrefixes () const |
std::string | resolutionWorkspace () const |
int | resolutionWorkspaceIndex () const |
void | setFunction (IFunction_sptr) override |
void | setModel (const std::string &background, const std::string &workspace, int workspaceIndex, const std::string &peaks, bool hasDeltaFunction) |
void | setModel (const std::string &background, const std::vector< std::pair< std::string, size_t > > &resolutionWorkspaces, const std::string &lorentzianPeaks, const std::string &fitType, bool hasDeltaFunction, const std::vector< double > &qValues, const bool isQDependent, bool hasTempCorrection, double tempValue) |
boost::optional< QString > | tempFunctionPrefix () const |
Public Member Functions inherited from MantidQt::MantidWidgets::FunctionModel | |
void | addConstraint (const QString &functionIndex, const QString &constraint) override |
void | addDatasets (const QStringList &datasetNames) |
Adds datasets based on their workspace names. More... | |
void | addFunction (const QString &prefix, const QString &funStr) override |
void | changeTie (const QString &parName, const QString &tie) override |
int | currentDomainIndex () const override |
IFunction::Attribute | getAttribute (const QString &attrName) const |
QStringList | getAttributeNames () const |
IFunction_sptr | getCurrentFunction () const override |
QStringList | getDatasetDomainNames () const override |
Returns names for the domains of each dataset. More... | |
QStringList | getDatasetNames () const override |
Returns the workspace names of the datasets. More... | |
IFunction_sptr | getFitFunction () const override |
QStringList | getGlobalParameters () const override |
QString | getLocalParameterConstraint (const QString &parName, int i) const override |
QStringList | getLocalParameters () const override |
QString | getLocalParameterTie (const QString &parName, int i) const override |
double | getLocalParameterValue (const QString &parName, int i) const override |
int | getNumberDomains () const override |
double | getParameter (const QString ¶mName) const override |
QString | getParameterDescription (const QString ¶mName) const override |
double | getParameterError (const QString ¶mName) const override |
QStringList | getParameterNames () const override |
QString | getParameterTie (const QString &parName) const |
IFunction_sptr | getSingleFunction (int index) const override |
bool | hasFunction () const override |
bool | isGlobal (const QString &parName) const override |
bool | isLocalParameterFixed (const QString &parName, int i) const override |
bool | isParameterFixed (const QString &parName) const |
void | removeConstraint (const QString ¶mName) override |
void | removeDatasets (QList< int > &indices) |
Removes datasets (i.e. More... | |
void | removeFunction (const QString &functionIndex) override |
void | setAttribute (const QString &attrName, const IFunction::Attribute &val) |
QString | setBackgroundA0 (double value) override |
void | setCurrentDomainIndex (int) override |
void | setDatasets (const QList< FunctionModelDataset > &datasets) override |
Sets the datasets using a map of <workspace name, spectra list>. More... | |
void | setDatasets (const QStringList &datasetNames) |
Sets the datasets based on their workspace names. More... | |
void | setFunction (IFunction_sptr) override |
void | setGlobalParameters (const QStringList &globals) override |
void | setGlobalParameterValue (const QString ¶mName, double value) override |
void | setLocalParameterConstraint (const QString &parName, int i, const QString &constraint) override |
void | setLocalParameterFixed (const QString &parName, int i, bool fixed) override |
void | setLocalParameterTie (const QString &parName, int i, const QString &tie) override |
void | setLocalParameterValue (const QString &parName, int i, double value) override |
void | setLocalParameterValue (const QString &parName, int i, double value, double error) override |
void | setNumberDomains (int) override |
void | setParameter (const QString ¶mName, double value) override |
void | setParameterError (const QString ¶mName, double value) override |
void | setParameterFixed (const QString &parName, bool fixed) |
void | setParameterTie (const QString &parName, const QString &tie) |
void | updateMultiDatasetAttributes (const IFunction &fun) |
void | updateMultiDatasetParameters (const IFunction &fun) override |
void | updateParameters (const IFunction &fun) override |
Public Member Functions inherited from MantidQt::MantidWidgets::IFunctionModel | |
virtual void | addConstraint (const QString &functionIndex, const QString &constraint)=0 |
virtual void | addFunction (const QString &prefix, const QString &funStr)=0 |
virtual void | changeTie (const QString ¶mName, const QString &tie)=0 |
void | clear () |
virtual int | currentDomainIndex () const =0 |
virtual IFunction_sptr | getCurrentFunction () const =0 |
virtual QStringList | getDatasetDomainNames () const =0 |
virtual QStringList | getDatasetNames () const =0 |
virtual IFunction_sptr | getFitFunction () const =0 |
QString | getFitFunctionString () const |
QString | getFunctionString () const |
virtual QStringList | getGlobalParameters () const =0 |
virtual QString | getLocalParameterConstraint (const QString &parName, int i) const =0 |
virtual QStringList | getLocalParameters () const =0 |
virtual QString | getLocalParameterTie (const QString &parName, int i) const =0 |
virtual double | getLocalParameterValue (const QString &parName, int i) const =0 |
virtual int | getNumberDomains () const =0 |
int | getNumberLocalFunctions () const |
virtual double | getParameter (const QString ¶mName) const =0 |
virtual QString | getParameterDescription (const QString ¶mName) const =0 |
virtual double | getParameterError (const QString ¶mName) const =0 |
virtual QStringList | getParameterNames () const =0 |
virtual IFunction_sptr | getSingleFunction (int index) const =0 |
virtual bool | hasFunction () const =0 |
virtual bool | isGlobal (const QString &parName) const =0 |
virtual bool | isLocalParameterFixed (const QString &parName, int i) const =0 |
virtual void | removeConstraint (const QString ¶mName)=0 |
virtual void | removeFunction (const QString &functionIndex)=0 |
virtual QString | setBackgroundA0 (double value)=0 |
virtual void | setCurrentDomainIndex (int)=0 |
virtual void | setDatasets (const QList< FunctionModelDataset > &datasets)=0 |
virtual void | setFunction (IFunction_sptr fun)=0 |
void | setFunctionString (const QString &funStr) |
virtual void | setGlobalParameters (const QStringList &globals)=0 |
virtual void | setGlobalParameterValue (const QString ¶mName, double value)=0 |
virtual void | setLocalParameterConstraint (const QString &parName, int i, const QString &constraint)=0 |
virtual void | setLocalParameterFixed (const QString &parName, int i, bool fixed)=0 |
virtual void | setLocalParameterTie (const QString &parName, int i, const QString &tie)=0 |
virtual void | setLocalParameterValue (const QString &parName, int i, double value)=0 |
virtual void | setLocalParameterValue (const QString &parName, int i, double value, double error)=0 |
virtual void | setNumberDomains (int)=0 |
virtual void | setParameter (const QString ¶mName, double value)=0 |
virtual void | setParameterError (const QString ¶mName, double value)=0 |
virtual void | updateMultiDatasetParameters (const IFunction &fun)=0 |
virtual void | updateParameters (const IFunction &fun)=0 |
virtual | ~IFunctionModel ()=default |
Private Member Functions | |
CompositeFunction_sptr | addBackground (CompositeFunction_sptr domainFunction, const std::string &background) |
CompositeFunction_sptr | addTempCorrection (const CompositeFunction_sptr &peaksFunction, double tempValue) |
CompositeFunction_sptr | createConvolutionFunction (IFunction_sptr resolutionFunction, const IFunction_sptr &innerFunction) |
CompositeFunction_sptr | createInnerFunction (const std::string &lorentzianPeaks, const std::string &fitType, bool hasDeltaFunction, bool isQDependent, double q, bool hasTempCorrection, double tempValue) |
IFunction_sptr | createResolutionFunction (const std::string &workspaceName, size_t workspaceIndex) |
IFunction_sptr | createTemperatureCorrection (double correction) |
void | findComponentPrefixes () |
void | iterateThroughFunction (IFunction *func, const QString &prefix) |
void | setPrefix (IFunction *func, const QString &prefix) |
Private Attributes | |
boost::optional< QString > | m_backgroundPrefix |
boost::optional< QString > | m_convolutionPrefix |
boost::optional< QString > | m_deltaFunctionPrefix |
boost::optional< QString > | m_fitTypePrefix |
boost::optional< QStringList > | m_peakPrefixes |
std::string | m_resolutionWorkspace |
int | m_resolutionWorkspaceIndex |
boost::optional< QString > | m_tempFunctionPrefix |
Additional Inherited Members | |
Protected Member Functions inherited from MantidQt::MantidWidgets::IFunctionModel | |
void | copyParametersAndErrorsToAllLocalFunctions (const IFunction &fun) |
Static Protected Member Functions inherited from MantidQt::MantidWidgets::IFunctionModel | |
static void | copyParametersAndErrors (const IFunction &funFrom, IFunction &funTo) |
Protected Attributes inherited from MantidQt::MantidWidgets::FunctionModel | |
MultiDomainFunction_sptr | m_function |
size_t | m_numberDomains = 0 |
Definition at line 20 of file ConvolutionFunctionModel.h.
|
private |
Definition at line 96 of file ConvolutionFunctionModel.cpp.
References Mantid::Kernel::SingletonHolder< T >::Instance().
Referenced by setModel().
|
private |
Definition at line 156 of file ConvolutionFunctionModel.cpp.
References createTemperatureCorrection(), and Mantid::Kernel::SingletonHolder< T >::Instance().
Referenced by createInnerFunction().
|
inline |
Definition at line 28 of file ConvolutionFunctionModel.h.
|
inline |
Definition at line 29 of file ConvolutionFunctionModel.h.
|
private |
Definition at line 173 of file ConvolutionFunctionModel.cpp.
References Mantid::Kernel::SingletonHolder< T >::Instance().
Referenced by setModel().
|
private |
Definition at line 109 of file ConvolutionFunctionModel.cpp.
References addTempCorrection(), and Mantid::Kernel::SingletonHolder< T >::Instance().
Referenced by setModel().
|
private |
Definition at line 185 of file ConvolutionFunctionModel.cpp.
References Mantid::Kernel::SingletonHolder< T >::Instance(), and std::to_string().
Referenced by setModel().
|
private |
Definition at line 166 of file ConvolutionFunctionModel.cpp.
References Mantid::Kernel::SingletonHolder< T >::Instance().
Referenced by addTempCorrection().
|
inline |
Definition at line 30 of file ConvolutionFunctionModel.h.
|
private |
Definition at line 193 of file ConvolutionFunctionModel.cpp.
References MantidQt::MantidWidgets::FunctionModel::getCurrentFunction(), iterateThroughFunction(), m_backgroundPrefix, m_convolutionPrefix, m_deltaFunctionPrefix, m_fitTypePrefix, m_peakPrefixes, m_resolutionWorkspace, m_resolutionWorkspaceIndex, and m_tempFunctionPrefix.
Referenced by setFunction().
|
inline |
Definition at line 33 of file ConvolutionFunctionModel.h.
|
private |
Definition at line 216 of file ConvolutionFunctionModel.cpp.
References Mantid::API::IFunction::getFunction(), iterateThroughFunction(), Mantid::API::IFunction::nFunctions(), and setPrefix().
Referenced by findComponentPrefixes(), and iterateThroughFunction().
|
inline |
Definition at line 32 of file ConvolutionFunctionModel.h.
|
inline |
Definition at line 35 of file ConvolutionFunctionModel.h.
|
inline |
Definition at line 36 of file ConvolutionFunctionModel.h.
|
overridevirtual |
Implements MantidQt::MantidWidgets::IFunctionModel.
Definition at line 49 of file ConvolutionFunctionModel.cpp.
References findComponentPrefixes(), and MantidQt::MantidWidgets::FunctionModel::setFunction().
Referenced by setModel().
void MantidQt::MantidWidgets::ConvolutionFunctionModel::setModel | ( | const std::string & | background, |
const std::string & | workspace, | ||
int | workspaceIndex, | ||
const std::string & | peaks, | ||
bool | hasDeltaFunction | ||
) |
Definition at line 54 of file ConvolutionFunctionModel.cpp.
References Mantid::Kernel::SingletonHolder< T >::Instance(), setFunction(), std::to_string(), and workspace.
void MantidQt::MantidWidgets::ConvolutionFunctionModel::setModel | ( | const std::string & | background, |
const std::vector< std::pair< std::string, size_t > > & | resolutionWorkspaces, | ||
const std::string & | lorentzianPeaks, | ||
const std::string & | fitType, | ||
bool | hasDeltaFunction, | ||
const std::vector< double > & | qValues, | ||
const bool | isQDependent, | ||
bool | hasTempCorrection, | ||
double | tempValue | ||
) |
Definition at line 65 of file ConvolutionFunctionModel.cpp.
References addBackground(), createConvolutionFunction(), createInnerFunction(), createResolutionFunction(), MantidQt::MantidWidgets::FunctionModel::m_numberDomains, setFunction(), and workspace.
|
private |
Definition at line 230 of file ConvolutionFunctionModel.cpp.
References Mantid::API::IFunction::Attribute::asInt(), Mantid::API::IFunction::Attribute::asString(), Mantid::API::IFunction::getAttribute(), Mantid::API::IFunction::getFunction(), m_backgroundPrefix, m_convolutionPrefix, m_deltaFunctionPrefix, m_fitTypePrefix, m_peakPrefixes, m_resolutionWorkspace, m_resolutionWorkspaceIndex, m_tempFunctionPrefix, and Mantid::API::IFunction::nFunctions().
Referenced by iterateThroughFunction().
|
inline |
Definition at line 31 of file ConvolutionFunctionModel.h.
|
private |
Definition at line 52 of file ConvolutionFunctionModel.h.
Referenced by findComponentPrefixes(), and setPrefix().
|
private |
Definition at line 53 of file ConvolutionFunctionModel.h.
Referenced by findComponentPrefixes(), and setPrefix().
|
private |
Definition at line 54 of file ConvolutionFunctionModel.h.
Referenced by findComponentPrefixes(), and setPrefix().
|
private |
Definition at line 56 of file ConvolutionFunctionModel.h.
Referenced by findComponentPrefixes(), and setPrefix().
|
private |
Definition at line 57 of file ConvolutionFunctionModel.h.
Referenced by findComponentPrefixes(), and setPrefix().
|
private |
Definition at line 58 of file ConvolutionFunctionModel.h.
Referenced by findComponentPrefixes(), and setPrefix().
|
private |
Definition at line 59 of file ConvolutionFunctionModel.h.
Referenced by findComponentPrefixes(), and setPrefix().
|
private |
Definition at line 55 of file ConvolutionFunctionModel.h.
Referenced by findComponentPrefixes(), and setPrefix().