Mantid
Loading...
Searching...
No Matches
HardThresholdBackground.cpp
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 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 +
9
10namespace Mantid::Crystal {
11
12//----------------------------------------------------------------------------------------------
16 const Mantid::API::MDNormalization normalization)
17 : m_thresholdSignal(thresholdSignal), m_normalization(normalization) {}
18
20
23}
24
26 auto signal = iterator->getNormalizedSignal();
27 return signal <= m_thresholdSignal || std::isnan(signal);
28}
29
30} // namespace Mantid::Crystal
This is an interface to an iterator of an IMDWorkspace.
Definition: IMDIterator.h:39
virtual signal_t getNormalizedSignal() const =0
Returns the normalized signal for this box.
void setNormalization(Mantid::API::MDNormalization normalization)
Set how the signal will be normalized when calling getNormalizedSignal()
Definition: IMDIterator.cpp:21
HardThresholdBackground : Implementation of BackgroundStrategy using a fixed background signal value ...
bool isBackground(Mantid::API::IMDIterator *iterator) const override
Overriden isBackground.
Mantid::API::MDNormalization m_normalization
Normalization.
HardThresholdBackground * clone() const override
Virtual constructor.
HardThresholdBackground(const double thresholdSignal, const Mantid::API::MDNormalization normalization)
Contructor.
void configureIterator(Mantid::API::IMDIterator *const iterator) const override
Overriden configureIterator.
MDNormalization
Enum describing different ways to normalize the signal in a MDWorkspace.
Definition: IMDIterator.h:25