Mantid
Loading...
Searching...
No Matches
MedianDetectorTest.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2012 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 {
54class MANTID_ALGORITHMS_DLL MedianDetectorTest : public DetectorDiagnostic {
55public:
60 const std::string name() const override { return "MedianDetectorTest"; }
61 const std::string category() const override;
63 int version() const override { return 1; }
64 const std::vector<std::string> seeAlso() const override { return {"DetectorDiagnostic"}; }
65
66private:
67 // Overridden Algorithm methods
68 void init() override;
69 void exec() override;
70
71 // The different steps of the calculation, all called by exec()
73 void retrieveProperties();
75 API::MatrixWorkspace_sptr getSolidAngles(int firstSpec, int lastSpec);
77 int maskOutliers(const std::vector<double> &medianvec, const API::MatrixWorkspace_sptr &countsWS,
78 std::vector<std::vector<size_t>> indexmap);
80 int doDetectorTests(const API::MatrixWorkspace_sptr &countsWS, const std::vector<double> &medianvec,
81 std::vector<std::vector<size_t>> indexmap, const API::MatrixWorkspace_sptr &maskWS);
82
86 double m_loFrac;
89 double m_hiFrac;
100};
101
102} // namespace Algorithms
103} // namespace Mantid
A base class for a detector diagnostic algorithm.
Takes a workspace as input and finds all the detectors with solid angle corrected signals that deviat...
double m_rangeLower
Start point for integration.
double m_rangeUpper
End point for integration.
int m_minWsIndex
The index of the first spectrum to calculate.
const std::string name() const override
Algorithm's name for identification overriding a virtual method.
double m_loFrac
The proportion of the median value below which a detector is considered under-reading.
int m_maxWsIndex
The index of the last spectrum to calculate.
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso algorithms related to this algorithm.
int version() const override
Algorithm's version for identification overriding a virtual method.
double m_hiFrac
The factor of the median value above which a detector is considered over-reading.
bool m_solidAngle
flag for solid angle correction
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
Helper class which provides the Collimation Length for SANS instruments.