Mantid
Loading...
Searching...
No Matches
DoublePulseFit.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2020 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
14
15namespace Mantid {
16
17namespace API {
18class FunctionDomain;
19class FunctionValues;
20class Workspace;
21class IFuncMinimizer;
22} // namespace API
23
24namespace CurveFitting {
25namespace Algorithms {
26MANTID_CURVEFITTING_DLL Mantid::API::IFunction_sptr
27getDoublePulseFunction(std::shared_ptr<const API::IFunction> const &function, double offset, double firstPulseWeight,
28 double secondPulseWeight);
29
30MANTID_CURVEFITTING_DLL Mantid::API::IFunction_sptr
31getDoublePulseMultiDomainFunction(std::shared_ptr<const API::MultiDomainFunction> const &function, double offset,
32 double firstPulseWeight, double secondPulseWeight);
33
34MANTID_CURVEFITTING_DLL Mantid::API::IFunction_sptr
35extractInnerFunction(std::shared_ptr<const Mantid::CurveFitting::Functions::Convolution> const &function);
36
37MANTID_CURVEFITTING_DLL Mantid::API::IFunction_sptr
38extractInnerFunction(std::shared_ptr<const API::MultiDomainFunction> const &function);
92class MANTID_CURVEFITTING_DLL DoublePulseFit : public IFittingAlgorithm {
93public:
97 const std::string name() const override { return "DoublePulseFit"; }
99 const std::string summary() const override {
100 return "A function to fit muon data from a double pulse source. Wraps Fit.";
101 }
103 int version() const override { return (1); }
104 const std::vector<std::string> seeAlso() const override {
105 return {"FitGaussian", "UserFunction1D", "PlotPeakByLogValue", "SplineBackground", "EvaluateFunction", "Fit"};
106 }
107
108private:
109 void initConcrete() override;
110 void execConcrete() override;
111
112 std::vector<Mantid::API::MatrixWorkspace_sptr> getWorkspaces() const;
113 void declareAdditionalProperties();
114 void runFitAlgorith(const Mantid::API::IAlgorithm_sptr &fitAlgorithm, const Mantid::API::IFunction_sptr &function,
115 int maxIterations);
116 void setOutputProperties();
117 void createOutput(const Mantid::API::IAlgorithm_sptr &fitAlg, const Mantid::API::IFunction_sptr &function);
118
122};
123
124} // namespace Algorithms
125} // namespace CurveFitting
126} // namespace Mantid
A function to fit muon data from a double pulse source.
const std::string summary() const override
Summary of algorithms purpose.
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso (these are not validated) algorithms related to this algorithm....
const std::string name() const override
Algorithm's name for identification overriding a virtual method.
int version() const override
Algorithm's version for identification overriding a virtual method.
A base class for fitting algorithms.
std::shared_ptr< IAlgorithm > IAlgorithm_sptr
shared pointer to Mantid::API::IAlgorithm
std::shared_ptr< IFunction > IFunction_sptr
shared pointer to the function base class
Definition: IFunction.h:732
MANTID_CURVEFITTING_DLL Mantid::API::IFunction_sptr getDoublePulseFunction(std::shared_ptr< const API::IFunction > const &function, double offset, double firstPulseWeight, double secondPulseWeight)
MANTID_CURVEFITTING_DLL Mantid::API::IFunction_sptr getDoublePulseMultiDomainFunction(std::shared_ptr< const API::MultiDomainFunction > const &function, double offset, double firstPulseWeight, double secondPulseWeight)
MANTID_CURVEFITTING_DLL Mantid::API::IFunction_sptr extractInnerFunction(std::shared_ptr< const Mantid::CurveFitting::Functions::Convolution > const &function)
Helper class which provides the Collimation Length for SANS instruments.