Mantid
Loading...
Searching...
No Matches
ReplaceSpecialValues.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 {
24class MANTID_ALGORITHMS_DLL ReplaceSpecialValues : public UnaryOperation {
25public:
29 const std::string name() const override { return "ReplaceSpecialValues"; }
31 const std::string summary() const override {
32 return "Replaces instances of NaN and infinity in the workspace with user "
33 "defined numbers. If a replacement value is not provided the check "
34 "will not occur. This algorithm can also be used to replace numbers "
35 "whose value is larger than a user-defined threshold.";
36 }
37
39 int version() const override { return 1; }
41 const std::string category() const override { return "CorrectionFunctions\\SpecialCorrections"; }
42
43private:
44 // Overridden UnaryOperation methods
45 void defineProperties() override;
46 void retrieveProperties() override;
47 void performUnaryOperation(const double XIn, const double YIn, const double EIn, double &YOut, double &EOut) override;
48
50 bool checkIfNan(const double value) const;
52 bool checkIfInfinite(const double value) const;
54 bool checkIfBig(const double value) const;
56 bool checkIfSmall(const double value) const;
58 bool checkifPropertyEmpty(const double value) const;
59
60 double m_NaNValue;
61 double m_NaNError;
66 double m_bigValue;
67 double m_bigError;
69 double m_smallValue;
70 double m_smallError;
71
84};
85
86} // namespace Algorithms
87} // namespace Mantid
double value
The value of the point.
Definition: FitMW.cpp:51
Replaces instances of NaN and infinity in the workspace with user defined numbers.
double m_smallError
The replacement error value for small numbers.
const std::string category() const override
Algorithm's category for identification.
const std::string summary() const override
Summary of algorithms purpose.
double m_bigError
The replacement error value for big numbers.
double m_InfiniteError
The replacement error value for infinity.
bool m_performNaNCheck
Flag to indicate if the NaN check is to be.
double m_NaNError
The replacement error value for NaN.
const std::string name() const override
Algorithm's name for identification.
double m_smallThreshold
The threshold value below which a value is 'small'.
int version() const override
Algorithm's version for identification.
double m_InfiniteValue
The replacement value for infinity.
bool m_useAbsolute
Flag to indicate if the algorithm should use the absolute value when comparing big and small checks.
double m_NaNValue
The replacement value for NaN.
double m_bigThreshold
The threshold value above which a value is.
double m_smallValue
The replacement value for small numbers.
UnaryOperation supports the implementation of a Unary operation on an input workspace.
Helper class which provides the Collimation Length for SANS instruments.