Mantid
Loading...
Searching...
No Matches
ResampleX.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2012 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"
13#include <map>
14
15namespace Mantid {
16namespace Algorithms {
17
20class MANTID_ALGORITHMS_DLL ResampleX : public Algorithms::Rebin {
21public:
22 const std::string name() const override;
23 int version() const override;
24 const std::vector<std::string> seeAlso() const override {
25 return {"RebinToWorkspace", "Rebin2D", "Rebunch", "Regroup", "RebinByPulseTimes", "RebinByTimeAtSample"};
26 }
27 const std::string category() const override;
28 const std::string alias() const override;
29
31 const std::string summary() const override {
32 return "Resample the x-axis of the data with the requested number of "
33 "points.";
34 }
35
37 double determineBinning(MantidVec &xValues, const double xmin, const double xmax);
39 void setOptions(const int numBins, const bool useLogBins, const bool isDist);
40
41private:
42 const std::string workspaceMethodName() const override { return ""; } // Override the one from Rebin to ignore us
43
44 void init() override;
45 void exec() override;
46
47 std::map<std::string, std::string> validateInputs() override;
48 bool m_useLogBinning = true;
49 bool m_preserveEvents = true;
50 int m_numBins = 0;
51 bool m_isDistribution = false;
52 bool m_isHistogram = true;
53};
54
55} // namespace Algorithms
56} // namespace Mantid
Takes a workspace as input and rebins the data according to the input rebin parameters.
Definition: Rebin.h:38
ResampleX : TODO: DESCRIPTION.
Definition: ResampleX.h:20
const std::vector< std::string > seeAlso() const override
Algorithm's seeAlso.
Definition: ResampleX.h:24
const std::string summary() const override
Summary of algorithms purpose.
Definition: ResampleX.h:31
const std::string workspaceMethodName() const override
Definition: ResampleX.h:42
Helper class which provides the Collimation Length for SANS instruments.