Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | List of all members
Mantid::MDAlgorithms::CreateMD Class Reference

CreateMD : This workflow algorithm creates MDWorkspaces in the Q3D, HKL frame using ConvertToMD. More...

#include <CreateMD.h>

Inheritance diagram for Mantid::MDAlgorithms::CreateMD:
Mantid::API::GenericDataProcessorAlgorithm< Base >

Public Member Functions

const std::string category () const override
 Algorithm's category for identification. More...
 
const std::string name () const override
 Algorithms name for identification. More...
 
const std::vector< std::string > seeAlso () const override
 
const std::string summary () const override
 Algorithm's summary for use in the GUI and help. More...
 
int version () const override
 Algorithm's version for identification. More...
 
- Public Member Functions inherited from Mantid::API::GenericDataProcessorAlgorithm< Base >
 GenericDataProcessorAlgorithm ()
 Constructor. More...
 
Kernel::IPropertyManager::TypedValue getProperty (const std::string &name) const override
 Get the property held by this object. More...
 
std::string getPropertyValue (const std::string &name) const override
 Get the property held by this object. More...
 

Private Member Functions

void addSampleLog (const Mantid::API::MatrixWorkspace_sptr &workspace, const std::string &log_name, double log_number)
 Add a sample log to a workspace. More...
 
Mantid::API::IMDEventWorkspace_sptr convertToMD (const Mantid::API::Workspace_sptr &workspace, const std::string &analysis_mode, bool in_place, const std::string &filebackend_filename, const bool filebackend, const Mantid::API::IMDEventWorkspace_sptr &out_mdws)
 Convert a workspace to MDWorkspace. More...
 
void exec () override
 Execute the algorithm. More...
 
void init () override
 Initialize the algorithm's properties. More...
 
Mantid::API::Workspace_sptr loadWs (const std::string &filename, const std::string &wsname)
 Load data from file into a workspace. More...
 
Mantid::API::IMDEventWorkspace_sptr merge_runs (const std::vector< std::string > &to_merge)
 Merge input workspaces. More...
 
void setGoniometer (const Mantid::API::MatrixWorkspace_sptr &workspace)
 Set the goniometer values in a workspace. More...
 
void setUB (const Mantid::API::MatrixWorkspace_sptr &workspace, double a, double b, double c, double alpha, double beta, double gamma, const std::vector< double > &u, const std::vector< double > &v)
 Set the UB matrix in a workspace. More...
 
Mantid::API::IMDEventWorkspace_sptr single_run (const Mantid::API::MatrixWorkspace_sptr &input_workspace, const std::string &emode, double efix, double psi, double gl, double gs, bool in_place, const std::vector< double > &alatt, const std::vector< double > &angdeg, const std::vector< double > &u, const std::vector< double > &v, const std::string &filebackend_filename, const bool filebackend, const Mantid::API::IMDEventWorkspace_sptr &out_mdws)
 Add logs and convert to MDWorkspace for a single run. More...
 
std::map< std::string, std::string > validateInputs () override
 Validate the algorithm's input properties. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Mantid::API::GenericDataProcessorAlgorithm< Base >
Workspace_sptr assemble (const std::string &partialWSName, const std::string &outputWSName)
 Assemble the partial workspaces from all MPI processes. More...
 
Workspace_sptr assemble (Workspace_sptr partialWS)
 Assemble the partial workspaces from all MPI processes. More...
 
void copyProperty (const API::Algorithm_sptr &alg, const std::string &name)
 Copy a property from an existing algorithm. More...
 
std::shared_ptr< AlgorithmcreateChildAlgorithm (const std::string &name, const double startProgress=-1., const double endProgress=-1., const bool enableLogging=true, const int &version=-1) override
 Create a Child Algorithm. More...
 
virtual ITableWorkspace_sptr determineChunk (const std::string &filename)
 
MatrixWorkspace_sptr divide (const MatrixWorkspace_sptr lhs, const double &rhsValue)
 Divide a matrix workspace by a single value. More...
 
MatrixWorkspace_sptr divide (const MatrixWorkspace_sptr lhs, const MatrixWorkspace_sptr rhs)
 Divide a matrix workspace by another matrix workspace. More...
 
void forwardProperties ()
 
int getNThreads ()
 Return the number of MPI processes running. More...
 
std::shared_ptr< Kernel::PropertyManagergetProcessProperties (const std::string &propertyManager=std::string()) const
 Get the property manager object of a given name from the property manager data service, or create a new one. More...
 
bool isMainThread ()
 Return true if we are running on the main thread. More...
 
Workspace_sptr load (const std::string &inputData, const bool loadQuiet=false)
 Determine what kind of input data we have and load it. More...
 
virtual MatrixWorkspace_sptr loadChunk (const size_t rowIndex)
 
void mapPropertyName (const std::string &nameInProp, const std::string &nameInPropManager)
 Declare mapping of property name to name in the PropertyManager. More...
 
MatrixWorkspace_sptr minus (const MatrixWorkspace_sptr lhs, const double &rhsValue)
 Subract a single value from a matrix workspace. More...
 
MatrixWorkspace_sptr minus (const MatrixWorkspace_sptr lhs, const MatrixWorkspace_sptr rhs)
 Subract a matrix workspace by another matrix workspace. More...
 
MatrixWorkspace_sptr multiply (const MatrixWorkspace_sptr lhs, const double &rhsValue)
 Multiply a matrix workspace by a single value. More...
 
MatrixWorkspace_sptr multiply (const MatrixWorkspace_sptr lhs, const MatrixWorkspace_sptr rhs)
 Multiply a matrix workspace by another matrix workspace. More...
 
MatrixWorkspace_sptr plus (const MatrixWorkspace_sptr lhs, const double &rhsValue)
 Add a single value to a matrix workspace. More...
 
MatrixWorkspace_sptr plus (const MatrixWorkspace_sptr lhs, const MatrixWorkspace_sptr rhs)
 Add a matrix workspace to another matrix workspace. More...
 
void saveNexus (const std::string &outputWSName, const std::string &outputFile)
 Save a workspace as a nexus file, with check for which thread we are executing in. More...
 
void setAccumAlg (const std::string &alg)
 
void setLoadAlg (const std::string &alg)
 
void setLoadAlgFileProp (const std::string &filePropName)
 
void setPropManagerPropName (const std::string &propName)
 
std::vector< std::string > splitInput (const std::string &input)
 
- Protected Attributes inherited from Mantid::API::GenericDataProcessorAlgorithm< Base >
bool m_useMPI
 MPI option. If false, we will use one job event if MPI is available. More...
 

Detailed Description

CreateMD : This workflow algorithm creates MDWorkspaces in the Q3D, HKL frame using ConvertToMD.

Definition at line 26 of file CreateMD.h.

Member Function Documentation

◆ addSampleLog()

void Mantid::MDAlgorithms::CreateMD::addSampleLog ( const Mantid::API::MatrixWorkspace_sptr workspace,
const std::string &  log_name,
double  log_number 
)
private

Add a sample log to a workspace.

Definition at line 278 of file CreateMD.cpp.

References Mantid::API::GenericDataProcessorAlgorithm< Base >::createChildAlgorithm(), and workspace.

Referenced by single_run().

◆ category()

const std::string Mantid::MDAlgorithms::CreateMD::category ( ) const
override

Algorithm's category for identification.

See also
Algorithm::category

Definition at line 96 of file CreateMD.cpp.

◆ convertToMD()

Mantid::API::IMDEventWorkspace_sptr Mantid::MDAlgorithms::CreateMD::convertToMD ( const Mantid::API::Workspace_sptr workspace,
const std::string &  analysis_mode,
bool  in_place,
const std::string &  filebackend_filename,
const bool  filebackend,
const Mantid::API::IMDEventWorkspace_sptr out_mdws 
)
private

◆ exec()

void Mantid::MDAlgorithms::CreateMD::exec ( )
overrideprivate

◆ init()

void Mantid::MDAlgorithms::CreateMD::init ( )
overrideprivate

◆ loadWs()

Mantid::API::Workspace_sptr Mantid::MDAlgorithms::CreateMD::loadWs ( const std::string &  filename,
const std::string &  wsname 
)
private

Load data from file into a workspace.

Definition at line 261 of file CreateMD.cpp.

References Mantid::API::GenericDataProcessorAlgorithm< Base >::createChildAlgorithm().

Referenced by exec().

◆ merge_runs()

Mantid::API::IMDEventWorkspace_sptr Mantid::MDAlgorithms::CreateMD::merge_runs ( const std::vector< std::string > &  to_merge)
private

◆ name()

const std::string Mantid::MDAlgorithms::CreateMD::name ( ) const
override

Algorithms name for identification.

See also
Algorithm::name

Definition at line 90 of file CreateMD.cpp.

Referenced by exec().

◆ seeAlso()

const std::vector< std::string > Mantid::MDAlgorithms::CreateMD::seeAlso ( ) const
inlineoverride

Definition at line 30 of file CreateMD.h.

◆ setGoniometer()

void Mantid::MDAlgorithms::CreateMD::setGoniometer ( const Mantid::API::MatrixWorkspace_sptr workspace)
private

Set the goniometer values in a workspace.

Definition at line 297 of file CreateMD.cpp.

References Mantid::API::GenericDataProcessorAlgorithm< Base >::createChildAlgorithm(), and workspace.

Referenced by single_run().

◆ setUB()

void Mantid::MDAlgorithms::CreateMD::setUB ( const Mantid::API::MatrixWorkspace_sptr workspace,
double  a,
double  b,
double  c,
double  alpha,
double  beta,
double  gamma,
const std::vector< double > &  u,
const std::vector< double > &  v 
)
private

Set the UB matrix in a workspace.

Definition at line 325 of file CreateMD.cpp.

References Mantid::API::GenericDataProcessorAlgorithm< Base >::createChildAlgorithm(), and workspace.

Referenced by single_run().

◆ single_run()

Mantid::API::IMDEventWorkspace_sptr Mantid::MDAlgorithms::CreateMD::single_run ( const Mantid::API::MatrixWorkspace_sptr input_workspace,
const std::string &  emode,
double  efix,
double  psi,
double  gl,
double  gs,
bool  in_place,
const std::vector< double > &  alatt,
const std::vector< double > &  angdeg,
const std::vector< double > &  u,
const std::vector< double > &  v,
const std::string &  filebackend_filename,
const bool  filebackend,
const Mantid::API::IMDEventWorkspace_sptr out_mdws 
)
private

Add logs and convert to MDWorkspace for a single run.

Definition at line 429 of file CreateMD.cpp.

References addSampleLog(), Mantid::MDAlgorithms::all_given(), Mantid::MDAlgorithms::any_given(), convertToMD(), Mantid::API::g_log, setGoniometer(), setUB(), and Mantid::Kernel::Logger::warning().

Referenced by exec().

◆ summary()

const std::string Mantid::MDAlgorithms::CreateMD::summary ( ) const
override

Algorithm's summary for use in the GUI and help.

See also
Algorithm::summary

Definition at line 99 of file CreateMD.cpp.

◆ validateInputs()

std::map< std::string, std::string > Mantid::MDAlgorithms::CreateMD::validateInputs ( )
overrideprivate

Validate the algorithm's input properties.

Definition at line 466 of file CreateMD.cpp.

References Mantid::MDAlgorithms::dataExists(), and Mantid::API::GenericDataProcessorAlgorithm< Base >::getProperty().

◆ version()

int Mantid::MDAlgorithms::CreateMD::version ( ) const
override

Algorithm's version for identification.

See also
Algorithm::version

Definition at line 93 of file CreateMD.cpp.


The documentation for this class was generated from the following files: