13#include "MantidHistogramData/Histogram.h"
14#include "MantidHistogramData/Interpolate.h"
36 return "Loads ISIS reflectometry polarization efficiency factors from files: "
37 "one factor per file.";
41 return {
"CreatePolarizationEfficiencies",
"JoinISISPolarizationEfficiencies",
"PolarizationEfficiencyCor"};
49 "Path to the file containing the Pp polarization efficiency "
53 "Path to the file containing the Ap polarization efficiency "
57 "Path to the file containing the Rho polarization efficiency "
61 "Path to the file containing the Alpha polarization efficiency "
65 "Path to the file containing the P1 polarization efficiency "
69 "Path to the file containing the P2 polarization efficiency "
73 "Path to the file containing the F1 polarization efficiency "
77 "Path to the file containing the F2 polarization efficiency "
89 for (
auto const &propName : props) {
95 auto ws = std::dynamic_pointer_cast<MatrixWorkspace>(output);
97 throw std::invalid_argument(
"File " + propName +
" cannot be loaded into a MatrixWorkspace.");
99 if (ws->getNumberHistograms() != 1) {
100 throw std::runtime_error(
"Loaded workspace must contain a single histogram. Found " +
103 alg->setProperty(propName, ws);
#define DECLARE_ALGORITHM(classname)
void declareProperty(std::unique_ptr< Kernel::Property > p, const std::string &doc="") override
Add a property to the list of managed properties.
std::string getPropertyValue(const std::string &name) const override
Get the value of a property as a string.
virtual 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)
Create a Child Algorithm.
@ OptionalLoad
to specify a file to read but the file doesn't have to exist
static std::string const Rho
static std::string const Ap
static std::string const P2
static std::string const Pp
Names of the efficiency properties.
static std::string const F1
static std::string const Alpha
void initOutputWorkspace()
static std::string const F2
static std::string const P1
LoadISISPolarizationEfficiencies : Load reflectometry polarization efficiency correction factors from...
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso (these are not validated) algorithms related to this algorithm....
int version() const override
Algorithm's version for identification.
const std::string summary() const override
Algorithm's summary for use in the GUI and help.
API::MatrixWorkspace_sptr createEfficiencies(std::vector< std::string > const &props) override
Load efficiencies from files and put them into a single workspace.
void init() override
Initialize the algorithm's properties.
std::shared_ptr< Workspace > Workspace_sptr
shared pointer to Mantid::API::Workspace
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
std::string to_string(const wide_integer< Bits, Signed > &n)