Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
MantidQt::MantidWidgets::ConvolutionFunctionModel Class Reference

#include <ConvolutionFunctionModel.h>

Inheritance diagram for MantidQt::MantidWidgets::ConvolutionFunctionModel:
MantidQt::MantidWidgets::FunctionModel MantidQt::MantidWidgets::IFunctionModel

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 &paramName) const override
 
QString getParameterDescription (const QString &paramName) const override
 
double getParameterError (const QString &paramName) 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 &paramName) 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 &paramName, 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 &paramName, double value) override
 
void setParameterError (const QString &paramName, 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 &paramName, 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 &paramName) const =0
 
virtual QString getParameterDescription (const QString &paramName) const =0
 
virtual double getParameterError (const QString &paramName) 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 &paramName)=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 &paramName, 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 &paramName, double value)=0
 
virtual void setParameterError (const QString &paramName, 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
 

Detailed Description

Definition at line 20 of file ConvolutionFunctionModel.h.

Member Function Documentation

◆ addBackground()

CompositeFunction_sptr MantidQt::MantidWidgets::ConvolutionFunctionModel::addBackground ( CompositeFunction_sptr  domainFunction,
const std::string &  background 
)
private

Definition at line 96 of file ConvolutionFunctionModel.cpp.

References Mantid::Kernel::SingletonHolder< T >::Instance().

Referenced by setModel().

◆ addTempCorrection()

CompositeFunction_sptr MantidQt::MantidWidgets::ConvolutionFunctionModel::addTempCorrection ( const CompositeFunction_sptr peaksFunction,
double  tempValue 
)
private

◆ backgroundPrefix()

boost::optional< QString > MantidQt::MantidWidgets::ConvolutionFunctionModel::backgroundPrefix ( ) const
inline

Definition at line 28 of file ConvolutionFunctionModel.h.

◆ convolutionPrefix()

boost::optional< QString > MantidQt::MantidWidgets::ConvolutionFunctionModel::convolutionPrefix ( ) const
inline

Definition at line 29 of file ConvolutionFunctionModel.h.

◆ createConvolutionFunction()

CompositeFunction_sptr MantidQt::MantidWidgets::ConvolutionFunctionModel::createConvolutionFunction ( IFunction_sptr  resolutionFunction,
const IFunction_sptr innerFunction 
)
private

Definition at line 173 of file ConvolutionFunctionModel.cpp.

References Mantid::Kernel::SingletonHolder< T >::Instance().

Referenced by setModel().

◆ createInnerFunction()

CompositeFunction_sptr MantidQt::MantidWidgets::ConvolutionFunctionModel::createInnerFunction ( const std::string &  lorentzianPeaks,
const std::string &  fitType,
bool  hasDeltaFunction,
bool  isQDependent,
double  q,
bool  hasTempCorrection,
double  tempValue 
)
private

◆ createResolutionFunction()

IFunction_sptr MantidQt::MantidWidgets::ConvolutionFunctionModel::createResolutionFunction ( const std::string &  workspaceName,
size_t  workspaceIndex 
)
private

◆ createTemperatureCorrection()

IFunction_sptr MantidQt::MantidWidgets::ConvolutionFunctionModel::createTemperatureCorrection ( double  correction)
private

◆ deltaFunctionPrefix()

boost::optional< QString > MantidQt::MantidWidgets::ConvolutionFunctionModel::deltaFunctionPrefix ( ) const
inline

Definition at line 30 of file ConvolutionFunctionModel.h.

◆ findComponentPrefixes()

void MantidQt::MantidWidgets::ConvolutionFunctionModel::findComponentPrefixes ( )
private

◆ fitTypePrefix()

boost::optional< QString > MantidQt::MantidWidgets::ConvolutionFunctionModel::fitTypePrefix ( ) const
inline

Definition at line 33 of file ConvolutionFunctionModel.h.

◆ iterateThroughFunction()

void MantidQt::MantidWidgets::ConvolutionFunctionModel::iterateThroughFunction ( IFunction func,
const QString &  prefix 
)
private

◆ peakPrefixes()

boost::optional< QStringList > MantidQt::MantidWidgets::ConvolutionFunctionModel::peakPrefixes ( ) const
inline

Definition at line 32 of file ConvolutionFunctionModel.h.

◆ resolutionWorkspace()

std::string MantidQt::MantidWidgets::ConvolutionFunctionModel::resolutionWorkspace ( ) const
inline

Definition at line 35 of file ConvolutionFunctionModel.h.

◆ resolutionWorkspaceIndex()

int MantidQt::MantidWidgets::ConvolutionFunctionModel::resolutionWorkspaceIndex ( ) const
inline

Definition at line 36 of file ConvolutionFunctionModel.h.

◆ setFunction()

void MantidQt::MantidWidgets::ConvolutionFunctionModel::setFunction ( IFunction_sptr  fun)
overridevirtual

◆ setModel() [1/2]

void MantidQt::MantidWidgets::ConvolutionFunctionModel::setModel ( const std::string &  background,
const std::string &  workspace,
int  workspaceIndex,
const std::string &  peaks,
bool  hasDeltaFunction 
)

◆ setModel() [2/2]

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 
)

◆ setPrefix()

void MantidQt::MantidWidgets::ConvolutionFunctionModel::setPrefix ( IFunction func,
const QString &  prefix 
)
private

◆ tempFunctionPrefix()

boost::optional< QString > MantidQt::MantidWidgets::ConvolutionFunctionModel::tempFunctionPrefix ( ) const
inline

Definition at line 31 of file ConvolutionFunctionModel.h.

Member Data Documentation

◆ m_backgroundPrefix

boost::optional<QString> MantidQt::MantidWidgets::ConvolutionFunctionModel::m_backgroundPrefix
private

Definition at line 52 of file ConvolutionFunctionModel.h.

Referenced by findComponentPrefixes(), and setPrefix().

◆ m_convolutionPrefix

boost::optional<QString> MantidQt::MantidWidgets::ConvolutionFunctionModel::m_convolutionPrefix
private

Definition at line 53 of file ConvolutionFunctionModel.h.

Referenced by findComponentPrefixes(), and setPrefix().

◆ m_deltaFunctionPrefix

boost::optional<QString> MantidQt::MantidWidgets::ConvolutionFunctionModel::m_deltaFunctionPrefix
private

Definition at line 54 of file ConvolutionFunctionModel.h.

Referenced by findComponentPrefixes(), and setPrefix().

◆ m_fitTypePrefix

boost::optional<QString> MantidQt::MantidWidgets::ConvolutionFunctionModel::m_fitTypePrefix
private

Definition at line 56 of file ConvolutionFunctionModel.h.

Referenced by findComponentPrefixes(), and setPrefix().

◆ m_peakPrefixes

boost::optional<QStringList> MantidQt::MantidWidgets::ConvolutionFunctionModel::m_peakPrefixes
private

Definition at line 57 of file ConvolutionFunctionModel.h.

Referenced by findComponentPrefixes(), and setPrefix().

◆ m_resolutionWorkspace

std::string MantidQt::MantidWidgets::ConvolutionFunctionModel::m_resolutionWorkspace
private

Definition at line 58 of file ConvolutionFunctionModel.h.

Referenced by findComponentPrefixes(), and setPrefix().

◆ m_resolutionWorkspaceIndex

int MantidQt::MantidWidgets::ConvolutionFunctionModel::m_resolutionWorkspaceIndex
private

Definition at line 59 of file ConvolutionFunctionModel.h.

Referenced by findComponentPrefixes(), and setPrefix().

◆ m_tempFunctionPrefix

boost::optional<QString> MantidQt::MantidWidgets::ConvolutionFunctionModel::m_tempFunctionPrefix
private

Definition at line 55 of file ConvolutionFunctionModel.h.

Referenced by findComponentPrefixes(), and setPrefix().


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