23std::vector<double> POSITIONS_IN_D{0.41192, 0.4279, 0.49076, 0.5044, 0.5191, 0.5350, 0.5526, 0.5936, 0.6178, 0.6453,
24 0.6768, 0.7134, 0.7566, 0.8089, 0.8737, 0.9571, 1.0701, 1.2356, 1.5133, 2.1401};
32 algStripPeaks->initialize();
34 auto dSpaceValidator = std::make_shared<WorkspaceUnitValidator>(
"dSpacing");
36 "Name of the input workspace. If you use the default vanadium peak "
37 "positions are used, the workspace must be in units of d-spacing.");
40 "The name of the workspace to be created as the output of the "
42 "If the input workspace is an EventWorkspace, then the output must be "
43 "different (and will be made into a Workspace2D).");
45 copyProperty(algStripPeaks,
"FWHM");
46 copyProperty(algStripPeaks,
"Tolerance");
48 copyProperty(algStripPeaks,
"BackgroundType");
49 copyProperty(algStripPeaks,
"HighBackground");
50 copyProperty(algStripPeaks,
"PeakPositionTolerance");
51 copyProperty(algStripPeaks,
"WorkspaceIndex");
59 constexpr double progressStart{0.0};
60 constexpr double progressStop{1.0};
61 const bool enableLogging{
true};
62 auto stripPeaks =
createChildAlgorithm(
"StripPeaks", progressStart, progressStop, enableLogging);
63 stripPeaks->setProperty(
"InputWorkspace", inputWS);
64 stripPeaks->setPropertyValue(
"OutputWorkspace",
getProperty(
"OutputWorkspace"));
65 stripPeaks->setProperty<
int>(
"FWHM",
getProperty(
"FWHM"));
66 stripPeaks->setProperty<
int>(
"Tolerance",
getProperty(
"Tolerance"));
67 stripPeaks->setProperty(
"PeakPositions", POSITIONS_IN_D);
68 stripPeaks->setProperty<std::string>(
"BackgroundType",
getProperty(
"BackgroundType"));
69 stripPeaks->setProperty<
bool>(
"HighBackground",
getProperty(
"HighBackground"));
70 if (!isDefault(
"WorkspaceIndex")) {
71 stripPeaks->setProperty<
int>(
"WorkspaceIndex",
getProperty(
"WorkspaceIndex"));
73 stripPeaks->setProperty<
double>(
"PeakPositionTolerance",
getProperty(
"PeakPositionTolerance"));
76 stripPeaks->executeAsChildAlg();
80 this->setProperty(
"OutputWorkspace", outputWS);
#define DECLARE_ALGORITHM(classname)
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.
Kernel::IPropertyManager::TypedValue getProperty(const std::string &name) const override
Get the property held by this object.
A property class for workspaces.
static T & Instance()
Return a reference to the Singleton instance, creating it if it does not already exist Creation is do...
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
@ Input
An input workspace.
@ Output
An output workspace.