|
Mantid
|
Multiple scattering absorption correction, originally used to correct vanadium spectrum at IPNS. More...
#include <CalculateCarpenterSampleCorrection.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. | |
| 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 | calculate_abs_correction (const double angle_deg, const double radius, const double coeff1, const double coeff2, const double coeff3, const HistogramData::Points &wavelength, HistogramData::HistogramY &y_val) |
| CalculateCarpenterSampleCorrection correction calculation. | |
| void | calculate_ms_correction (const double angle_deg, const double radius, const double coeff1, const double coeff2, const double coeff3, const HistogramData::Points &wavelength, HistogramData::HistogramY &y_val) |
| API::MatrixWorkspace_sptr | createOutputWorkspace (const API::MatrixWorkspace_sptr &inputWS, const std::string &) const |
| void | deleteWorkspace (const API::MatrixWorkspace_sptr &workspace) |
| void | exec () override |
| Execute the algorithm. | |
| void | init () override |
| Initialize the properties to default values. | |
| API::MatrixWorkspace_sptr | setUncertainties (const API::MatrixWorkspace_sptr &workspace) |
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) |
Multiple scattering absorption correction, originally used to correct vanadium spectrum at IPNS.
Algorithm originally worked out by Jack Carpenter and Asfia Huq and implmented in Java by Alok Chatterjee. Translated to C++ by Dennis Mikkelson.
Definition at line 21 of file CalculateCarpenterSampleCorrection.h.
|
private |
CalculateCarpenterSampleCorrection correction calculation.
This method will change the values in the y_val array to correct for multiple scattering absorption.
Parameter total_path is in meters, and the sample radius is in cm.
| angle_deg | :: The scattering angle (two theta) in degrees |
| radius | :: The sample rod radius in cm |
| coeff1 | :: The absorption cross section / 1.81 |
| coeff2 | :: The density |
| coeff3 | :: The total scattering cross section |
| wavelength | :: Array of wavelengths at bin boundaries (or bin centers) for the spectrum, in Angstroms |
| y_val | :: The spectrum values |
Definition at line 330 of file CalculateCarpenterSampleCorrection.cpp.
References Mantid::Geometry::Z.
Referenced by exec().
|
private |
Definition at line 359 of file CalculateCarpenterSampleCorrection.cpp.
References Mantid::Geometry::Z.
Referenced by exec().
|
override |
Algorithm's category for identification overriding a virtual method.
Definition at line 81 of file CalculateCarpenterSampleCorrection.cpp.
|
private |
Definition at line 388 of file CalculateCarpenterSampleCorrection.cpp.
Referenced by exec().
|
private |
Definition at line 407 of file CalculateCarpenterSampleCorrection.cpp.
References Mantid::API::GenericDataProcessorAlgorithm< Base >::createChildAlgorithm(), and workspace.
Referenced by exec().
|
overrideprivate |
Execute the algorithm.
Definition at line 120 of file CalculateCarpenterSampleCorrection.cpp.
References Mantid::Kernel::Material::absorbXSection(), calculate_abs_correction(), calculate_ms_correction(), createOutputWorkspace(), Mantid::Kernel::Logger::debug(), deleteWorkspace(), Mantid::Kernel::equals(), Mantid::Algorithms::g_log, Mantid::API::GenericDataProcessorAlgorithm< Base >::getProperty(), Mantid::API::GenericDataProcessorAlgorithm< Base >::getPropertyValue(), index, Mantid::Kernel::Logger::information(), Mantid::Kernel::Material::name(), Mantid::Kernel::Material::numberDensity(), PARALLEL_CHECK_INTERRUPT_REGION, PARALLEL_END_INTERRUPT_REGION, PARALLEL_FOR_IF, PARALLEL_START_INTERRUPT_REGION, Mantid::Kernel::ProgressBase::report(), setUncertainties(), Mantid::Kernel::threadSafe(), Mantid::Kernel::Material::totalScatterXSection(), and Mantid::Geometry::y.
|
overrideprivate |
Initialize the properties to default values.
Definition at line 88 of file CalculateCarpenterSampleCorrection.cpp.
References Mantid::Kernel::Direction::Input, and Mantid::Kernel::Direction::Output.
|
override |
Algorithm's name for identification overriding a virtual method.
Definition at line 77 of file CalculateCarpenterSampleCorrection.cpp.
|
inlineoverride |
Definition at line 28 of file CalculateCarpenterSampleCorrection.h.
|
private |
Definition at line 399 of file CalculateCarpenterSampleCorrection.cpp.
References Mantid::API::GenericDataProcessorAlgorithm< Base >::createChildAlgorithm(), and workspace.
Referenced by exec().
|
inlineoverride |
Summary of algorithms purpose.
Definition at line 37 of file CalculateCarpenterSampleCorrection.h.
|
override |
Algorithm's version for identification overriding a virtual method.
Definition at line 79 of file CalculateCarpenterSampleCorrection.cpp.