Mantid
Loading...
Searching...
No Matches
CreateMD.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
11#include "MantidMDAlgorithms/DllConfig.h"
12namespace Mantid {
13namespace MDAlgorithms {
14
15void MANTID_MDALGORITHMS_DLL padParameterVector(std::vector<double> &param_vector, const size_t grow_to_size);
16
17bool any_given(const std::vector<std::vector<double>> &params);
18
19bool all_given(const std::vector<std::vector<double>> &params);
20
21extern bool dataExists(const std::string &data_name);
22
26class MANTID_MDALGORITHMS_DLL CreateMD : public API::DataProcessorAlgorithm {
27public:
28 const std::string name() const override;
29 int version() const override;
30 const std::vector<std::string> seeAlso() const override { return {"CreateMDWorkspace"}; }
31 const std::string category() const override;
32 const std::string summary() const override;
33
34private:
35 void init() override;
36 void exec() override;
37
39 Mantid::API::Workspace_sptr loadWs(const std::string &filename, const std::string &wsname);
40
42 void addSampleLog(const Mantid::API::MatrixWorkspace_sptr &workspace, const std::string &log_name, double log_number);
43
45 void setGoniometer(const Mantid::API::MatrixWorkspace_sptr &workspace);
46
48 void setUB(const Mantid::API::MatrixWorkspace_sptr &workspace, double a, double b, double c, double alpha,
49 double beta, double gamma, const std::vector<double> &u, const std::vector<double> &v);
50
53 const std::string &analysis_mode, bool in_place,
54 const std::string &filebackend_filename, const bool filebackend,
56
58 Mantid::API::IMDEventWorkspace_sptr merge_runs(const std::vector<std::string> &to_merge);
59
62 const std::string &emode, double efix, double psi, double gl,
63 double gs, bool in_place, const std::vector<double> &alatt,
64 const std::vector<double> &angdeg, const std::vector<double> &u,
65 const std::vector<double> &v, const std::string &filebackend_filename,
66 const bool filebackend,
68
70 std::map<std::string, std::string> validateInputs() override;
71};
72
73} // namespace MDAlgorithms
74} // namespace Mantid
IPeaksWorkspace_sptr workspace
Definition: IndexPeaks.cpp:114
Data processor algorithm to be used as a parent to workflow algorithms.
CreateMD : This workflow algorithm creates MDWorkspaces in the Q3D, HKL frame using ConvertToMD.
Definition: CreateMD.h:26
const std::vector< std::string > seeAlso() const override
Definition: CreateMD.h:30
std::shared_ptr< IMDEventWorkspace > IMDEventWorkspace_sptr
Shared pointer to Mantid::API::IMDEventWorkspace.
std::shared_ptr< Workspace > Workspace_sptr
shared pointer to Mantid::API::Workspace
Definition: Workspace_fwd.h:20
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
void MANTID_MDALGORITHMS_DLL padParameterVector(std::vector< double > &param_vector, const size_t grow_to_size)
Pad vector of parameters to given length.
Definition: CreateMD.cpp:40
bool MANTID_MDALGORITHMS_DLL dataExists(const std::string &data_name)
Check if the named data source is an existing workspace or file.
bool any_given(const std::vector< std::vector< double > > &params)
Definition: CreateMD.cpp:56
bool all_given(const std::vector< std::vector< double > > &params)
Definition: CreateMD.cpp:73
Helper class which provides the Collimation Length for SANS instruments.