Mantid
Loading...
Searching...
No Matches
SmoothMD.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2015 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 "MantidMDAlgorithms/DllConfig.h"
11#include <memory>
12#include <optional>
13
14namespace Mantid {
15namespace API {
16class IMDHistoWorkspace;
17}
18namespace MDAlgorithms {
19
20MANTID_MDALGORITHMS_DLL std::vector<double> gaussianKernel(const double fwhm);
21MANTID_MDALGORITHMS_DLL std::vector<double> normaliseKernel(std::vector<double> kernel);
22MANTID_MDALGORITHMS_DLL std::vector<double> renormaliseKernel(std::vector<double> kernel,
23 const std::vector<bool> &validity);
24
27class MANTID_MDALGORITHMS_DLL SmoothMD final : public API::Algorithm {
28public:
29 const std::string name() const override;
30 int version() const override;
31 const std::vector<std::string> seeAlso() const override { return {"ThresholdMD"}; }
32 const std::string category() const override;
33 const std::string summary() const override;
34 std::map<std::string, std::string> validateInputs() override;
35
36 std::shared_ptr<Mantid::API::IMDHistoWorkspace>
37 hatSmooth(const std::shared_ptr<const Mantid::API::IMDHistoWorkspace> &toSmooth,
38 const std::vector<double> &widthVector, const std::shared_ptr<Mantid::API::IMDHistoWorkspace> &weightingWS);
39
40 std::shared_ptr<Mantid::API::IMDHistoWorkspace>
41 gaussianSmooth(const std::shared_ptr<const Mantid::API::IMDHistoWorkspace> &toSmooth,
42 const std::vector<double> &widthVector,
43 const std::shared_ptr<Mantid::API::IMDHistoWorkspace> &weightingWS);
44
45private:
46 void init() override;
47 void exec() override;
48};
49
50} // namespace MDAlgorithms
51} // namespace Mantid
std::string name
Definition Run.cpp:60
Base class from which all concrete algorithm classes should be derived.
Definition Algorithm.h:76
SmoothMD : Algorithm for smoothing MDHistoWorkspaces.
Definition SmoothMD.h:27
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso (these are not validated) algorithms related to this algorithm....
Definition SmoothMD.h:31
MANTID_MDALGORITHMS_DLL std::vector< double > gaussianKernel(const double fwhm)
Definition SmoothMD.cpp:77
MANTID_MDALGORITHMS_DLL std::vector< double > renormaliseKernel(std::vector< double > kernel, const std::vector< bool > &validity)
Definition SmoothMD.cpp:114
MANTID_MDALGORITHMS_DLL std::vector< double > normaliseKernel(std::vector< double > kernel)
Definition SmoothMD.cpp:131
Helper class which provides the Collimation Length for SANS instruments.