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

std::optional< std::string > backgroundPrefix () const
 
std::optional< std::string > convolutionPrefix () const
 
std::optional< std::string > deltaFunctionPrefix () const
 
std::optional< std::string > fitTypePrefix () const
 
std::optional< std::vector< std::string > > peakPrefixes () const
 
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)
 
std::optional< std::string > tempFunctionPrefix () const
 
- Public Member Functions inherited from MantidQt::MantidWidgets::FunctionModel
void addConstraint (std::string const &functionIndex, std::string const &constraint) override
 
void addDatasets (const std::vector< std::string > &datasetNames)
 Adds datasets based on their workspace names.
 
void addFunction (std::string const &prefix, std::string const &funStr) override
 
void changeTie (std::string const &parameterName, std::string const &tie) override
 
int currentDomainIndex () const override
 
IFunction::Attribute getAttribute (std::string const &attrName) const
 
std::vector< std::string > getAttributeNames () const
 
IFunction_sptr getCurrentFunction () const override
 
std::vector< std::string > getDatasetDomainNames () const override
 Returns names for the domains of each dataset.
 
std::vector< std::string > getDatasetNames () const override
 Returns the workspace names of the datasets.
 
IFunction_sptr getFitFunction () const override
 
IFunction_sptr getFullFunction () const override
 
std::vector< std::string > getGlobalParameters () const override
 
std::string getLocalParameterConstraint (std::string const &parameterName, int i) const override
 
std::vector< std::string > getLocalParameters () const override
 
std::string getLocalParameterTie (std::string const &parameterName, int i) const override
 
double getLocalParameterValue (std::string const &parameterName, int i) const override
 
int getNumberDomains () const override
 
double getParameter (std::string const &parameterName) const override
 
std::string getParameterDescription (std::string const &parameterName) const override
 
double getParameterError (std::string const &parameterName) const override
 
std::vector< std::string > getParameterNames () const override
 
std::string getParameterTie (std::string const &parameterName) const
 
IFunction_sptr getSingleFunction (int index) const override
 
bool hasFunction () const override
 
bool isGlobal (std::string const &parameterName) const override
 
bool isLocalParameterFixed (std::string const &parameterName, int i) const override
 
bool isParameterFixed (std::string const &parameterName) const
 
void removeConstraint (std::string const &parameterName) override
 
void removeDatasets (QList< int > &indices)
 Removes datasets (i.e.
 
void removeFunction (std::string const &functionIndex) override
 
void setAttribute (std::string const &attrName, const IFunction::Attribute &val)
 
std::string 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>.
 
void setDatasets (const std::vector< std::string > &datasetNames)
 Sets the datasets based on their workspace names.
 
void setFunction (IFunction_sptr) override
 
virtual void setGlobal (std::string const &parameterName, bool on) override
 
void setGlobalParameters (const std::vector< std::string > &globals) override
 
void setGlobalParameterValue (std::string const &parameterName, double value) override
 
void setLocalParameterConstraint (std::string const &parameterName, int i, std::string const &constraint) override
 
void setLocalParameterFixed (std::string const &parameterName, int i, bool fixed) override
 
void setLocalParameterTie (std::string const &parameterName, int i, std::string const &tie) override
 
void setLocalParameterValue (std::string const &parameterName, int i, double value) override
 
void setLocalParameterValue (std::string const &parameterName, int i, double value, double error) override
 
void setNumberDomains (int) override
 
void setParameter (std::string const &parameterName, double value) override
 
void setParameterError (std::string const &parameterName, double value) override
 
void setParameterFixed (std::string const &parameterName, bool fixed)
 
void setParameterTie (std::string const &parameterName, std::string const &tie)
 
void setQValues (const std::vector< double > &qValues) override
 
void setResolution (const std::vector< std::pair< std::string, size_t > > &fitResolutions) override
 
void updateMultiDatasetAttributes (const IFunction &fun)
 
void updateMultiDatasetParameters (const IFunction &fun) override
 
void updateMultiDatasetParameters (const ITableWorkspace &paramTable) override
 
void updateParameters (const IFunction &fun) override
 
- Public Member Functions inherited from MantidQt::MantidWidgets::IFunctionModel
void clear ()
 
std::string getFitFunctionString () const
 
std::string getFunctionString () const
 
int getNumberLocalFunctions () const
 
void setFunctionString (std::string const &funStr)
 
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 const *func, std::string const &prefix)
 
void setPrefix (IFunction const *func, std::string const &prefix)
 

Private Attributes

std::optional< std::string > m_backgroundPrefix
 
std::optional< std::string > m_convolutionPrefix
 
std::optional< std::string > m_deltaFunctionPrefix
 
std::optional< std::string > m_fitTypePrefix
 
std::optional< std::vector< std::string > > m_peakPrefixes
 
std::string m_resolutionWorkspace
 
int m_resolutionWorkspaceIndex
 
std::optional< std::string > 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 21 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.

Referenced by setModel().

◆ addTempCorrection()

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

Definition at line 156 of file ConvolutionFunctionModel.cpp.

References createTemperatureCorrection().

Referenced by createInnerFunction().

◆ backgroundPrefix()

std::optional< std::string > MantidQt::MantidWidgets::ConvolutionFunctionModel::backgroundPrefix ( ) const
inline

Definition at line 29 of file ConvolutionFunctionModel.h.

◆ convolutionPrefix()

std::optional< std::string > MantidQt::MantidWidgets::ConvolutionFunctionModel::convolutionPrefix ( ) const
inline

Definition at line 30 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.

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

Definition at line 109 of file ConvolutionFunctionModel.cpp.

References addTempCorrection().

Referenced by setModel().

◆ createResolutionFunction()

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

Definition at line 185 of file ConvolutionFunctionModel.cpp.

References std::to_string().

Referenced by setModel().

◆ createTemperatureCorrection()

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

Definition at line 166 of file ConvolutionFunctionModel.cpp.

Referenced by addTempCorrection().

◆ deltaFunctionPrefix()

std::optional< std::string > MantidQt::MantidWidgets::ConvolutionFunctionModel::deltaFunctionPrefix ( ) const
inline

Definition at line 31 of file ConvolutionFunctionModel.h.

◆ findComponentPrefixes()

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

◆ fitTypePrefix()

std::optional< std::string > MantidQt::MantidWidgets::ConvolutionFunctionModel::fitTypePrefix ( ) const
inline

Definition at line 34 of file ConvolutionFunctionModel.h.

◆ iterateThroughFunction()

void MantidQt::MantidWidgets::ConvolutionFunctionModel::iterateThroughFunction ( IFunction const *  func,
std::string const &  prefix 
)
private

◆ peakPrefixes()

std::optional< std::vector< std::string > > MantidQt::MantidWidgets::ConvolutionFunctionModel::peakPrefixes ( ) const
inline

Definition at line 33 of file ConvolutionFunctionModel.h.

◆ resolutionWorkspace()

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

Definition at line 36 of file ConvolutionFunctionModel.h.

◆ resolutionWorkspaceIndex()

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

Definition at line 37 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 
)

Definition at line 54 of file ConvolutionFunctionModel.cpp.

References setFunction(), std::to_string(), and workspace.

◆ 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 const *  func,
std::string const &  prefix 
)
private

◆ tempFunctionPrefix()

std::optional< std::string > MantidQt::MantidWidgets::ConvolutionFunctionModel::tempFunctionPrefix ( ) const
inline

Definition at line 32 of file ConvolutionFunctionModel.h.

Member Data Documentation

◆ m_backgroundPrefix

std::optional<std::string> MantidQt::MantidWidgets::ConvolutionFunctionModel::m_backgroundPrefix
private

Definition at line 53 of file ConvolutionFunctionModel.h.

Referenced by findComponentPrefixes(), and setPrefix().

◆ m_convolutionPrefix

std::optional<std::string> MantidQt::MantidWidgets::ConvolutionFunctionModel::m_convolutionPrefix
private

Definition at line 54 of file ConvolutionFunctionModel.h.

Referenced by findComponentPrefixes(), and setPrefix().

◆ m_deltaFunctionPrefix

std::optional<std::string> MantidQt::MantidWidgets::ConvolutionFunctionModel::m_deltaFunctionPrefix
private

Definition at line 55 of file ConvolutionFunctionModel.h.

Referenced by findComponentPrefixes(), and setPrefix().

◆ m_fitTypePrefix

std::optional<std::string> MantidQt::MantidWidgets::ConvolutionFunctionModel::m_fitTypePrefix
private

Definition at line 57 of file ConvolutionFunctionModel.h.

Referenced by findComponentPrefixes(), and setPrefix().

◆ m_peakPrefixes

std::optional<std::vector<std::string> > MantidQt::MantidWidgets::ConvolutionFunctionModel::m_peakPrefixes
private

Definition at line 58 of file ConvolutionFunctionModel.h.

Referenced by findComponentPrefixes(), and setPrefix().

◆ m_resolutionWorkspace

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

Definition at line 59 of file ConvolutionFunctionModel.h.

Referenced by findComponentPrefixes(), and setPrefix().

◆ m_resolutionWorkspaceIndex

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

Definition at line 60 of file ConvolutionFunctionModel.h.

Referenced by findComponentPrefixes(), and setPrefix().

◆ m_tempFunctionPrefix

std::optional<std::string> MantidQt::MantidWidgets::ConvolutionFunctionModel::m_tempFunctionPrefix
private

Definition at line 56 of file ConvolutionFunctionModel.h.

Referenced by findComponentPrefixes(), and setPrefix().


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