Mantid
Loading...
Searching...
No Matches
Rebunch.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2007 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 {
16namespace HistogramData {
17class HistogramX;
18class HistogramY;
19class HistogramE;
20} // namespace HistogramData
21namespace Algorithms {
44class MANTID_ALGORITHMS_DLL Rebunch final : public API::Algorithm {
45public:
47 const std::string name() const override { return "Rebunch"; }
49 const std::string summary() const override { return "Rebins data by adding together 'n_bunch' successive bins."; }
50
52 int version() const override { return 1; }
53 const std::vector<std::string> seeAlso() const override { return {"Rebin"}; }
55 const std::string category() const override { return "Transforms\\Rebin"; }
56
57private:
58 // Overridden Algorithm methods
59 void init() override;
60 void exec() override;
61 void rebunch_hist_counts(const HistogramData::HistogramX &xold, const HistogramData::HistogramY &yold,
62 const HistogramData::HistogramE &eold, HistogramData::HistogramX &xnew,
63 HistogramData::HistogramY &ynew, HistogramData::HistogramE &enew, const size_t n_bunch);
64 void rebunch_hist_frequencies(const HistogramData::HistogramX &xold, const HistogramData::HistogramY &yold,
65 const HistogramData::HistogramE &eold, HistogramData::HistogramX &xnew,
66 HistogramData::HistogramY &ynew, HistogramData::HistogramE &enew, const size_t n_bunch);
67 void rebunch_point(const HistogramData::HistogramX &xold, const HistogramData::HistogramY &yold,
68 const HistogramData::HistogramE &eold, HistogramData::HistogramX &xnew,
69 HistogramData::HistogramY &ynew, HistogramData::HistogramE &enew, const size_t n_bunch);
70};
71
72} // namespace Algorithms
73} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
Takes a workspace as input and rebunches the data according to the input rebunch parameters.
Definition: Rebunch.h:44
const std::string summary() const override
Summary of algorithms purpose.
Definition: Rebunch.h:49
int version() const override
Algorithm's version for identification overriding a virtual method.
Definition: Rebunch.h:52
const std::string name() const override
Algorithm's name for identification overriding a virtual method.
Definition: Rebunch.h:47
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso algorithms related to this algorithm.
Definition: Rebunch.h:53
const std::string category() const override
Algorithm's category for identification overriding a virtual method.
Definition: Rebunch.h:55
Helper class which provides the Collimation Length for SANS instruments.