Mantid
Loading...
Searching...
No Matches
Rebin2D.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 Algorithms {
18
24class MANTID_ALGORITHMS_DLL Rebin2D : public API::Algorithm {
25public:
26 virtual ~Rebin2D() = default;
27
29 const std::string name() const override { return "Rebin2D"; }
31 const std::string summary() const override { return "Rebins both axes of a 2D workspace using the given parameters"; }
32
34 int version() const override { return 1; }
35 const std::vector<std::string> seeAlso() const override { return {"Rebin", "SofQW"}; }
37 const std::string category() const override { return "Transforms\\Rebin"; }
38
39protected:
41 std::unique_ptr<API::Progress> m_progress;
42
43private:
45 void init() override;
47 void exec() override;
49 API::MatrixWorkspace_sptr createOutputWorkspace(const API::MatrixWorkspace_const_sptr &parent,
50 HistogramData::BinEdges &newXBins, HistogramData::BinEdges &newYBins,
51 const bool useFractionalArea) const;
52};
53
54} // namespace Algorithms
55} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
Rebins both axes of a two-dimensional workspace to the given parameters.
Definition: Rebin2D.h:24
std::unique_ptr< API::Progress > m_progress
Progress reporter.
Definition: Rebin2D.h:41
const std::string name() const override
Algorithm's name for identification.
Definition: Rebin2D.h:29
int version() const override
Algorithm's version for identification.
Definition: Rebin2D.h:34
const std::string category() const override
Algorithm's category for identification.
Definition: Rebin2D.h:37
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso algorithms related to this algorithm.
Definition: Rebin2D.h:35
const std::string summary() const override
Summary of algorithms purpose.
Definition: Rebin2D.h:31
virtual ~Rebin2D()=default
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.