Mantid
Loading...
Searching...
No Matches
IQTransform.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2011 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"
15
16namespace Mantid {
17namespace Kernel {
18namespace Units {
19class Label;
20}
21} // namespace Kernel
22
23namespace Algorithms {
51class MANTID_ALGORITHMS_DLL IQTransform final : public API::Algorithm {
52public:
54 const std::string name() const override { return "IQTransform"; }
56 const std::string summary() const override {
57 return "This algorithm provides various functions that are sometimes used "
58 "to linearise the output of a 'SANS' data reduction prior to "
59 "fitting it.";
60 }
61
62 int version() const override { return (1); }
63 const std::string category() const override { return "SANS"; }
64
65private:
66 void init() override;
67 void exec() override;
68
69 inline API::MatrixWorkspace_sptr subtractBackgroundWS(const API::MatrixWorkspace_sptr &ws,
70 const API::MatrixWorkspace_sptr &background);
71
73 using TransformMap = std::map<std::string, TransformFunc>;
75
76 std::shared_ptr<Kernel::Units::Label> m_label;
77
78 // A function for each transformation
79 void guinierSpheres(const API::MatrixWorkspace_sptr &ws);
80 void guinierRods(const API::MatrixWorkspace_sptr &ws);
81 void guinierSheets(const API::MatrixWorkspace_sptr &ws);
82 void zimm(const API::MatrixWorkspace_sptr &ws);
83 void debyeBueche(const API::MatrixWorkspace_sptr &ws);
84 void kratky(const API::MatrixWorkspace_sptr &ws);
85 void porod(const API::MatrixWorkspace_sptr &ws);
86 void holtzer(const API::MatrixWorkspace_sptr &ws);
87 void logLog(const API::MatrixWorkspace_sptr &ws);
88 void general(const API::MatrixWorkspace_sptr &ws);
89};
90
91} // namespace Algorithms
92} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
This algorithm permits the linearisation of reduced SANS data by applying a chosen transformation to ...
Definition: IQTransform.h:51
std::map< std::string, TransformFunc > TransformMap
Definition: IQTransform.h:73
const std::string category() const override
function to return a category of the algorithm.
Definition: IQTransform.h:63
int version() const override
function to return a version of the algorithm, must be overridden in all algorithms
Definition: IQTransform.h:62
TransformMap m_transforms
A map of transformation name and function pointers.
Definition: IQTransform.h:74
const std::string summary() const override
Summary of algorithms purpose.
Definition: IQTransform.h:56
const std::string name() const override
function to return a name of the algorithm, must be overridden in all algorithms
Definition: IQTransform.h:54
std::shared_ptr< Kernel::Units::Label > m_label
Definition: IQTransform.h:76
void(IQTransform::*)(const API::MatrixWorkspace_sptr &) TransformFunc
Definition: IQTransform.h:72
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
Helper class which provides the Collimation Length for SANS instruments.