Mantid
Loading...
Searching...
No Matches
PDFFourierTransform2.h
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 +
7#pragma once
8
11#include "MantidAlgorithms/DllConfig.h"
12
13namespace Mantid {
14namespace Algorithms {
15
18class MANTID_ALGORITHMS_DLL PDFFourierTransform2 : public API::Algorithm {
19public:
20 virtual ~PDFFourierTransform2() = default;
22 const std::string name() const override;
24 const std::string summary() const override {
25 return "Fourier transform from S(Q) to G(r), which is paired distribution "
26 "function (PDF). G(r) will be stored in another named workspace.";
27 }
28
30 int version() const override;
31 const std::vector<std::string> seeAlso() const override { return {"FFT"}; }
33 const std::string category() const override;
35 std::map<std::string, std::string> validateInputs() override;
36 void convertToLittleGRMinus1(std::vector<double> &FOfR, const std::vector<double> &R, std::vector<double> &DFOfR,
37 const std::vector<double> &DR, const std::string &PDFType, const double &rho0,
38 const double &cohScatLen);
39
40protected:
41 size_t determineMinIndex(double min, const std::vector<double> &X, const std::vector<double> &Y);
42 size_t determineMaxIndex(double max, const std::vector<double> &X, const std::vector<double> &Y);
43
44private:
46 void init() override;
48 void exec() override;
49
50 double determineRho0();
51 void convertToSQMinus1(std::vector<double> &FOfQ, std::vector<double> &Q, std::vector<double> &DFOfQ,
52 const std::vector<double> &DQ);
53 void convertFromSQMinus1(HistogramData::HistogramY &FOfQ, const HistogramData::HistogramX &Q,
54 HistogramData::HistogramE &DFOfQ);
55 void convertFromLittleGRMinus1(HistogramData::HistogramY &FOfR, const HistogramData::HistogramX &R,
56 HistogramData::HistogramE &DFOfR, const std::string &PDFType, const double &rho0,
57 const double &cohScatLen);
58};
59
60} // namespace Algorithms
61} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
PDFFourierTransform : TODO: DESCRIPTION.
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso algorithms related to this algorithm.
const std::string summary() const override
Summary of algorithms purpose.
Helper class which provides the Collimation Length for SANS instruments.