Mantid
Loading...
Searching...
No Matches
Logarithm.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
10namespace Mantid {
11namespace Algorithms {
36class MANTID_ALGORITHMS_DLL Logarithm : public UnaryOperation {
37public:
38 Logarithm();
40 const std::string name() const override { return "Logarithm"; }
42 const std::string summary() const override {
43 return "Logarithm function calculates the logarithm of the data, held in a "
44 "workspace. A user can choose between natural (default) or base 10 "
45 "logarithm";
46 }
47
49 int version() const override { return (1); }
50 const std::vector<std::string> seeAlso() const override { return {"Power", "Exponential"}; }
52 // cppcheck-suppress uselessOverride
53 const std::string category() const override { return "Arithmetic"; }
54
55private:
57 double log_Min;
60
62 void defineProperties() override;
64 void retrieveProperties() override;
67 void performUnaryOperation(const double XIn, const double YIn, const double EIn, double &YOut, double &EOut) override;
68};
69
70} // End namespace Algorithms
71} // End namespace Mantid
Takes a workspace as input and calculates the natural logarithm of number of counts for each 1D spect...
Definition Logarithm.h:36
int version() const override
Algorithm's version for identification.
Definition Logarithm.h:49
double log_Min
The value to replace ln(0)
Definition Logarithm.h:57
const std::string category() const override
Algorithm's category for identification.
Definition Logarithm.h:53
const std::string summary() const override
Summary of algorithms purpose.
Definition Logarithm.h:42
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso algorithms related to this algorithm.
Definition Logarithm.h:50
const std::string name() const override
Algorithm's name for identification.
Definition Logarithm.h:40
bool is_natural
If the logarithm natural or 10-based.
Definition Logarithm.h:59
UnaryOperation supports the implementation of a Unary operation on an input workspace.
Helper class which provides the Collimation Length for SANS instruments.