Mantid
Loading...
Searching...
No Matches
PolynomialCorrection.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2009 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//----------------------------------------------------------------------
13
14namespace Mantid {
15namespace Algorithms {
37class MANTID_ALGORITHMS_DLL PolynomialCorrection : public UnaryOperation {
38public:
42 const std::string name() const override { return "PolynomialCorrection"; }
44 const std::string summary() const override {
45 return "Corrects the data in a workspace by the value of a polynomial "
46 "function which is evaluated at the X value of each data point.";
47 }
48
50 int version() const override { return 1; }
51 const std::vector<std::string> seeAlso() const override {
52 return {"OneMinusExponentialCor", "MagFormFactorCorrection", "ExponentialCorrection", "PowerLawCorrection"};
53 }
55 const std::string category() const override { return "CorrectionFunctions"; }
56
57private:
58 // Overridden UnaryOperation methods
59 void defineProperties() override;
60 void retrieveProperties() override;
61 void performUnaryOperation(const double XIn, const double YIn, const double EIn, double &YOut, double &EOut) override;
62
63 std::vector<double> m_coeffs;
65 std::vector<double>::size_type m_polySize;
68};
69
70} // namespace Algorithms
71} // namespace Mantid
Corrects the data and error values on a workspace by the value of a polynomial function which is eval...
int version() const override
Algorithm's version for identification.
const std::string category() const override
Algorithm's category for identification overriding a virtual method.
const std::string name() const override
Algorithm's name for identification.
bool m_isOperationMultiply
True is the operation is multiply, false.
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso algorithms related to this algorithm.
std::vector< double >::size_type m_polySize
correction function
std::vector< double > m_coeffs
Holds the coefficients for the polynomial.
const std::string summary() const override
Summary of algorithms purpose.
UnaryOperation supports the implementation of a Unary operation on an input workspace.
Helper class which provides the Collimation Length for SANS instruments.