23 declareProperty(
"C0", 1.0,
"The value by which the entire exponent calculation is multiplied.");
24 declareProperty(
"C1", 0.0,
"The value by which the x value is multiplied prior to exponentiation.");
28 "the same as the input one).");
30 std::vector<std::string> operations(2);
31 operations[0] =
"Multiply";
32 operations[1] =
"Divide";
33 declareProperty(
"Operation",
"Divide", std::make_shared<Kernel::StringListValidator>(operations),
34 "Whether to divide (the default) or multiply the data by the "
35 "correction function.");
47 double factor =
m_c0 * exp(-1.0 *
m_c1 * XIn);
49 factor = 1.0 / 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.
Kernel::Property * getPointerToProperty(const std::string &name) const override
Get a property by name.
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 an exponential function which is ev...
double m_c0
The constant by which to multiply the exponential.
double m_c1
The constant term in the exponent.
bool m_divide
Whether the data should be divided by the correction (true) or multiplied by it (false)
void defineProperties() override
A virtual function in which additional properties of an algorithm should be declared.
void retrieveProperties() override
A virtual function in which additional properties should be retrieved into member variables.
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'.
UnaryOperation supports the implementation of a Unary operation on an input workspace.
void setDocumentation(const std::string &documentation)
Sets the user level description of the property.