Mantid
Loading...
Searching...
No Matches
Transpose.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2010 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
15namespace Mantid {
16
17// forward declarations
18namespace API {
19class Axis;
20}
21
22namespace Algorithms {
33class MANTID_ALGORITHMS_DLL Transpose final : public API::Algorithm {
34public:
36 const std::string name() const override { return "Transpose"; }
38 const std::string summary() const override {
39 return "Transposes a workspace, so that an N1 x N2 workspace becomes N2 x "
40 "N1.";
41 }
42
44 int version() const override { return (1); }
45 const std::vector<std::string> seeAlso() const override {
46 return {"Transpose3D", "TransposeMD", "ConvertUnits", "ConvertSpectrumAxis", "ConvertAxesToRealSpace"};
47 }
49 const std::string category() const override { return "Transforms\\Axes"; }
50
51private:
53 void init() override;
55 void exec() override;
57 API::MatrixWorkspace_sptr createOutputWorkspace(const API::MatrixWorkspace_const_sptr &inputWorkspace);
59 API::Axis *getVerticalAxis(const API::MatrixWorkspace_const_sptr &workspace) const;
60};
61
62} // namespace Algorithms
63} // namespace Mantid
IPeaksWorkspace_sptr workspace
Definition: IndexPeaks.cpp:114
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
Class to represent the axis of a workspace.
Definition: Axis.h:30
This algorithm "transposes" the bins of the input workspace into a single spectra.
Definition: Transpose.h:33
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso algorithms related to this algorithm.
Definition: Transpose.h:45
int version() const override
Algorithm's version.
Definition: Transpose.h:44
const std::string summary() const override
Summary of algorithms purpose.
Definition: Transpose.h:38
const std::string category() const override
Algorithm's category for identification.
Definition: Transpose.h:49
const std::string name() const override
Algorithm's name.
Definition: Transpose.h:36
Axis
Axis choice.
Definition: GraphOptions.h:23
std::shared_ptr< const MatrixWorkspace > MatrixWorkspace_const_sptr
shared pointer to the matrix workspace base class (const version)
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
Helper class which provides the Collimation Length for SANS instruments.