Mantid
Loading...
Searching...
No Matches
ConvertAxesToRealSpace.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2014 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
13#include <map>
14
15namespace Mantid {
16
17namespace Algorithms {
18
22class MANTID_ALGORITHMS_DLL ConvertAxesToRealSpace final : public API::Algorithm {
23public:
24 const std::string name() const override;
25 int version() const override;
26 const std::vector<std::string> seeAlso() const override { return {"ConvertSpectrumAxis", "ConvertUnits"}; }
27 const std::string category() const override;
28 const std::string summary() const override;
29
30private:
31 void init() override;
32 void exec() override;
33
35 struct SpectraData {
38 double intensity;
39 double error;
42 };
43
45 struct AxisData {
46 std::string label;
47 double min;
48 double max;
49 int bins;
50 };
51
52 // map to store unit captions and measures
53 std::map<std::string, std::string> m_unitMap;
54
55 void fillAxisValues(MantidVec &vector, const AxisData &axisData, bool isHistogram);
56 void fillUnitMap(std::vector<std::string> &orderedVector, std::map<std::string, std::string> &unitMap,
57 const std::string &caption, const std::string &unit);
58};
59
60} // namespace Algorithms
61} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
ConvertAxesToRealSpace : Converts the spectrum and TOF axes to real space values, integrating the dat...
std::map< std::string, std::string > m_unitMap
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso algorithms related to this algorithm.
Helper class which provides the Collimation Length for SANS instruments.