Mantid
Loading...
Searching...
No Matches
Bin2DPowderDiffraction.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2017 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"
12
13namespace Mantid {
14namespace Algorithms {
15
23class MANTID_ALGORITHMS_DLL Bin2DPowderDiffraction final : public API::Algorithm {
24public:
25 const std::string name() const override;
26 int version() const override;
27 const std::vector<std::string> seeAlso() const override { return {"Rebin2D"}; }
28 const std::string category() const override;
29 const std::string summary() const override;
31 std::map<std::string, std::string> validateInputs() override;
32
33protected:
34 std::shared_ptr<API::Progress> m_progress;
35
36private:
37 void init() override;
38 void exec() override;
40 API::MatrixWorkspace_sptr createOutputWorkspace();
41 void ReadBinsFromFile(std::vector<double> &Ybins, std::vector<std::vector<double>> &Xbins) const;
42 size_t UnifyXBins(std::vector<std::vector<double>> &Xbins) const;
43
46 void normalizeToBinArea(const API::MatrixWorkspace_sptr &outWS);
47};
48
49double calcD(double wavelength, double sintheta);
50double calcDPerp(double wavelength, double logcostheta);
51
52} // namespace Algorithms
53} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
int m_numberOfSpectra
The number of spectra in the workspace.
std::shared_ptr< API::Progress > m_progress
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso algorithms related to this algorithm.
DataObjects::EventWorkspace_sptr m_inputWS
Pointer to the input event workspace.
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
double calcDPerp(double wavelength, double logcostheta)
double calcD(double wavelength, double sintheta)
std::shared_ptr< EventWorkspace > EventWorkspace_sptr
shared pointer to the EventWorkspace class
Helper class which provides the Collimation Length for SANS instruments.