-
Notifications
You must be signed in to change notification settings - Fork 122
/
GetQsInQENSData.h
59 lines (47 loc) · 2.01 KB
/
GetQsInQENSData.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI,
// NScD Oak Ridge National Laboratory, European Spallation Source,
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
// SPDX - License - Identifier: GPL - 3.0 +
#pragma once
#include "MantidAPI/Algorithm.h"
#include "MantidAlgorithms/DllConfig.h"
#include "MantidAPI/MatrixWorkspace.h"
namespace Mantid {
namespace Algorithms {
/** Extracts Q-values from a workspace containing QENS data
Required Properties:
<UL>
<LI> InputWorkspace - The name of the workspace to extract the Q-values from
</LI>
<LI> RaiseMode - If set to true, exceptions will be raised, instead of an
empty list being returned </LI>
<LI> Qvalues - The Q-values extracted from the input workspace </LI>
</UL>
*/
class MANTID_ALGORITHMS_DLL GetQsInQENSData final : public API::Algorithm {
public:
/// Algorithm's category for identification. @see Algorithm::category
const std::string category() const override { return "Inelastic\\Indirect"; }
/// Algorithm's version for identification. @see Algorithm::version
int version() const override { return 1; }
/// Algorithm's summary for use in the GUI and help. @see Algorithm::summary
const std::string summary() const override {
return "Get Q-values in the vertical axis of a MatrixWorkspace containing "
"QENS S(Q,E) of S(theta,E) data.";
}
/// Algorithms name for identification. @see Algorithm::name
const std::string name() const override { return "GetQsInQENSData"; }
/// Cross-check properties with each other @see IAlgorithm::validateInputs
std::map<std::string, std::string> validateInputs() override;
private:
/// Initialization code
void init() override;
/// Execution code
void exec() override;
/// Extracts Q-values from the specified matrix workspace
MantidVec extractQValues(const Mantid::API::MatrixWorkspace_sptr &workspace);
};
} // namespace Algorithms
} // namespace Mantid