|
Mantid
|
FunctionDomain1DSpectrumCreator : More...
#include <FunctionDomain1DSpectrumCreator.h>
Public Member Functions | |
| void | createDomain (std::shared_ptr< API::FunctionDomain > &domain, std::shared_ptr< API::FunctionValues > &values, size_t i0=0) override |
| Creates the domain according to the stored MatrixWorkspace and workspace index. More... | |
| FunctionDomain1DSpectrumCreator () | |
| Default Constructor. More... | |
| size_t | getDomainSize () const override |
| Returns the domain sizes. More... | |
| void | setMatrixWorkspace (API::MatrixWorkspace_sptr matrixWorkspace) |
| Sets the matrix workspace this creator is working with. More... | |
| void | setWorkspaceIndex (size_t workspaceIndex) |
| Sets the workspace index for the created domain. 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::Workspace > | 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="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... | |
Protected Member Functions | |
| void | throwIfWorkspaceInvalid () const |
| Checks the assigned MatrixWorkspace and workspace index. 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 | |
| API::MatrixWorkspace_sptr | m_matrixWorkspace |
| size_t | m_workspaceIndex |
| bool | m_workspaceIndexIsSet |
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::IPropertyManager * | m_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... | |
Additional Inherited Members | |
Public Types inherited from Mantid::API::IDomainCreator | |
| enum | DomainType { Simple = 0 , Sequential , Parallel } |
| Type of domain to create. More... | |
FunctionDomain1DSpectrumCreator :
FunctionDomain1DSpectrumCreator creates an FunctionDomain1DSpectrum using a given MatrixWorkspace and workspace index. Currently it does not create an output workspace, since it is exclusively used in a context where it's not required.
Definition at line 36 of file FunctionDomain1DSpectrumCreator.h.
| Mantid::CurveFitting::FunctionDomain1DSpectrumCreator::FunctionDomain1DSpectrumCreator | ( | ) |
Default Constructor.
Definition at line 22 of file FunctionDomain1DSpectrumCreator.cpp.
|
overridevirtual |
Creates the domain according to the stored MatrixWorkspace and workspace index.
This method constructs a FunctionDomain1DSpectrum instance and set the domain and values parameters. If no workspace is present, the index is invalid or there are too few bins (0), the method throws std::invalid_argument.
| domain | :: Pointer that holds the domain instance after the call. |
| values | :: Pointer that holds the function values instance after the call. |
| i0 | :: Size offset in case the FunctionValues object already contains data. |
Implements Mantid::API::IDomainCreator.
Definition at line 60 of file FunctionDomain1DSpectrumCreator.cpp.
References m_matrixWorkspace, m_workspaceIndex, and throwIfWorkspaceInvalid().
|
overridevirtual |
Returns the domain sizes.
The function throws std::invalid_argument if the workspace, or the index are not valid.
Implements Mantid::API::IDomainCreator.
Definition at line 91 of file FunctionDomain1DSpectrumCreator.cpp.
References m_matrixWorkspace, m_workspaceIndex, and throwIfWorkspaceInvalid().
| void Mantid::CurveFitting::FunctionDomain1DSpectrumCreator::setMatrixWorkspace | ( | API::MatrixWorkspace_sptr | matrixWorkspace | ) |
Sets the matrix workspace this creator is working with.
| matrixWorkspace | :: Pointer to matrix workspace the domain is based on. |
Definition at line 30 of file FunctionDomain1DSpectrumCreator.cpp.
References m_matrixWorkspace.
Referenced by Mantid::CurveFitting::SeqDomainSpectrumCreator::createDomain().
| void Mantid::CurveFitting::FunctionDomain1DSpectrumCreator::setWorkspaceIndex | ( | size_t | workspaceIndex | ) |
Sets the workspace index for the created domain.
Does not perform any validity checks.
| workspaceIndex | :: Index of spectrum for which the domain is created. |
Definition at line 39 of file FunctionDomain1DSpectrumCreator.cpp.
References m_workspaceIndex, and m_workspaceIndexIsSet.
|
protected |
Checks the assigned MatrixWorkspace and workspace index.
Definition at line 104 of file FunctionDomain1DSpectrumCreator.cpp.
References m_matrixWorkspace, m_workspaceIndex, and m_workspaceIndexIsSet.
Referenced by createDomain(), and getDomainSize().
|
protected |
Definition at line 51 of file FunctionDomain1DSpectrumCreator.h.
Referenced by createDomain(), getDomainSize(), setMatrixWorkspace(), and throwIfWorkspaceInvalid().
|
protected |
Definition at line 52 of file FunctionDomain1DSpectrumCreator.h.
Referenced by createDomain(), getDomainSize(), setWorkspaceIndex(), and throwIfWorkspaceInvalid().
|
protected |
Definition at line 53 of file FunctionDomain1DSpectrumCreator.h.
Referenced by setWorkspaceIndex(), and throwIfWorkspaceInvalid().