Mantid
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Mantid::CurveFitting::HistogramDomainCreator Class Reference

HistogramDomainCreator: More...

#include <HistogramDomainCreator.h>

Inheritance diagram for Mantid::CurveFitting::HistogramDomainCreator:
Mantid::CurveFitting::IMWDomainCreator Mantid::API::IDomainCreator

Public Member Functions

void createDomain (std::shared_ptr< API::FunctionDomain > &domain, std::shared_ptr< API::FunctionValues > &values, size_t i0=0) override
 Creates a domain corresponding to the assigned MatrixWorkspace. More...
 
std::shared_ptr< API::WorkspacecreateOutputWorkspace (const std::string &baseName, API::IFunction_sptr function, std::shared_ptr< API::FunctionDomain > domain, std::shared_ptr< API::FunctionValues > values, const std::string &outputWorkspacePropertyName) override
 Create an output workspace with the calculated values. More...
 
 HistogramDomainCreator (Kernel::IPropertyManager &manager, const std::string &workspacePropertyName)
 Constructor. More...
 
- Public Member Functions inherited from Mantid::CurveFitting::IMWDomainCreator
std::shared_ptr< API::WorkspacecreateOutputWorkspace (const std::string &baseName, API::IFunction_sptr function, std::shared_ptr< API::FunctionDomain > domain, std::shared_ptr< API::FunctionValues > values, const std::string &outputWorkspacePropertyName) override
 Create an output workspace. More...
 
void declareDatasetProperties (const std::string &suffix="", bool addProp=true) override
 Declare properties that specify the dataset within the workspace to fit to. More...
 
size_t getDomainSize () const override
 Return the size of the domain to be created. More...
 
 IMWDomainCreator (Kernel::IPropertyManager *fit, const std::string &workspacePropertyName, DomainType domainType=Simple)
 Constructor. More...
 
void initFunction (API::IFunction_sptr function) override
 Initialize the function. More...
 
void setRange (double startX, double endX)
 Set the startX and endX. More...
 
void setWorkspace (std::shared_ptr< API::MatrixWorkspace > ws)
 Set the workspace. More...
 
void setWorkspaceIndex (size_t wi)
 Set the workspace index. More...
 
- Public Member Functions inherited from Mantid::API::IDomainCreator
virtual void createDomain (std::shared_ptr< API::FunctionDomain > &domain, std::shared_ptr< API::FunctionValues > &values, size_t i0=0)=0
 Create a domain and values from the input workspace. More...
 
virtual std::shared_ptr< API::WorkspacecreateOutputWorkspace (const std::string &baseName, API::IFunction_sptr function, std::shared_ptr< API::FunctionDomain > domain, std::shared_ptr< API::FunctionValues > values, const std::string &outputWorkspacePropertyName="OutputWorkspace")
 Create an output workspace filled with data simulated with the fitting function. More...
 
virtual void declareDatasetProperties (const std::string &suffix="", bool addProp=true)
 Declare properties that specify the dataset within the workspace to fit to. More...
 
virtual size_t getDomainSize () const =0
 Return the size of the domain to be created. More...
 
 IDomainCreator (Kernel::IPropertyManager *manager, std::vector< std::string > workspacePropertyNames, DomainType domainType=Simple)
 Constrcutor. More...
 
void ignoreInvalidData (bool yes)
 Set to ignore invalid data. More...
 
virtual void initFunction (API::IFunction_sptr function)
 Initialize the function. More...
 
virtual void initialize (Kernel::IPropertyManager *, const std::string &, DomainType)
 Initialize. More...
 
void separateCompositeMembersInOutput (const bool value, const bool conv=false)
 Toggle output of either just composite or composite + members. More...
 
virtual ~IDomainCreator ()=default
 Virtual destructor. More...
 

Additional Inherited Members

- Public Types inherited from Mantid::API::IDomainCreator
enum  DomainType { Simple = 0 , Sequential , Parallel }
 Type of domain to create. More...
 
- Protected Member Functions inherited from Mantid::CurveFitting::IMWDomainCreator
void addFunctionValuesToWS (const API::IFunction_sptr &function, std::shared_ptr< API::MatrixWorkspace > &ws, const size_t wsIndex, const std::shared_ptr< API::FunctionDomain > &domain, const std::shared_ptr< API::FunctionValues > &resultValues) const
 Add the calculated function values to the workspace. More...
 
void appendCompositeFunctionMembers (std::list< API::IFunction_sptr > &functionList, const API::IFunction_sptr &function) const
 
void appendConvolvedCompositeFunctionMembers (std::list< API::IFunction_sptr > &functionList, const API::IFunction_sptr &function) const
 If the fit function is Convolution and flag m_convolutionCompositeMembers is set and Convolution's second function (the model) is composite then use members of the model for the output. More...
 
std::shared_ptr< API::MatrixWorkspacecreateEmptyResultWS (const size_t nhistograms, const size_t nyvalues)
 Creates the blank output workspace of the correct size. More...
 
std::pair< size_t, size_t > getXInterval () const
 Calculate size and starting iterator in the X array. More...
 
void setInitialValues (API::IFunction &function)
 Set initial values for parameters with default values. More...
 
virtual void setParameters () const
 Set all parameters. More...
 
- Protected Member Functions inherited from Mantid::API::IDomainCreator
void declareProperty (Kernel::Property *prop, const std::string &doc)
 Declare a property to the algorithm. More...
 
- Protected Attributes inherited from Mantid::CurveFitting::IMWDomainCreator
std::weak_ptr< API::FunctionDomain1Dm_domain
 Store the created domain and values. More...
 
double m_endX
 endX More...
 
std::string m_endXPropertyName
 Store endX property name. More...
 
std::shared_ptr< API::MatrixWorkspacem_matrixWorkspace
 The input MareixWorkspace. More...
 
size_t m_startIndex
 
double m_startX
 startX More...
 
std::string m_startXPropertyName
 Store startX property name. More...
 
std::weak_ptr< API::FunctionValuesm_values
 
size_t m_workspaceIndex
 The workspace index. More...
 
std::string m_workspaceIndexPropertyName
 Store workspace index property name. More...
 
std::string m_workspacePropertyName
 Store workspace property name. More...
 
- Protected Attributes inherited from Mantid::API::IDomainCreator
bool m_convolutionCompositeMembers
 Perform convolution of output composite components. More...
 
DomainType m_domainType
 Domain type. More...
 
bool m_ignoreInvalidData
 Flag to ignore nans, infinities and zero errors. More...
 
Kernel::IPropertyManagerm_manager
 Pointer to a property manager. More...
 
bool m_outputCompositeMembers
 Output separate composite function values. More...
 
std::vector< std::string > m_workspacePropertyNames
 Property names for workspaces to get the data from. More...
 

Detailed Description

HistogramDomainCreator:

HistogramDomainCreator creates a FunctionDomain1DHistogram which is used with IFunction1D.

This file is part of Mantid.

Mantid is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

Mantid is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

File change history is stored at: https://github.com/mantidproject/mantid Code Documentation is available at: http://doxygen.mantidproject.org

Definition at line 46 of file HistogramDomainCreator.h.

Constructor & Destructor Documentation

◆ HistogramDomainCreator()

Mantid::CurveFitting::HistogramDomainCreator::HistogramDomainCreator ( Kernel::IPropertyManager manager,
const std::string &  workspacePropertyName 
)

Constructor.

Parameters
manager:: Pointer to IPropertyManager (Algorithm) instance.
workspacePropertyName:: Name of the output property for a created workspace in case a PropertyManager is used.

Definition at line 23 of file HistogramDomainCreator.cpp.

Member Function Documentation

◆ createDomain()

void Mantid::CurveFitting::HistogramDomainCreator::createDomain ( std::shared_ptr< API::FunctionDomain > &  domain,
std::shared_ptr< API::FunctionValues > &  values,
size_t  i0 = 0 
)
overridevirtual

◆ createOutputWorkspace()

std::shared_ptr< API::Workspace > Mantid::CurveFitting::HistogramDomainCreator::createOutputWorkspace ( const std::string &  baseName,
API::IFunction_sptr  function,
std::shared_ptr< API::FunctionDomain domain,
std::shared_ptr< API::FunctionValues values,
const std::string &  outputWorkspacePropertyName 
)
overridevirtual

Create an output workspace with the calculated values.

Parameters
baseName:: Specifies the name of the output workspace
function:: A Pointer to the fitting function
domain:: The domain containing x-values for the function
values:: A API::FunctionValues instance containing the fitting data
outputWorkspacePropertyName:: The property name

Reimplemented from Mantid::API::IDomainCreator.

Definition at line 108 of file HistogramDomainCreator.cpp.

References Mantid::CurveFitting::IMWDomainCreator::createOutputWorkspace(), left, Mantid::CurveFitting::IMWDomainCreator::m_matrixWorkspace, right, and Mantid::Geometry::y.


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