Mantid
Loading...
Searching...
No Matches
ExtractQENSMembers.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2015 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
12#include "MantidWorkflowAlgorithms/DllConfig.h"
13
14namespace Mantid {
15namespace Algorithms {
16
19class MANTID_WORKFLOWALGORITHMS_DLL ExtractQENSMembers : public API::DataProcessorAlgorithm {
20public:
21 const std::string name() const override;
22 int version() const override;
23 const std::string category() const override;
24 const std::string summary() const override;
25
26private:
27 void init() override;
28 void exec() override;
29 std::map<std::string, std::string> validateInputs() override;
30
31 std::vector<Mantid::API::MatrixWorkspace_sptr> getInputWorkspaces() const;
32
33 std::vector<double> getQValues(const std::vector<Mantid::API::MatrixWorkspace_sptr> &workspaces);
34
35 std::vector<std::string> getAxisLabels(const Mantid::API::MatrixWorkspace_sptr &workspace, size_t axisIndex) const;
36
37 std::vector<std::string> renameConvolvedMembers(const std::vector<std::string> &members,
38 const std::vector<std::string> &newNames) const;
39
40 Mantid::API::MatrixWorkspace_sptr extractSpectrum(const Mantid::API::MatrixWorkspace_sptr &inputWS, size_t spectrum);
41
43 const Mantid::API::MatrixWorkspace_sptr &spectraWorkspace);
44
45 Mantid::API::WorkspaceGroup_sptr groupWorkspaces(const std::vector<std::string> &workspaceNames);
46
47 std::vector<Mantid::API::MatrixWorkspace_sptr>
48 createMembersWorkspaces(const Mantid::API::MatrixWorkspace_sptr &initialWS, const std::vector<std::string> &members);
49
50 void appendToMembers(const Mantid::API::MatrixWorkspace_sptr &resultWS,
51 std::vector<Mantid::API::MatrixWorkspace_sptr> &members);
52
53 void setNumericAxis(const std::vector<Mantid::API::MatrixWorkspace_sptr> &workspaces,
54 const std::vector<double> &values, size_t axisIndex) const;
55
56 std::vector<std::string> addMembersToADS(const std::vector<std::string> &members,
57 const std::vector<Mantid::API::MatrixWorkspace_sptr> &memberWorkspaces,
58 const std::string &outputWSName);
59};
60
61} // namespace Algorithms
62} // namespace Mantid
std::string name
Definition Run.cpp:60
IPeaksWorkspace_sptr workspace
Data processor algorithm to be used as a parent to workflow algorithms.
ExtractQENSMembers : Extracts the fit members from a QENS fit.
std::shared_ptr< WorkspaceGroup > WorkspaceGroup_sptr
shared pointer to Mantid::API::WorkspaceGroup
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
Helper class which provides the Collimation Length for SANS instruments.