Mantid
|
ExtractQENSMembers : Extracts the fit members from a QENS fit. More...
#include <ExtractQENSMembers.h>
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::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 | |
std::vector< std::string > | addMembersToADS (const std::vector< std::string > &members, const std::vector< Mantid::API::MatrixWorkspace_sptr > &memberWorkspaces, const std::string &outputWSName) |
Adds the specified member workspaces to the analysis data service. More... | |
Mantid::API::MatrixWorkspace_sptr | appendSpectra (const Mantid::API::MatrixWorkspace_sptr &inputWS, const Mantid::API::MatrixWorkspace_sptr &spectraWorkspace) |
Appends the spectra of a specified workspace to another specified input workspace. More... | |
void | appendToMembers (const Mantid::API::MatrixWorkspace_sptr &resultWS, std::vector< Mantid::API::MatrixWorkspace_sptr > &members) |
Appends the n-th spectra in the specified result workspace to the n-th specified member workspace. More... | |
std::vector< Mantid::API::MatrixWorkspace_sptr > | createMembersWorkspaces (const Mantid::API::MatrixWorkspace_sptr &initialWS, const std::vector< std::string > &members) |
Creates the member workspaces from an initial result workspace and the member names. More... | |
void | exec () override |
Mantid::API::MatrixWorkspace_sptr | extractSpectrum (const Mantid::API::MatrixWorkspace_sptr &inputWS, size_t spectrum) |
Extracts the specified spectrum from the specified spectrum. More... | |
std::vector< std::string > | getAxisLabels (const Mantid::API::MatrixWorkspace_sptr &workspace, size_t axisIndex) const |
Retrieves the axis labels from the axis with the specified index, in the specified workspace. More... | |
std::vector< Mantid::API::MatrixWorkspace_sptr > | getInputWorkspaces () const |
std::vector< double > | getQValues (const std::vector< Mantid::API::MatrixWorkspace_sptr > &workspaces) |
Extracts the Q-Values from the specified workspace. More... | |
Mantid::API::WorkspaceGroup_sptr | groupWorkspaces (const std::vector< std::string > &workspaceNames) |
Groups the workspaces with the specified name. More... | |
void | init () override |
Initialize the algorithm's properties. More... | |
std::vector< std::string > | renameConvolvedMembers (const std::vector< std::string > &members, const std::vector< std::string > &newNames) const |
Renames the convolved members in the specified vector of members, to the respective names in the specified new names vector. More... | |
void | setNumericAxis (const std::vector< Mantid::API::MatrixWorkspace_sptr > &workspaces, const std::vector< double > &values, size_t axisIndex) const |
Creates and sets a numeric axis, filled with the specified values, on each of the specified workspaces at the specified axis index. More... | |
std::map< std::string, std::string > | validateInputs () 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< Algorithm > | createChildAlgorithm (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::PropertyManager > | getProcessProperties (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... | |
ExtractQENSMembers : Extracts the fit members from a QENS fit.
Definition at line 18 of file ExtractQENSMembers.h.
|
private |
Adds the specified member workspaces to the analysis data service.
members | The name of the members; corresponds to each member workspace. |
memberWorkspaces | The member workspaces. |
outputWSName | The name of the output workspace; used as a prefix. |
Definition at line 283 of file ExtractQENSMembers.cpp.
References count, Mantid::Kernel::SingletonHolder< T >::Instance(), name(), and std::to_string().
Referenced by exec().
|
private |
Appends the spectra of a specified workspace to another specified input workspace.
inputWS | The input workspace to append to. |
spectraWorkspace | The workspace whose spectra to append. |
Definition at line 198 of file ExtractQENSMembers.cpp.
References Mantid::API::GenericDataProcessorAlgorithm< Base >::createChildAlgorithm().
Referenced by appendToMembers().
|
private |
Appends the n-th spectra in the specified result workspace to the n-th specified member workspace.
resultWS | The result workspace. |
members | A vector containing the member workspaces. |
Definition at line 246 of file ExtractQENSMembers.cpp.
References appendSpectra(), and extractSpectrum().
Referenced by exec().
|
override |
Algorithm's category for identification.
Definition at line 38 of file ExtractQENSMembers.cpp.
|
private |
Creates the member workspaces from an initial result workspace and the member names.
initialWS | The initial result workspace. |
members | A vector of the member names. |
Definition at line 230 of file ExtractQENSMembers.cpp.
References extractSpectrum().
Referenced by exec().
|
overrideprivate |
Definition at line 77 of file ExtractQENSMembers.cpp.
References addMembersToADS(), appendToMembers(), createMembersWorkspaces(), getAxisLabels(), getInputWorkspaces(), Mantid::API::GenericDataProcessorAlgorithm< Base >::getProperty(), getQValues(), groupWorkspaces(), renameConvolvedMembers(), and setNumericAxis().
|
private |
Extracts the specified spectrum from the specified spectrum.
inputWS | The workspace whose spectrum to extract. |
spectrum | The spectrum to extract. |
Definition at line 181 of file ExtractQENSMembers.cpp.
References Mantid::API::GenericDataProcessorAlgorithm< Base >::createChildAlgorithm().
Referenced by appendToMembers(), and createMembersWorkspaces().
|
private |
Retrieves the axis labels from the axis with the specified index, in the specified workspace.
workspace | The workspace whose axis labels to retrieve. |
axisIndex | The index of the axis whose labels retrieve. |
Definition at line 140 of file ExtractQENSMembers.cpp.
References workspace.
Referenced by exec().
|
private |
Definition at line 99 of file ExtractQENSMembers.cpp.
References Mantid::API::GenericDataProcessorAlgorithm< Base >::getProperty(), Mantid::Kernel::SingletonHolder< T >::Instance(), and name().
Referenced by exec().
|
private |
Extracts the Q-Values from the specified workspace.
workspaces | The workspaces whose Q-Values to extract. |
Definition at line 119 of file ExtractQENSMembers.cpp.
References Mantid::API::GenericDataProcessorAlgorithm< Base >::createChildAlgorithm(), and workspace.
Referenced by exec().
|
private |
Groups the workspaces with the specified name.
workspaceNames | A vector of the names of the workspaces to group. |
Definition at line 214 of file ExtractQENSMembers.cpp.
References Mantid::API::GenericDataProcessorAlgorithm< Base >::createChildAlgorithm().
Referenced by exec().
|
overrideprivate |
Initialize the algorithm's properties.
Definition at line 46 of file ExtractQENSMembers.cpp.
References Mantid::Kernel::Direction::Input, Mantid::API::PropertyMode::Optional, and Mantid::Kernel::Direction::Output.
|
override |
Algorithms name for identification.
Definition at line 32 of file ExtractQENSMembers.cpp.
Referenced by addMembersToADS(), and getInputWorkspaces().
|
private |
Renames the convolved members in the specified vector of members, to the respective names in the specified new names vector.
members | A vector of the members. |
newNames | The names to use in renaming. |
Definition at line 159 of file ExtractQENSMembers.cpp.
References index.
Referenced by exec().
|
private |
Creates and sets a numeric axis, filled with the specified values, on each of the specified workspaces at the specified axis index.
workspaces | The workspaces whose axis to set. |
values | The values used to create the numeric axis. |
axisIndex | The index of the axis to set. |
Definition at line 260 of file ExtractQENSMembers.cpp.
References workspace.
Referenced by exec().
|
override |
Algorithm's summary for use in the GUI and help.
Definition at line 41 of file ExtractQENSMembers.cpp.
|
overrideprivate |
Definition at line 66 of file ExtractQENSMembers.cpp.
References Mantid::API::GenericDataProcessorAlgorithm< Base >::getProperty().
|
override |
Algorithm's version for identification.
Definition at line 35 of file ExtractQENSMembers.cpp.