24 :
UnaryOperation(), m_coeffs(), m_polySize(), m_isOperationMultiply(false) {}
31 "Array Property containing the coefficients of the polynomial correction "
32 "function in ascending powers of X. Can be given as a comma separated "
33 "list in string form.");
34 std::vector<std::string> propOptions{
"Multiply",
"Divide"};
35 declareProperty(
"Operation",
"Multiply", std::make_shared<StringListValidator>(propOptions),
36 "The operation with which the correction is applied to the "
37 "data (default: Multiply)");
54 for (std::vector<double>::size_type i = 1; i <
m_polySize; ++i) {
62 EOut = EIn * std::abs(factor);
65 EOut = EIn / std::abs(factor);
#define DECLARE_ALGORITHM(classname)
void declareProperty(std::unique_ptr< Kernel::Property > p, const std::string &doc="") override
Add a property to the list of managed properties.
TypedValue getProperty(const std::string &name) const override
Get the value of a property.
Corrects the data and error values on a workspace by the value of a polynomial function which is eval...
void performUnaryOperation(const double XIn, const double YIn, const double EIn, double &YOut, double &EOut) override
Carries out the Unary operation on the current 'cell'.
void retrieveProperties() override
A virtual function in which additional properties should be retrieved into member variables.
void defineProperties() override
A virtual function in which additional properties of an algorithm should be declared.
bool m_isOperationMultiply
True is the operation is multiply, false.
std::vector< double >::size_type m_polySize
correction function
std::vector< double > m_coeffs
Holds the coefficients for the polynomial.
UnaryOperation supports the implementation of a Unary operation on an input workspace.
Support for a property that holds an array of values.
Validator to check that a property is not left empty.