Mantid
Loading...
Searching...
No Matches
ConvertSpectrumAxis.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2009 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 Algorithms {
36class MANTID_ALGORITHMS_DLL ConvertSpectrumAxis final : public API::Algorithm {
37public:
39 const std::string name() const override { return "ConvertSpectrumAxis"; }
41 const std::string summary() const override {
42 return "Converts the axis of a Workspace2D which normally holds spectrum "
43 "numbers to some other unit, which will normally be some physical "
44 "value about the instrument such as Q, Q^2 or theta. 'Note': After "
45 "running this algorithm, some features will be unavailable on the "
46 "workspace as it will have lost all connection to the instrument. "
47 "This includes things like the 3D Instrument Display.";
48 }
49
51 int version() const override { return (1); }
53 const std::string category() const override { return "Transforms\\Units;Transforms\\Axes"; }
54
55private:
57 void init() override;
59 void exec() override;
61 double getEfixed(const Mantid::Geometry::IDetector &detector, const API::MatrixWorkspace_const_sptr &inputWS,
62 int emode) const;
63};
64
65} // namespace Algorithms
66} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
Converts the representation of the vertical axis (the one up the side of a matrix in MantidPlot) of a...
const std::string name() const override
Algorithm's name.
const std::string summary() const override
Summary of algorithms purpose.
int version() const override
Algorithm's version.
const std::string category() const override
Algorithm's category for identification.
Interface class for detector objects.
Definition: IDetector.h:43
std::shared_ptr< const MatrixWorkspace > MatrixWorkspace_const_sptr
shared pointer to the matrix workspace base class (const version)
Helper class which provides the Collimation Length for SANS instruments.