Mantid
Loading...
Searching...
No Matches
SmoothData.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2008 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
10#include "MantidAlgorithms/DllConfig.h"
12
13namespace Mantid {
14namespace HistogramData {
15class Histogram;
16}
17namespace Algorithms {
40class MANTID_ALGORITHMS_DLL SmoothData final : public API::Algorithm {
41public:
43 const std::string name() const override { return "SmoothData"; }
45 const std::string summary() const override { return "Smooths out statistical fluctuations in a workspace's data."; }
46
48 int version() const override { return (1); }
49 const std::vector<std::string> seeAlso() const override { return {"SmoothNeighbours"}; }
51 const std::string category() const override { return "Transforms\\Smoothing"; }
52
53private:
55 void init() override;
57 void exec() override;
58 int validateSpectrumInGroup(size_t wi);
59 // This map does not need to be ordered, just a lookup for udet
61 using udet2groupmap = std::map<detid_t, int>;
62 std::vector<int> udet2group;
64};
65
66HistogramData::Histogram smooth(const HistogramData::Histogram &histogram, int npts);
67
68} // namespace Algorithms
69} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
Smooths the data of the input workspace by making each point the mean average of itself and one or mo...
Definition: SmoothData.h:40
std::vector< int > udet2group
Definition: SmoothData.h:62
std::map< detid_t, int > udet2groupmap
type alias for the storage of the UDET-group mapping
Definition: SmoothData.h:61
int version() const override
Algorithm's version.
Definition: SmoothData.h:48
const std::string name() const override
Algorithm's name.
Definition: SmoothData.h:43
const std::string category() const override
Algorithm's category for identification.
Definition: SmoothData.h:51
API::MatrixWorkspace_const_sptr inputWorkspace
Definition: SmoothData.h:63
const std::string summary() const override
Summary of algorithms purpose.
Definition: SmoothData.h:45
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso algorithms related to this algorithm.
Definition: SmoothData.h:49
std::shared_ptr< const MatrixWorkspace > MatrixWorkspace_const_sptr
shared pointer to the matrix workspace base class (const version)
HistogramData::Histogram smooth(const HistogramData::Histogram &histogram, int npts)
Helper class which provides the Collimation Length for SANS instruments.