|
Mantid
|
This is a parent algorithm that uses several different child algorithms to perform it's task. More...
#include <AlignAndFocusPowder.h>
Public Member Functions | |
| const std::string | category () const override |
| Algorithm's category for identification overriding a virtual method. | |
| const std::string | name () const override |
| Algorithm's name for identification overriding a virtual method. | |
| const std::vector< std::string > | seeAlso () const override |
| const std::string | summary () const override |
| Summary of algorithms purpose. | |
| std::map< std::string, std::string > | validateInputs () override |
| int | version () const override |
| Algorithm's version for identification overriding a virtual method. | |
Public Member Functions inherited from Mantid::API::GenericDataProcessorAlgorithm< Base > | |
| GenericDataProcessorAlgorithm () | |
| Constructor. | |
| Kernel::IPropertyManager::TypedValue | getProperty (const std::string &name) const override |
| Get the property held by this object. | |
| std::string | getPropertyValue (const std::string &name) const override |
| Get the property held by this object. | |
Private Member Functions | |
| void | compressEventsOutputWS (const double compressEventsTolerance, const double wallClockTolerance) |
| API::MatrixWorkspace_sptr | conjoinWorkspaces (const API::MatrixWorkspace_sptr &ws1, const API::MatrixWorkspace_sptr &ws2, size_t offset) |
| Add workspace2 to workspace1 by adding spectrum. | |
| void | convertOffsetsToCal (DataObjects::OffsetsWorkspace_sptr &offsetsWS) |
| API::MatrixWorkspace_sptr | convertUnits (API::MatrixWorkspace_sptr matrixws, const std::string &target) |
| Convert units. | |
| API::MatrixWorkspace_sptr | diffractionFocus (API::MatrixWorkspace_sptr ws) |
| Call diffraction focus to a matrix workspace. | |
| API::MatrixWorkspace_sptr | diffractionFocusRaggedRebinInDspace (API::MatrixWorkspace_sptr ws) |
| Call diffraction focus to a matrix workspace with ragged rebin parameters. | |
| API::MatrixWorkspace_sptr | editInstrument (API::MatrixWorkspace_sptr ws, const std::vector< double > &polars, const std::vector< specnum_t > &specids, const std::vector< double > &l2s, const std::vector< double > &phis) |
| Call edit instrument geometry. | |
| void | exec () override |
| Executes the algorithm. | |
| API::MatrixWorkspace_sptr | filterResonances (API::MatrixWorkspace_sptr matrixws) |
| Filter out absorption resonances. | |
| double | getVecPropertyFromPmOrSelf (const std::string &name, std::vector< double > &avec) |
| Function to get a vector property either from a PropertyManager or the algorithm properties. | |
| void | init () override |
| Initialisation method. | |
| void | loadCalFile (const std::string &calFilename, const std::string &groupFilename) |
| Loads the .cal file if necessary. | |
| API::MatrixWorkspace_sptr | rebin (API::MatrixWorkspace_sptr matrixws) |
| Rebin. | |
| API::MatrixWorkspace_sptr | rebinRagged (API::MatrixWorkspace_sptr matrixws, const bool inDspace) |
| RebinRagged this should only be done on the final focussed workspace. | |
| bool | shouldCompressUnfocused (const double compressTolerance, const double tofmin, const double tofmax, const bool hasWallClockTolerance) |
| Return true if a rough estimate suggests that the size of the events will be smaller after compressing. | |
Private Attributes | |
| bool | binInDspace {false} |
| double | DIFCref {0.0} |
| std::vector< double > | l2s |
| API::ITableWorkspace_sptr | m_calibrationWS |
| std::vector< double > | m_delta_ragged |
| std::vector< double > | m_dmaxs |
| std::vector< double > | m_dmins |
| DataObjects::GroupingWorkspace_sptr | m_groupWS |
| API::MatrixWorkspace_sptr | m_inputW |
| std::string | m_instName |
| double | m_l1 {0.0} |
| DataObjects::EventWorkspace_sptr | m_lowResEW |
| Low resolution TOF event workspace. | |
| size_t | m_lowResSpecOffset {0} |
| Offset to low resolution TOF spectra. | |
| API::MatrixWorkspace_sptr | m_lowResW |
| Low resolution TOF matrix workspace. | |
| DataObjects::MaskWorkspace_sptr | m_maskWS |
| API::MatrixWorkspace_sptr | m_outputW |
| std::vector< double > | m_params |
| bool | m_preserveEvents {false} |
| bool | m_processLowResTOF {false} |
| Flag to process low resolution workspace. | |
| std::unique_ptr< API::Progress > | m_progress = nullptr |
| Progress reporting. | |
| int | m_resampleX {0} |
| std::vector< double > | m_resonanceLower |
| std::vector< double > | m_resonanceUpper |
| double | maxwl {0.0} |
| double | minwl {0.0} |
| std::vector< double > | phis |
| std::vector< int32_t > | specids |
| double | tmax {0.0} |
| double | tmin {0.0} |
| std::vector< double > | tths |
| double | xmax {0.0} |
| double | xmin {0.0} |
Additional Inherited Members | |
Protected Member Functions inherited from Mantid::API::GenericDataProcessorAlgorithm< Base > | |
| void | copyProperty (const API::Algorithm_sptr &alg, const std::string &name) |
| Copy a property from an existing algorithm. | |
| 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. | |
| 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. | |
| MatrixWorkspace_sptr | divide (const MatrixWorkspace_sptr lhs, const MatrixWorkspace_sptr rhs) |
| Divide a matrix workspace by another matrix workspace. | |
| void | forwardProperties () |
| 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. | |
| Workspace_sptr | load (const std::string &inputData, const bool loadQuiet=false) |
| Determine what kind of input data we have and load it. | |
| 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. | |
| MatrixWorkspace_sptr | minus (const MatrixWorkspace_sptr lhs, const double &rhsValue) |
| Subract a single value from a matrix workspace. | |
| MatrixWorkspace_sptr | minus (const MatrixWorkspace_sptr lhs, const MatrixWorkspace_sptr rhs) |
| Subract a matrix workspace by another matrix workspace. | |
| MatrixWorkspace_sptr | multiply (const MatrixWorkspace_sptr lhs, const double &rhsValue) |
| Multiply a matrix workspace by a single value. | |
| MatrixWorkspace_sptr | multiply (const MatrixWorkspace_sptr lhs, const MatrixWorkspace_sptr rhs) |
| Multiply a matrix workspace by another matrix workspace. | |
| MatrixWorkspace_sptr | plus (const MatrixWorkspace_sptr lhs, const double &rhsValue) |
| Add a single value to a matrix workspace. | |
| MatrixWorkspace_sptr | plus (const MatrixWorkspace_sptr lhs, const MatrixWorkspace_sptr rhs) |
| Add a matrix workspace to another matrix workspace. | |
| 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. | |
| 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) |
This is a parent algorithm that uses several different child algorithms to perform it's task.
Takes a workspace as input and the filename of a grouping file of a suitable format.
Definition at line 28 of file AlignAndFocusPowder.h.
|
inlineoverride |
Algorithm's category for identification overriding a virtual method.
Definition at line 38 of file AlignAndFocusPowder.h.
|
private |
Definition at line 1220 of file AlignAndFocusPowder.cpp.
References Mantid::API::GenericDataProcessorAlgorithm< Base >::createChildAlgorithm(), Mantid::API::g_log, Mantid::API::GenericDataProcessorAlgorithm< Base >::getPropertyValue(), Mantid::Kernel::Logger::information(), and m_outputW.
Referenced by exec().
|
private |
Add workspace2 to workspace1 by adding spectrum.
Definition at line 1052 of file AlignAndFocusPowder.cpp.
References Mantid::API::GenericDataProcessorAlgorithm< Base >::createChildAlgorithm(), Mantid::API::g_log, and Mantid::Kernel::Logger::information().
Referenced by exec().
|
private |
Definition at line 1107 of file AlignAndFocusPowder.cpp.
References Mantid::API::GenericDataProcessorAlgorithm< Base >::createChildAlgorithm(), m_calibrationWS, and m_instName.
Referenced by loadCalFile().
|
private |
Convert units.
Definition at line 905 of file AlignAndFocusPowder.cpp.
References Mantid::API::GenericDataProcessorAlgorithm< Base >::createChildAlgorithm(), Mantid::API::g_log, and Mantid::Kernel::Logger::information().
Referenced by exec(), and filterResonances().
|
private |
Call diffraction focus to a matrix workspace.
Definition at line 849 of file AlignAndFocusPowder.cpp.
References Mantid::API::GenericDataProcessorAlgorithm< Base >::createChildAlgorithm(), Mantid::API::g_log, Mantid::Kernel::Logger::information(), m_delta_ragged, m_groupWS, and m_preserveEvents.
Referenced by exec().
|
private |
Call diffraction focus to a matrix workspace with ragged rebin parameters.
Definition at line 876 of file AlignAndFocusPowder.cpp.
References Mantid::API::GenericDataProcessorAlgorithm< Base >::createChildAlgorithm(), Mantid::API::g_log, Mantid::Kernel::Logger::information(), m_delta_ragged, m_dmaxs, m_dmins, m_groupWS, and m_preserveEvents.
Referenced by exec().
|
private |
Call edit instrument geometry.
Definition at line 819 of file AlignAndFocusPowder.cpp.
References Mantid::API::GenericDataProcessorAlgorithm< Base >::createChildAlgorithm(), Mantid::API::g_log, Mantid::Kernel::Logger::information(), l2s, m_l1, phis, and specids.
Referenced by exec().
|
overrideprivate |
Executes the algorithm.
| Exception::FileError | If the grouping file cannot be opened or read successfully |
| runtime_error | If unable to run one of the Child Algorithms successfully |
Definition at line 359 of file AlignAndFocusPowder.cpp.
References binInDspace, compressEventsOutputWS(), conjoinWorkspaces(), convertUnits(), Mantid::DataObjects::create(), Mantid::API::GenericDataProcessorAlgorithm< Base >::createChildAlgorithm(), DIFCref, diffractionFocus(), diffractionFocusRaggedRebinInDspace(), editInstrument(), Mantid::EMPTY_DBL(), filterResonances(), Mantid::API::g_log, Mantid::API::GenericDataProcessorAlgorithm< Base >::getProperty(), Mantid::API::GenericDataProcessorAlgorithm< Base >::getPropertyValue(), getVecPropertyFromPmOrSelf(), Mantid::Kernel::Logger::information(), Mantid::PropertyNames::INPUT_WKSP(), Mantid::Kernel::SingletonHolder< T >::Instance(), l2s, loadCalFile(), m_calibrationWS, m_delta_ragged, m_dmaxs, m_dmins, m_groupWS, m_inputW, m_instName, m_l1, m_lowResEW, m_lowResSpecOffset, m_lowResW, m_maskWS, m_outputW, m_params, m_preserveEvents, m_processLowResTOF, m_progress, m_resampleX, m_resonanceLower, maxwl, minwl, Mantid::PropertyNames::OUTPUT_WKSP(), phis, rebin(), rebinRagged(), shouldCompressUnfocused(), specids, Mantid::WorkflowAlgorithms::splitVectors(), tmax, tmin, tths, Mantid::Kernel::Logger::warning(), xmax, and xmin.
|
private |
Filter out absorption resonances.
Definition at line 921 of file AlignAndFocusPowder.cpp.
References convertUnits(), Mantid::API::GenericDataProcessorAlgorithm< Base >::createChildAlgorithm(), Mantid::API::g_log, Mantid::API::GenericDataProcessorAlgorithm< Base >::getPropertyValue(), Mantid::Kernel::Logger::information(), m_resonanceLower, and m_resonanceUpper.
Referenced by exec().
|
private |
Function to get a vector property either from a PropertyManager or the algorithm properties.
If both PM and algorithm properties are specified, the algorithm one wins. The return value is the first element in the vector if it is not empty.
| name | : The algorithm property to retrieve. |
| avec | : The vector to hold the property value. |
Definition at line 343 of file AlignAndFocusPowder.cpp.
References Mantid::API::GenericDataProcessorAlgorithm< Base >::getProperty(), and name().
Referenced by exec().
|
overrideprivate |
Initialisation method.
Declares properties to be used in algorithm.
Definition at line 106 of file AlignAndFocusPowder.cpp.
References Mantid::EMPTY_DBL(), Mantid::Kernel::Direction::InOut, Mantid::Kernel::Direction::Input, Mantid::PropertyNames::INPUT_WKSP(), Mantid::Kernel::IS_DEFAULT, Mantid::API::PropertyMode::Optional, Mantid::API::FileProperty::OptionalLoad, Mantid::Kernel::Direction::Output, and Mantid::PropertyNames::OUTPUT_WKSP().
|
private |
Loads the .cal file if necessary.
Definition at line 1124 of file AlignAndFocusPowder.cpp.
References convertOffsetsToCal(), Mantid::API::GenericDataProcessorAlgorithm< Base >::createChildAlgorithm(), Mantid::API::g_log, Mantid::API::GenericDataProcessorAlgorithm< Base >::getProperty(), Mantid::Kernel::Logger::information(), m_calibrationWS, m_groupWS, m_inputW, m_instName, and m_maskWS.
Referenced by exec().
|
inlineoverride |
Algorithm's name for identification overriding a virtual method.
Definition at line 31 of file AlignAndFocusPowder.h.
Referenced by getVecPropertyFromPmOrSelf().
|
private |
Rebin.
Definition at line 953 of file AlignAndFocusPowder.cpp.
References Mantid::API::GenericDataProcessorAlgorithm< Base >::createChildAlgorithm(), Mantid::API::g_log, Mantid::Kernel::Logger::information(), m_delta_ragged, m_dmaxs, m_dmins, m_outputW, m_params, m_resampleX, and Mantid::Kernel::Logger::warning().
Referenced by exec().
|
private |
RebinRagged this should only be done on the final focussed workspace.
Definition at line 1001 of file AlignAndFocusPowder.cpp.
References Mantid::API::GenericDataProcessorAlgorithm< Base >::createChildAlgorithm(), Mantid::API::g_log, Mantid::Kernel::Logger::information(), m_delta_ragged, m_dmaxs, m_dmins, m_preserveEvents, tmax, and tmin.
Referenced by exec().
|
inlineoverride |
Definition at line 35 of file AlignAndFocusPowder.h.
|
private |
Return true if a rough estimate suggests that the size of the events will be smaller after compressing.
This assumes that the events are equally spread throughout the supplied time-of-flight range with a spacing of compressTolerance.
Definition at line 1249 of file AlignAndFocusPowder.cpp.
References Mantid::API::g_log, Mantid::Kernel::Logger::information(), m_outputW, Mantid::DataHandling::numEvents(), Mantid::API::TOF, Mantid::API::WEIGHTED, and Mantid::API::WEIGHTED_NOTIME.
Referenced by exec().
|
inlineoverride |
Summary of algorithms purpose.
Definition at line 41 of file AlignAndFocusPowder.h.
|
override |
Definition at line 250 of file AlignAndFocusPowder.cpp.
References Mantid::Kernel::Logger::error(), Mantid::API::g_log, Mantid::API::GenericDataProcessorAlgorithm< Base >::getProperty(), Mantid::API::GenericDataProcessorAlgorithm< Base >::getPropertyValue(), Mantid::PropertyNames::INPUT_WKSP(), m_inputW, m_resonanceLower, m_resonanceUpper, and Mantid::PropertyNames::OUTPUT_WKSP().
|
inlineoverride |
Algorithm's version for identification overriding a virtual method.
Definition at line 34 of file AlignAndFocusPowder.h.
|
private |
Definition at line 97 of file AlignAndFocusPowder.h.
Referenced by exec().
|
private |
Definition at line 100 of file AlignAndFocusPowder.h.
Referenced by exec().
|
private |
Definition at line 86 of file AlignAndFocusPowder.h.
Referenced by editInstrument(), and exec().
|
private |
Definition at line 81 of file AlignAndFocusPowder.h.
Referenced by convertOffsetsToCal(), exec(), and loadCalFile().
|
private |
Definition at line 94 of file AlignAndFocusPowder.h.
Referenced by diffractionFocus(), diffractionFocusRaggedRebinInDspace(), exec(), rebin(), and rebinRagged().
|
private |
Definition at line 93 of file AlignAndFocusPowder.h.
Referenced by diffractionFocusRaggedRebinInDspace(), exec(), rebin(), and rebinRagged().
|
private |
Definition at line 92 of file AlignAndFocusPowder.h.
Referenced by diffractionFocusRaggedRebinInDspace(), exec(), rebin(), and rebinRagged().
|
private |
Definition at line 83 of file AlignAndFocusPowder.h.
Referenced by diffractionFocus(), diffractionFocusRaggedRebinInDspace(), exec(), and loadCalFile().
|
private |
Definition at line 79 of file AlignAndFocusPowder.h.
Referenced by exec(), loadCalFile(), and validateInputs().
|
private |
Definition at line 89 of file AlignAndFocusPowder.h.
Referenced by convertOffsetsToCal(), exec(), and loadCalFile().
|
private |
Definition at line 84 of file AlignAndFocusPowder.h.
Referenced by editInstrument(), and exec().
|
private |
Low resolution TOF event workspace.
Definition at line 113 of file AlignAndFocusPowder.h.
Referenced by exec().
|
private |
Offset to low resolution TOF spectra.
Definition at line 117 of file AlignAndFocusPowder.h.
Referenced by exec().
|
private |
Low resolution TOF matrix workspace.
Definition at line 111 of file AlignAndFocusPowder.h.
Referenced by exec().
|
private |
Definition at line 82 of file AlignAndFocusPowder.h.
Referenced by exec(), and loadCalFile().
|
private |
Definition at line 80 of file AlignAndFocusPowder.h.
Referenced by compressEventsOutputWS(), exec(), rebin(), and shouldCompressUnfocused().
|
private |
Definition at line 90 of file AlignAndFocusPowder.h.
|
private |
Definition at line 105 of file AlignAndFocusPowder.h.
Referenced by diffractionFocus(), diffractionFocusRaggedRebinInDspace(), exec(), and rebinRagged().
|
private |
Flag to process low resolution workspace.
Definition at line 115 of file AlignAndFocusPowder.h.
Referenced by exec().
|
private |
|
private |
Definition at line 91 of file AlignAndFocusPowder.h.
|
private |
Definition at line 95 of file AlignAndFocusPowder.h.
Referenced by exec(), filterResonances(), and validateInputs().
|
private |
Definition at line 96 of file AlignAndFocusPowder.h.
Referenced by filterResonances(), and validateInputs().
|
private |
Definition at line 102 of file AlignAndFocusPowder.h.
Referenced by exec().
|
private |
Definition at line 101 of file AlignAndFocusPowder.h.
Referenced by exec().
|
private |
Definition at line 88 of file AlignAndFocusPowder.h.
Referenced by editInstrument(), and exec().
|
private |
Definition at line 85 of file AlignAndFocusPowder.h.
Referenced by editInstrument(), and exec().
|
private |
Definition at line 104 of file AlignAndFocusPowder.h.
Referenced by exec(), and rebinRagged().
|
private |
Definition at line 103 of file AlignAndFocusPowder.h.
Referenced by exec(), and rebinRagged().
|
private |
Definition at line 87 of file AlignAndFocusPowder.h.
Referenced by exec().
|
private |
Definition at line 99 of file AlignAndFocusPowder.h.
Referenced by exec().
|
private |
Definition at line 98 of file AlignAndFocusPowder.h.
Referenced by exec().