Mantid
Loading...
Searching...
No Matches
UnwrapSNS.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2008 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"
14#include "MantidAlgorithms/DllConfig.h"
16
17namespace Mantid {
18namespace Algorithms {
35class MANTID_ALGORITHMS_DLL UnwrapSNS final : public API::Algorithm, public API::DeprecatedAlgorithm {
36public:
37 UnwrapSNS();
38 ~UnwrapSNS() override = default;
39 const std::string name() const override { return "UnwrapSNS"; }
41 const std::string summary() const override {
42 return "Takes an input workspace that contains 'raw' data, unwraps the "
43 "data according to the reference flightpath provided and converts "
44 "the units to wavelength. The output workspace will have common "
45 "bins in the maximum theoretical wavelength range.";
46 }
47
48 int version() const override { return 1; }
49
50 const std::string category() const override { return "CorrectionFunctions\\InstrumentCorrections"; }
51
52private:
53 void init() override;
54 void exec() override;
55 void execEvent();
56 void runMaskDetectors();
57
58 int unwrapX(const Mantid::HistogramData::HistogramX &, std::vector<double> &dataout, const double &Ld);
59 void getTofRangeData(const bool);
64 double m_LRef;
65 double m_Tmin;
66 double m_Tmax;
67 double m_frameWidth;
69 int m_XSize;
71 std::unique_ptr<API::Progress> m_progress;
72};
73
74} // namespace Algorithms
75} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition Algorithm.h:76
Class for marking algorithms as deprecated.
Takes an input Workspace2D that contains 'raw' data, unwraps the data according to the reference flig...
Definition UnwrapSNS.h:35
double m_conversionConstant
The constant used in the conversion from TOF.
Definition UnwrapSNS.h:60
double m_Tmin
The start of the time-of-flight frame.
Definition UnwrapSNS.h:65
double m_Tmax
The end of the time-of-flight frame.
Definition UnwrapSNS.h:66
double m_frameWidth
The width of the frame cached to speed up things.
Definition UnwrapSNS.h:67
double m_LRef
The 'reference' flightpath.
Definition UnwrapSNS.h:64
DataObjects::EventWorkspace_const_sptr m_inputEvWS
Pointer to the input event workspace.
Definition UnwrapSNS.h:63
API::MatrixWorkspace_const_sptr m_inputWS
to wavelength
Definition UnwrapSNS.h:62
int m_XSize
The size of the X vectors in the input workspace.
Definition UnwrapSNS.h:69
std::unique_ptr< API::Progress > m_progress
Progress reporting.
Definition UnwrapSNS.h:71
~UnwrapSNS() override=default
const std::string name() const override
function to return a name of the algorithm, must be overridden in all algorithms
Definition UnwrapSNS.h:39
const std::string summary() const override
Summary of algorithms purpose.
Definition UnwrapSNS.h:41
int version() const override
function to return a version of the algorithm, must be overridden in all algorithms
Definition UnwrapSNS.h:48
const std::string category() const override
function to return a category of the algorithm.
Definition UnwrapSNS.h:50
int m_numberOfSpectra
The number of spectra in the workspace.
Definition UnwrapSNS.h:68
std::shared_ptr< const MatrixWorkspace > MatrixWorkspace_const_sptr
shared pointer to the matrix workspace base class (const version)
std::shared_ptr< const EventWorkspace > EventWorkspace_const_sptr
shared pointer to a const Workspace2D
Helper class which provides the Collimation Length for SANS instruments.