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

MuonProcess : Processes and analyses Muon workspace. More...

#include <MuonProcess.h>

Inheritance diagram for Mantid::WorkflowAlgorithms::MuonProcess:
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
 Algorithm's name for identification. More...
 
const std::string summary () const override
 Summary of algorithms purpose. More...
 
std::map< std::string, std::string > validateInputs () override
 Perform validation of inputs to the algorithm. 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

API::WorkspaceGroup_sptr applyDTC (const API::WorkspaceGroup_sptr &wsGroup, const DataObjects::TableWorkspace_sptr &dt)
 Applies dead time correction to the workspace group. More...
 
std::string buildErrorString (const std::vector< int > &invalidPeriods) const
 Builds an error message from a list of invalid periods. More...
 
bool checkGroups () override
 
API::MatrixWorkspace_sptr correctWorkspace (API::MatrixWorkspace_sptr ws, double loadedTimeZero)
 Applies offset, crops and rebin the workspace according to specified params. More...
 
API::WorkspaceGroup_sptr correctWorkspaces (const API::WorkspaceGroup_sptr &wsGroup, double loadedTimeZero)
 Applies offset, crops and rebins all workspaces in the group. More...
 
void exec () override
 Execute the algorithm. More...
 
API::WorkspaceGroup_sptr groupWorkspaces (const API::WorkspaceGroup_sptr &wsGroup, const DataObjects::TableWorkspace_sptr &grouping)
 Groups specified workspace group according to specified DetectorGroupingTable. More...
 
void init () override
 

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

MuonProcess : Processes and analyses Muon workspace.

Definition at line 18 of file MuonProcess.h.

Member Function Documentation

◆ applyDTC()

WorkspaceGroup_sptr Mantid::WorkflowAlgorithms::MuonProcess::applyDTC ( const API::WorkspaceGroup_sptr wsGroup,
const DataObjects::TableWorkspace_sptr dt 
)
private

Applies dead time correction to the workspace group.

Parameters
wsGroup:: Workspace group to apply correction to
dt:: Dead time table to use
Returns
Corrected workspace group

Definition at line 227 of file MuonProcess.cpp.

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

Referenced by exec().

◆ buildErrorString()

std::string Mantid::WorkflowAlgorithms::MuonProcess::buildErrorString ( const std::vector< int > &  invalidPeriods) const
private

Builds an error message from a list of invalid periods.

Builds an error message from the supplied parameters.

Parameters
invalidPeriods:: [input] Vector containing invalid periods
Returns
An error message

Definition at line 414 of file MuonProcess.cpp.

Referenced by validateInputs().

◆ category()

const std::string Mantid::WorkflowAlgorithms::MuonProcess::category ( ) const
override

Algorithm's category for identification.

See also
Algorithm::category

Definition at line 47 of file MuonProcess.cpp.

◆ checkGroups()

bool Mantid::WorkflowAlgorithms::MuonProcess::checkGroups ( )
inlineoverrideprivate

Definition at line 35 of file MuonProcess.h.

◆ correctWorkspace()

MatrixWorkspace_sptr Mantid::WorkflowAlgorithms::MuonProcess::correctWorkspace ( API::MatrixWorkspace_sptr  ws,
double  loadedTimeZero 
)
private

Applies offset, crops and rebin the workspace according to specified params.

Parameters
ws:: Workspace to correct
loadedTimeZero:: Time zero of the data, so we can calculate the offset
Returns
Corrected workspace

Definition at line 277 of file MuonProcess.cpp.

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

Referenced by correctWorkspaces().

◆ correctWorkspaces()

WorkspaceGroup_sptr Mantid::WorkflowAlgorithms::MuonProcess::correctWorkspaces ( const API::WorkspaceGroup_sptr wsGroup,
double  loadedTimeZero 
)
private

Applies offset, crops and rebins all workspaces in the group.

Applies offset, crops and rebin the workspaces in the group according to specified params.

Parameters
wsGroup:: Workspaces to correct
loadedTimeZero:: Time zero of the data, so we can calculate the offset
Returns
Corrected workspaces

Definition at line 257 of file MuonProcess.cpp.

References correctWorkspace().

Referenced by exec().

◆ exec()

void Mantid::WorkflowAlgorithms::MuonProcess::exec ( )
overrideprivate

◆ groupWorkspaces()

WorkspaceGroup_sptr Mantid::WorkflowAlgorithms::MuonProcess::groupWorkspaces ( const API::WorkspaceGroup_sptr wsGroup,
const DataObjects::TableWorkspace_sptr grouping 
)
private

Groups specified workspace group according to specified DetectorGroupingTable.

Parameters
wsGroup:: WorkspaceGroup to group
grouping:: Detector grouping table to use
Returns
Grouped workspaces

Definition at line 203 of file MuonProcess.cpp.

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

Referenced by exec().

◆ init()

void Mantid::WorkflowAlgorithms::MuonProcess::init ( )
overrideprivate

◆ name()

const std::string Mantid::WorkflowAlgorithms::MuonProcess::name ( ) const
override

Algorithm's name for identification.

See also
Algorithm::name

Definition at line 41 of file MuonProcess.cpp.

◆ summary()

const std::string Mantid::WorkflowAlgorithms::MuonProcess::summary ( ) const
inlineoverride

Summary of algorithms purpose.

Definition at line 22 of file MuonProcess.h.

◆ validateInputs()

std::map< std::string, std::string > Mantid::WorkflowAlgorithms::MuonProcess::validateInputs ( )
override

Perform validation of inputs to the algorithm.

Performs validation of inputs to the algorithm.

  • Input workspace must be single-period or a workspace group
  • Single-period input must only use period 1
  • Supplied period numbers must all be valid (between 1 and total number of periods)
  • If analysis will take place, SummedPeriodSet is mandatory
  • If ApplyDeadTimeCorrection is true, DeadTimeTable is mandatory
    Returns
    Map of parameter names to errors

Definition at line 334 of file MuonProcess.cpp.

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

◆ version()

int Mantid::WorkflowAlgorithms::MuonProcess::version ( ) const
override

Algorithm's version for identification.

See also
Algorithm::version

Definition at line 44 of file MuonProcess.cpp.


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