Mantid
Loading...
Searching...
No Matches
PaddingAndApodization.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
9//----------------------------------------------------------------------
10// Includes
11//----------------------------------------------------------------------
12#include "MantidAPI/Algorithm.h"
13#include "MantidAlgorithms/DllConfig.h"
14#include "MantidHistogramData/Histogram.h"
16
17namespace Mantid {
18namespace Algorithms {
37class MANTID_ALGORITHMS_DLL PaddingAndApodization final : public API::Algorithm {
38public:
40 const std::string name() const override { return "PaddingAndApodization"; }
42 const std::string summary() const override {
43 return "This algorithm applies apodization and/or padding to input data.";
44 }
45
47 int version() const override { return 1; }
49 const std::string category() const override { return "Arithmetic\\FFT"; }
50
51private:
52 // Overridden Algorithm methods
53 void init() override;
54 void exec() override;
55 using fptr = double (*)(const double, const double);
56 fptr getApodizationFunction(const std::string &method);
57 HistogramData::Histogram applyApodizationFunction(const HistogramData::Histogram &histogram,
58 const double decayConstant, fptr function);
59 HistogramData::Histogram addPadding(const HistogramData::Histogram &histogram, const int padding);
60};
61
62} // namespace Algorithms
63} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
Takes a workspace as input and applies a apodization function and/or padding.
int version() const override
Algorithm's version for identification overriding a virtual method.
double(*)(const double, const double) fptr
const std::string name() const override
Algorithm's name for identification overriding a virtual method.
const std::string summary() const override
Summary of algorithms purpose.
const std::string category() const override
Algorithm's category for identification overriding a virtual method.
Helper class which provides the Collimation Length for SANS instruments.