Mantid
Loading...
Searching...
No Matches
FitMW.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
9//----------------------------------------------------------------------
10// Includes
11//----------------------------------------------------------------------
12#include "MantidCurveFitting/DllConfig.h"
15
16#include <list>
17#include <memory>
18
19namespace Mantid {
20namespace API {
21class FunctionDomain;
22class FunctionDomain1D;
23class FunctionValues;
24class MatrixWorkspace;
25} // namespace API
26
27namespace CurveFitting {
28
29class SimpleChebfun;
38class MANTID_CURVEFITTING_DLL FitMW : public IMWDomainCreator {
39public:
41 FitMW(Kernel::IPropertyManager *fit, const std::string &workspacePropertyName, DomainType domainType = Simple);
43 FitMW(DomainType domainType = Simple);
46 void declareDatasetProperties(const std::string &suffix = "", bool addProp = true) override;
48 void createDomain(std::shared_ptr<API::FunctionDomain> &domain, std::shared_ptr<API::FunctionValues> &values,
49 size_t i0 = 0) override;
51 std::shared_ptr<API::Workspace> createOutputWorkspace(const std::string &baseName, API::IFunction_sptr function,
52 std::shared_ptr<API::FunctionDomain> domain,
53 std::shared_ptr<API::FunctionValues> values,
54 const std::string &outputWorkspacePropertyName) override;
57 void setMaxSize(size_t maxSize) { m_maxSize = maxSize; }
62 void setNormalise(bool on) { m_normalise = on; }
63
64protected:
66 void setParameters() const override;
67
68private:
75
77 mutable size_t m_maxSize;
79 mutable bool m_normalise;
81 mutable std::vector<double> m_exclude;
82};
83
84} // namespace CurveFitting
85} // namespace Mantid
DomainType
Type of domain to create.
Creates FunctionDomain1D form a spectrum in a MatrixWorkspace.
Definition: FitMW.h:38
std::string m_excludePropertyName
Store the Exclude property name.
Definition: FitMW.h:74
bool m_normalise
Option to normalise the data.
Definition: FitMW.h:79
void setNormalise(bool on)
Set the normalisation flag.
Definition: FitMW.h:62
std::vector< double > m_exclude
Ranges that must be excluded from fit.
Definition: FitMW.h:81
void setMaxSize(size_t maxSize)
Set max size for Sequantial and Parallel domains.
Definition: FitMW.h:57
std::string m_maxSizePropertyName
Store maxSize property name.
Definition: FitMW.h:70
size_t m_maxSize
Max size for seq domain.
Definition: FitMW.h:77
std::string m_normalisePropertyName
Store Normalise property name.
Definition: FitMW.h:72
A base class for domain creators taking 1D data from a spectrum of a matrix workspace.
Interface to PropertyManager.
std::shared_ptr< IFunction > IFunction_sptr
shared pointer to the function base class
Definition: IFunction.h:732
Helper class which provides the Collimation Length for SANS instruments.