Mantid
Loading...
Searching...
No Matches
DgsReduction.cpp
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
8
10#include "MantidAPI/Run.h"
23
24#include <boost/algorithm/string/erase.hpp>
25#include <boost/algorithm/string/predicate.hpp>
26#include <sstream>
27
28using namespace Mantid::Kernel;
29using namespace Mantid::API;
30using namespace Mantid::DataObjects;
31
33
34// Register the algorithm into the AlgorithmFactory
35DECLARE_ALGORITHM(DgsReduction)
36
37
38const std::string DgsReduction::name() const { return "DgsReduction"; }
39
41int DgsReduction::version() const { return 1; }
42
44const std::string DgsReduction::category() const { return "Workflow\\Inelastic"; }
45
49 // Sample setup options
50 std::string sampleSetup = "Sample Setup";
51 this->declareProperty(std::make_unique<FileProperty>("SampleInputFile", "", FileProperty::OptionalLoad, "_event.nxs"),
52 "File containing the sample data to reduce");
53 this->declareProperty(
54 std::make_unique<WorkspaceProperty<>>("SampleInputWorkspace", "", Direction::Input, PropertyMode::Optional),
55 "Workspace to be reduced");
56 this->declareProperty(std::make_unique<WorkspaceProperty<>>("SampleInputMonitorWorkspace", "", Direction::Input,
58 "A monitor workspace associated with the input sample workspace.");
59 this->declareProperty(std::make_unique<FileProperty>("DetCalFilename", "", FileProperty::OptionalLoad),
60 "A detector calibration file.");
61 this->declareProperty("RelocateDetectors", false, "Move detectors to position specified in cal file.");
62 auto mustBePositive = std::make_shared<BoundedValidator<double>>();
63 mustBePositive->setLower(0.0);
64 auto mustBePosInt = std::make_shared<BoundedValidator<int>>();
65 mustBePosInt->setLower(0);
66 this->declareProperty("IncidentEnergyGuess", EMPTY_DBL(), mustBePositive,
67 "Set the value of the incident energy guess in meV.");
68 this->declareProperty("UseIncidentEnergyGuess", false,
69 "Use the incident energy guess as the actual value "
70 "(will not be calculated).");
71 this->declareProperty("TimeZeroGuess", EMPTY_DBL(), "Set the value of time zero offset in microseconds.");
72 this->setPropertySettings("TimeZeroGuess",
73 std::make_unique<VisibleWhenProperty>("UseIncidentEnergyGuess", IS_EQUAL_TO, "1"));
74 auto mustBePositiveInt = std::make_shared<BoundedValidator<int>>();
75 mustBePositiveInt->setLower(0);
76 this->declareProperty("Monitor1SpecId", EMPTY_INT(), mustBePositiveInt,
77 "Spectrum No for the first monitor to use in Ei calculation.");
78 this->declareProperty("Monitor2SpecId", EMPTY_INT(), mustBePositiveInt,
79 "Spectrum No for the second monitor to use in Ei calculation.");
80 this->declareProperty(
81 std::make_unique<ArrayProperty<double>>("EnergyTransferRange", std::make_shared<RebinParamsValidator>(true)),
82 "A comma separated list of first bin boundary, width, last bin "
83 "boundary.\n"
84 "Negative width value indicates logarithmic binning.");
85 this->declareProperty("SofPhiEIsDistribution", true, "The final S(Phi, E) data is made to be a distribution.");
86 this->declareProperty(std::make_unique<FileProperty>("HardMaskFile", "", FileProperty::OptionalLoad, ".xml"),
87 "A file or workspace containing a hard mask.");
88 this->declareProperty(std::make_unique<FileProperty>("GroupingFile", "", FileProperty::OptionalLoad, ".xml"),
89 "A file containing grouping (mapping) information.");
90 this->declareProperty("ShowIntermediateWorkspaces", false,
91 "Flag to show the intermediate workspaces (diagnostic "
92 "mask, integrated detector vanadium, "
93 "integrated absolute units) from the reduction.");
94
95 this->setPropertyGroup("SampleInputFile", sampleSetup);
96 this->setPropertyGroup("SampleInputWorkspace", sampleSetup);
97 this->setPropertyGroup("SampleInputMonitorWorkspace", sampleSetup);
98 this->setPropertyGroup("DetCalFilename", sampleSetup);
99 this->setPropertyGroup("RelocateDetectors", sampleSetup);
100 this->setPropertyGroup("IncidentEnergyGuess", sampleSetup);
101 this->setPropertyGroup("UseIncidentEnergyGuess", sampleSetup);
102 this->setPropertyGroup("TimeZeroGuess", sampleSetup);
103 this->setPropertyGroup("Monitor1SpecId", sampleSetup);
104 this->setPropertyGroup("Monitor2SpecId", sampleSetup);
105 this->setPropertyGroup("EnergyTransferRange", sampleSetup);
106 this->setPropertyGroup("SofPhiEIsDistribution", sampleSetup);
107 this->setPropertyGroup("HardMaskFile", sampleSetup);
108 this->setPropertyGroup("GroupingFile", sampleSetup);
109 this->setPropertyGroup("ShowIntermediateWorkspaces", sampleSetup);
110
111 // Data corrections
112 std::string dataCorr = "Data Corrections";
113 // this->declareProperty("FilterBadPulses", false, "If true, filter bad pulses
114 // from data.");
115 std::vector<std::string> incidentBeamNormOptions;
116 incidentBeamNormOptions.emplace_back("None");
117 incidentBeamNormOptions.emplace_back("ByCurrent");
118 incidentBeamNormOptions.emplace_back("ToMonitor");
119 this->declareProperty("IncidentBeamNormalisation", "None",
120 std::make_shared<StringListValidator>(incidentBeamNormOptions),
121 "Options for incident beam normalisation on data.");
122 this->declareProperty("MonitorIntRangeLow", EMPTY_DBL(), "Set the lower bound for monitor integration.");
123 this->setPropertySettings("MonitorIntRangeLow", std::make_unique<VisibleWhenProperty>("IncidentBeamNormalisation",
124 IS_EQUAL_TO, "ToMonitor"));
125 this->declareProperty("MonitorIntRangeHigh", EMPTY_DBL(), "Set the upper bound for monitor integration.");
126 this->setPropertySettings("MonitorIntRangeHigh", std::make_unique<VisibleWhenProperty>("IncidentBeamNormalisation",
127 IS_EQUAL_TO, "ToMonitor"));
128 this->declareProperty("TimeIndepBackgroundSub", false,
129 "If true, time-independent background will be calculated and removed.");
130 this->declareProperty("TibTofRangeStart", EMPTY_DBL(),
131 "Set the lower TOF bound for time-independent background subtraction.");
132 this->setPropertySettings("TibTofRangeStart",
133 std::make_unique<VisibleWhenProperty>("TimeIndepBackgroundSub", IS_EQUAL_TO, "1"));
134 this->declareProperty("TibTofRangeEnd", EMPTY_DBL(),
135 "Set the upper TOF bound for time-independent background subtraction.");
136 this->setPropertySettings("TibTofRangeEnd",
137 std::make_unique<VisibleWhenProperty>("TimeIndepBackgroundSub", IS_EQUAL_TO, "1"));
138 this->declareProperty("CorrectKiKf", true, "Apply the ki/kf correction.");
139 this->declareProperty(
140 std::make_unique<FileProperty>("DetectorVanadiumInputFile", "", FileProperty::OptionalLoad, "_event.nxs"),
141 "File containing the sample detector vanadium data to reduce");
142 this->declareProperty(std::make_unique<WorkspaceProperty<>>("DetectorVanadiumInputWorkspace", "", Direction::Input,
144 "Sample detector vanadium workspace to be reduced");
145 this->declareProperty(std::make_unique<WorkspaceProperty<>>("DetectorVanadiumInputMonitorWorkspace", "",
147 "A monitor workspace associated with the input sample detector vanadium "
148 "workspace.");
149 this->declareProperty("SaveProcessedDetVan", false, "Save the processed detector vanadium workspace");
150 this->setPropertySettings("SaveProcessedDetVan",
151 std::make_unique<VisibleWhenProperty>("DetectorVanadiumInputFile", IS_NOT_EQUAL_TO, ""));
152 this->declareProperty(
153 std::make_unique<FileProperty>("SaveProcDetVanFilename", "", FileProperty::OptionalSave, ".nxs"),
154 "Provide a filename for saving the processed detector vanadium.");
155 this->declareProperty("UseProcessedDetVan", false,
156 "If true, treat the detector vanadium as processed.\n"
157 "This includes not running diagnostics on the processed data.");
158 this->declareProperty("UseBoundsForDetVan", false, "If true, integrate the detector vanadium over a given range.");
159 this->declareProperty("DetVanIntRangeLow", EMPTY_DBL(), "Set the lower bound for integrating the detector vanadium.");
160 this->setPropertySettings("DetVanIntRangeLow",
161 std::make_unique<VisibleWhenProperty>("UseBoundsForDetVan", IS_EQUAL_TO, "1"));
162 this->declareProperty("DetVanIntRangeHigh", EMPTY_DBL(),
163 "Set the upper bound for integrating the detector vanadium.");
164 this->setPropertySettings("DetVanIntRangeHigh",
165 std::make_unique<VisibleWhenProperty>("UseBoundsForDetVan", IS_EQUAL_TO, "1"));
166 std::vector<std::string> detvanIntRangeUnits;
167 detvanIntRangeUnits.emplace_back("Energy");
168 detvanIntRangeUnits.emplace_back("Wavelength");
169 detvanIntRangeUnits.emplace_back("TOF");
170 this->declareProperty("DetVanIntRangeUnits", "Energy", std::make_shared<StringListValidator>(detvanIntRangeUnits),
171 "Options for the units on the detector vanadium integration.");
172 this->setPropertySettings("DetVanIntRangeUnits",
173 std::make_unique<VisibleWhenProperty>("UseBoundsForDetVan", IS_EQUAL_TO, "1"));
174
175 // this->setPropertyGroup("FilterBadPulses", dataCorr);
176 this->setPropertyGroup("IncidentBeamNormalisation", dataCorr);
177 this->setPropertyGroup("MonitorIntRangeLow", dataCorr);
178 this->setPropertyGroup("MonitorIntRangeHigh", dataCorr);
179 this->setPropertyGroup("TimeIndepBackgroundSub", dataCorr);
180 this->setPropertyGroup("TibTofRangeStart", dataCorr);
181 this->setPropertyGroup("TibTofRangeEnd", dataCorr);
182 this->setPropertyGroup("CorrectKiKf", dataCorr);
183 this->setPropertyGroup("DetectorVanadiumInputFile", dataCorr);
184 this->setPropertyGroup("DetectorVanadiumInputWorkspace", dataCorr);
185 this->setPropertyGroup("DetectorVanadiumInputMonitorWorkspace", dataCorr);
186 this->setPropertyGroup("SaveProcessedDetVan", dataCorr);
187 this->setPropertyGroup("SaveProcDetVanFilename", dataCorr);
188 this->setPropertyGroup("UseProcessedDetVan", dataCorr);
189 this->setPropertyGroup("UseBoundsForDetVan", dataCorr);
190 this->setPropertyGroup("DetVanIntRangeLow", dataCorr);
191 this->setPropertyGroup("DetVanIntRangeHigh", dataCorr);
192 this->setPropertyGroup("DetVanIntRangeUnits", dataCorr);
193
194 // Finding bad detectors
195 std::string findBadDets = "Finding Bad Detectors";
196 this->declareProperty("HighCounts", EMPTY_DBL(), mustBePositive, "Mask detectors above this threshold.");
197 this->setPropertySettings("HighCounts",
198 std::make_unique<VisibleWhenProperty>("DetectorVanadiumInputFile", IS_NOT_EQUAL_TO, ""));
199 this->declareProperty("LowCounts", EMPTY_DBL(), mustBePositive, "Mask detectors below this threshold.");
200 this->setPropertySettings("LowCounts",
201 std::make_unique<VisibleWhenProperty>("DetectorVanadiumInputFile", IS_NOT_EQUAL_TO, ""));
202 this->declareProperty("LowOutlier", EMPTY_DBL(), "Lower bound defining outliers as fraction of median value");
203 this->setPropertySettings("LowOutlier",
204 std::make_unique<VisibleWhenProperty>("DetectorVanadiumInputFile", IS_NOT_EQUAL_TO, ""));
205 this->declareProperty("HighOutlier", EMPTY_DBL(), "Upper bound defining outliers as fraction of median value");
206 this->setPropertySettings("HighOutlier",
207 std::make_unique<VisibleWhenProperty>("DetectorVanadiumInputFile", IS_NOT_EQUAL_TO, ""));
208 this->declareProperty("MedianTestHigh", EMPTY_DBL(), mustBePositive, "Mask detectors above this threshold.");
209 this->setPropertySettings("MedianTestHigh",
210 std::make_unique<VisibleWhenProperty>("DetectorVanadiumInputFile", IS_NOT_EQUAL_TO, ""));
211 this->declareProperty("MedianTestLow", EMPTY_DBL(), mustBePositive, "Mask detectors below this threshold.");
212 this->setPropertySettings("MedianTestLow",
213 std::make_unique<VisibleWhenProperty>("DetectorVanadiumInputFile", IS_NOT_EQUAL_TO, ""));
214 this->declareProperty("MedianTestLevelsUp", 0., mustBePositive, "Mask detectors below this threshold.");
215 this->setPropertySettings("MedianTestLevelsUp",
216 std::make_unique<VisibleWhenProperty>("DetectorVanadiumInputFile", IS_NOT_EQUAL_TO, ""));
217 this->declareProperty("MedianTestCorrectForSolidAngle", false, "Flag to correct for solid angle efficiency.");
218 this->setPropertySettings("MedianTestCorrectForSolidAngle",
219 std::make_unique<VisibleWhenProperty>("DetectorVanadiumInputFile", IS_NOT_EQUAL_TO, ""));
220 this->declareProperty("ErrorBarCriterion", EMPTY_DBL(), mustBePositive,
221 "Some selection criteria for the detector tests.");
222 this->setPropertySettings("ErrorBarCriterion",
223 std::make_unique<VisibleWhenProperty>("DetectorVanadiumInputFile", IS_NOT_EQUAL_TO, ""));
224 this->declareProperty(
225 std::make_unique<FileProperty>("DetectorVanadium2InputFile", "", FileProperty::OptionalLoad, "_event.nxs"),
226 "File containing detector vanadium data to compare against");
227 this->declareProperty(std::make_unique<WorkspaceProperty<>>("DetectorVanadium2InputWorkspace", "", Direction::Input,
229 "Detector vanadium workspace to compare against");
230 this->declareProperty(std::make_unique<WorkspaceProperty<>>("DetectorVanadium2InputMonitorWorkspace", "",
232 "A monitor workspace associated with the input comparison detector "
233 "vanadium workspace.");
234
235 this->declareProperty("DetVanRatioVariation", EMPTY_DBL(), mustBePositive,
236 "Mask detectors if the time variation is above this threshold.");
237 this->setPropertySettings("DetVanRatioVariation",
238 std::make_unique<VisibleWhenProperty>("DetectorVanadium2InputFile", IS_NOT_EQUAL_TO, ""));
239
240 this->declareProperty("BackgroundCheck", false, "If true, run a background check on detector vanadium.");
241 this->declareProperty("SamBkgMedianTestHigh", EMPTY_DBL(), mustBePositive, "Mask detectors above this threshold.");
242 this->setPropertySettings("SamBkgMedianTestHigh",
243 std::make_unique<VisibleWhenProperty>("BackgroundCheck", IS_EQUAL_TO, "1"));
244 this->declareProperty("SamBkgMedianTestLow", EMPTY_DBL(), mustBePositive, "Mask detectors below this threshold.");
245 this->setPropertySettings("SamBkgMedianTestLow",
246 std::make_unique<VisibleWhenProperty>("BackgroundCheck", IS_EQUAL_TO, "1"));
247 this->declareProperty("SamBkgErrorBarCriterion", EMPTY_DBL(), mustBePositive,
248 "Some selection criteria for the detector tests.");
249 this->setPropertySettings("SamBkgErrorBarCriterion",
250 std::make_unique<VisibleWhenProperty>("BackgroundCheck", IS_EQUAL_TO, "1"));
251 this->declareProperty("BackgroundTofStart", EMPTY_DBL(), mustBePositive, "Start TOF for the background check.");
252 this->setPropertySettings("BackgroundTofStart",
253 std::make_unique<VisibleWhenProperty>("BackgroundCheck", IS_EQUAL_TO, "1"));
254 this->declareProperty("BackgroundTofEnd", EMPTY_DBL(), mustBePositive, "End TOF for the background check.");
255 this->setPropertySettings("BackgroundTofEnd",
256 std::make_unique<VisibleWhenProperty>("BackgroundCheck", IS_EQUAL_TO, "1"));
257 this->declareProperty("RejectZeroBackground", false, "If true, check the background region for anomolies.");
258 this->declareProperty("PsdBleed", false, "If true, perform a PSD bleed test.");
259 this->declareProperty("MaxFramerate", EMPTY_DBL(), "The maximum framerate to check.");
260 this->setPropertySettings("MaxFramerate", std::make_unique<VisibleWhenProperty>("PsdBleed", IS_EQUAL_TO, "1"));
261 this->declareProperty("IgnoredPixels", EMPTY_DBL(), "A list of pixels to ignore in the calculations.");
262 this->setPropertySettings("IgnoredPixels", std::make_unique<VisibleWhenProperty>("PsdBleed", IS_EQUAL_TO, "1"));
263
264 this->setPropertyGroup("HighCounts", findBadDets);
265 this->setPropertyGroup("LowCounts", findBadDets);
266 this->setPropertyGroup("LowOutlier", findBadDets);
267 this->setPropertyGroup("HighOutlier", findBadDets);
268 this->setPropertyGroup("MedianTestHigh", findBadDets);
269 this->setPropertyGroup("MedianTestLow", findBadDets);
270 this->setPropertyGroup("MedianTestLevelsUp", findBadDets);
271 this->setPropertyGroup("MedianTestCorrectForSolidAngle", findBadDets);
272 this->setPropertyGroup("ErrorBarCriterion", findBadDets);
273 this->setPropertyGroup("DetectorVanadium2InputFile", findBadDets);
274 this->setPropertyGroup("DetectorVanadium2InputWorkspace", findBadDets);
275 this->setPropertyGroup("DetectorVanadium2InputMonitorWorkspace", findBadDets);
276 this->setPropertyGroup("DetVanRatioVariation", findBadDets);
277 this->setPropertyGroup("BackgroundCheck", findBadDets);
278 this->setPropertyGroup("SamBkgMedianTestHigh", findBadDets);
279 this->setPropertyGroup("SamBkgMedianTestLow", findBadDets);
280 this->setPropertyGroup("SamBkgErrorBarCriterion", findBadDets);
281 this->setPropertyGroup("BackgroundTofStart", findBadDets);
282 this->setPropertyGroup("BackgroundTofEnd", findBadDets);
283 this->setPropertyGroup("RejectZeroBackground", findBadDets);
284 this->setPropertyGroup("PsdBleed", findBadDets);
285 this->setPropertyGroup("MaxFramerate", findBadDets);
286 this->setPropertyGroup("IgnoredPixels", findBadDets);
287
288 // Absolute units correction
289 std::string absUnitsCorr = "Absolute Units Correction";
290 this->declareProperty("DoAbsoluteUnits", false, "If true, perform an absolute units normalisation.");
291 this->declareProperty(std::make_unique<FileProperty>("AbsUnitsSampleInputFile", "", FileProperty::OptionalLoad),
292 "The sample (vanadium) file used in the absolute units normalisation.");
293 this->setPropertySettings("AbsUnitsSampleInputFile",
294 std::make_unique<VisibleWhenProperty>("DoAbsoluteUnits", IS_EQUAL_TO, "1"));
295 this->declareProperty(std::make_unique<WorkspaceProperty<>>("AbsUnitsSampleInputWorkspace", "", Direction::Input,
297 "The sample (vanadium) workspace for absolute units normalisation.");
298 this->setPropertySettings("AbsUnitsSampleInputWorkspace",
299 std::make_unique<VisibleWhenProperty>("DoAbsoluteUnits", IS_EQUAL_TO, "1"));
300 this->declareProperty(std::make_unique<WorkspaceProperty<>>("AbsUnitsSampleInputMonitorWorkspace", "",
302 "A monitor workspace associated with the input absolute units sample "
303 "workspace.");
304 this->setPropertySettings("AbsUnitsSampleInputMonitorWorkspace",
305 std::make_unique<VisibleWhenProperty>("DoAbsoluteUnits", IS_EQUAL_TO, "1"));
306 this->declareProperty("AbsUnitsGroupingFile", "", "Grouping file for absolute units normalisation.");
307 this->setPropertySettings("AbsUnitsGroupingFile",
308 std::make_unique<VisibleWhenProperty>("DoAbsoluteUnits", IS_EQUAL_TO, "1"));
309 this->declareProperty(
310 std::make_unique<FileProperty>("AbsUnitsDetectorVanadiumInputFile", "", FileProperty::OptionalLoad),
311 "The detector vanadium file used in the absolute units normalisation.");
312 this->setPropertySettings("AbsUnitsDetectorVanadiumInputFile",
313 std::make_unique<VisibleWhenProperty>("DoAbsoluteUnits", IS_EQUAL_TO, "1"));
314 this->declareProperty(std::make_unique<WorkspaceProperty<>>("AbsUnitsDetectorVanadiumInputWorkspace", "",
316 "The detector vanadium workspace for absolute units normalisation.");
317 this->setPropertySettings("AbsUnitsDetectorVanadiumInputWorkspace",
318 std::make_unique<VisibleWhenProperty>("DoAbsoluteUnits", IS_EQUAL_TO, "1"));
319 this->declareProperty(std::make_unique<WorkspaceProperty<>>("AbsUnitsDetectorVanadiumInputMonitorWorkspace", "",
321 "A monitor workspace associated with the input absolute units sample "
322 "detector vanadium workspace.");
323 this->setPropertySettings("AbsUnitsDetectorVanadiumInputMonitorWorkspace",
324 std::make_unique<VisibleWhenProperty>("DoAbsoluteUnits", IS_EQUAL_TO, "1"));
325 this->declareProperty("AbsUnitsIncidentEnergy", EMPTY_DBL(), mustBePositive,
326 "The incident energy for the vanadium sample.");
327 this->setPropertySettings("AbsUnitsIncidentEnergy",
328 std::make_unique<VisibleWhenProperty>("DoAbsoluteUnits", IS_EQUAL_TO, "1"));
329 this->declareProperty("AbsUnitsMinimumEnergy", EMPTY_DBL(), "The minimum energy for the integration range.");
330 this->setPropertySettings("AbsUnitsMinimumEnergy",
331 std::make_unique<VisibleWhenProperty>("DoAbsoluteUnits", IS_EQUAL_TO, "1"));
332 this->declareProperty("AbsUnitsMaximumEnergy", EMPTY_DBL(), "The maximum energy for the integration range.");
333 this->setPropertySettings("AbsUnitsMaximumEnergy",
334 std::make_unique<VisibleWhenProperty>("DoAbsoluteUnits", IS_EQUAL_TO, "1"));
335 this->declareProperty("VanadiumMass", EMPTY_DBL(), "The mass of vanadium.");
336 this->setPropertySettings("VanadiumMass", std::make_unique<VisibleWhenProperty>("DoAbsoluteUnits", IS_EQUAL_TO, "1"));
337 this->declareProperty("SampleMass", 1.0, "The mass of sample.");
338 this->setPropertySettings("SampleMass", std::make_unique<VisibleWhenProperty>("DoAbsoluteUnits", IS_EQUAL_TO, "1"));
339 this->declareProperty("SampleRmm", 1.0, "The rmm of sample.");
340 this->setPropertySettings("SampleRmm", std::make_unique<VisibleWhenProperty>("DoAbsoluteUnits", IS_EQUAL_TO, "1"));
341 this->declareProperty("AbsUnitsLowOutlier", EMPTY_DBL(), "Lower bound defining outliers as fraction of median value");
342 this->setPropertySettings("AbsUnitsLowOutlier",
343 std::make_unique<VisibleWhenProperty>("DoAbsoluteUnits", IS_EQUAL_TO, "1"));
344 this->declareProperty("AbsUnitsHighOutlier", EMPTY_DBL(),
345 "Upper bound defining outliers as fraction of median value");
346 this->setPropertySettings("AbsUnitsHighOutlier",
347 std::make_unique<VisibleWhenProperty>("DoAbsoluteUnits", IS_EQUAL_TO, "1"));
348 this->declareProperty("AbsUnitsMedianTestHigh", EMPTY_DBL(), mustBePositive, "Mask detectors above this threshold.");
349 this->setPropertySettings("AbsUnitsMedianTestHigh",
350 std::make_unique<VisibleWhenProperty>("DoAbsoluteUnits", IS_EQUAL_TO, "1"));
351 this->declareProperty("AbsUnitsMedianTestLow", EMPTY_DBL(), mustBePositive, "Mask detectors below this threshold.");
352 this->setPropertySettings("AbsUnitsMedianTestLow",
353 std::make_unique<VisibleWhenProperty>("DoAbsoluteUnits", IS_EQUAL_TO, "1"));
354 this->declareProperty("AbsUnitsErrorBarCriterion", EMPTY_DBL(), mustBePositive,
355 "Some selection criteria for the detector tests.");
356 this->setPropertySettings("AbsUnitsErrorBarCriterion",
357 std::make_unique<VisibleWhenProperty>("DoAbsoluteUnits", IS_EQUAL_TO, "1"));
358
359 this->setPropertyGroup("DoAbsoluteUnits", absUnitsCorr);
360 this->setPropertyGroup("AbsUnitsSampleInputFile", absUnitsCorr);
361 this->setPropertyGroup("AbsUnitsSampleInputWorkspace", absUnitsCorr);
362 this->setPropertyGroup("AbsUnitsSampleInputMonitorWorkspace", absUnitsCorr);
363 this->setPropertyGroup("AbsUnitsGroupingFile", absUnitsCorr);
364 this->setPropertyGroup("AbsUnitsDetectorVanadiumInputFile", absUnitsCorr);
365 this->setPropertyGroup("AbsUnitsDetectorVanadiumInputWorkspace", absUnitsCorr);
366 this->setPropertyGroup("AbsUnitsDetectorVanadiumInputMonitorWorkspace", absUnitsCorr);
367 this->setPropertyGroup("AbsUnitsIncidentEnergy", absUnitsCorr);
368 this->setPropertyGroup("AbsUnitsMinimumEnergy", absUnitsCorr);
369 this->setPropertyGroup("AbsUnitsMaximumEnergy", absUnitsCorr);
370 this->setPropertyGroup("VanadiumMass", absUnitsCorr);
371 this->setPropertyGroup("SampleMass", absUnitsCorr);
372 this->setPropertyGroup("SampleRmm", absUnitsCorr);
373 this->setPropertyGroup("AbsUnitsLowOutlier", absUnitsCorr);
374 this->setPropertyGroup("AbsUnitsHighOutlier", absUnitsCorr);
375 this->setPropertyGroup("AbsUnitsMedianTestHigh", absUnitsCorr);
376 this->setPropertyGroup("AbsUnitsMedianTestLow", absUnitsCorr);
377 this->setPropertyGroup("AbsUnitsErrorBarCriterion", absUnitsCorr);
378
379 // Powder data conversion
380 std::string powder = "Powder Data Conversion";
381 this->declareProperty("DoPowderDataConversion", false, "Flag to switch on converting DeltaE to SQW.");
382 this->declareProperty(
383 std::make_unique<ArrayProperty<double>>("PowderMomTransferRange", std::make_shared<RebinParamsValidator>(true)),
384 "A comma separated list of first bin boundary, width, last bin "
385 "boundary.\n"
386 "Negative width value indicates logarithmic binning.");
387 this->setPropertySettings("PowderMomTransferRange",
388 std::make_unique<VisibleWhenProperty>("DoPowderDataConversion", IS_EQUAL_TO, "1"));
389 this->declareProperty("SavePowderNexusFile", true, "Flag to use to save a processed NeXus file for powder data.");
390 this->setPropertySettings("SavePowderNexusFile",
391 std::make_unique<VisibleWhenProperty>("DoPowderDataConversion", IS_EQUAL_TO, "1"));
392 this->declareProperty(
393 std::make_unique<FileProperty>("SavePowderNexusFilename", "", FileProperty::OptionalSave, ".nxs"),
394 "Provide a filename for saving the processed powder data.");
395 this->setPropertySettings("SavePowderNexusFilename",
396 std::make_unique<VisibleWhenProperty>("DoPowderDataConversion", IS_EQUAL_TO, "1"));
397
398 this->setPropertyGroup("DoPowderDataConversion", powder);
399 this->setPropertyGroup("PowderMomTransferRange", powder);
400 this->setPropertyGroup("SavePowderNexusFile", powder);
401 this->setPropertyGroup("SavePowderNexusFilename", powder);
402
403 // Common to PD and SC
404
405 this->declareProperty(std::make_unique<WorkspaceProperty<>>("OutputWorkspace", "", Direction::Output),
406 "Provide a name for the output workspace.");
407 this->declareProperty("ReductionProperties", "__dgs_reduction_properties", Direction::Output);
408}
409
414Workspace_sptr DgsReduction::loadInputData(const std::string &prop, const bool mustLoad) {
415 g_log.debug() << "MustLoad = " << mustLoad << '\n';
416 Workspace_sptr inputWS;
417
418 const std::string inFileProp = prop + "InputFile";
419 const std::string inWsProp = prop + "InputWorkspace";
420
421 std::string inputData = this->getPropertyValue(inFileProp);
422 const std::string inputWSName = this->getPropertyValue(inWsProp);
423 if (!inputWSName.empty() && !inputData.empty()) {
424 if (mustLoad) {
425 std::ostringstream mess;
426 mess << "DgsReduction: Either the " << inFileProp << " property or ";
427 mess << inWsProp << " property must be provided, NOT BOTH!";
428 throw std::runtime_error(mess.str());
429 } else {
430 return std::shared_ptr<Workspace>();
431 }
432 } else if (!inputWSName.empty()) {
433 inputWS = this->load(inputWSName);
434 } else if (!inputData.empty()) {
435 const std::string facility = ConfigService::Instance().getFacility().name();
436 this->setLoadAlg("Load");
437 if ("ISIS" == facility) {
438 std::string detCalFileFromAlg = this->getProperty("DetCalFilename");
439 if (!detCalFileFromAlg.empty()) {
440 const std::string detCalFileProperty = prop + "DetCalFilename";
441 this->reductionManager->declareProperty(
442 std::make_unique<PropertyWithValue<std::string>>(detCalFileProperty, detCalFileFromAlg));
443 }
444 }
445
446 inputWS = this->load(inputData, true);
447
448 auto smlog = createChildAlgorithm("AddSampleLog");
449 smlog->setProperty("Workspace", inputWS);
450 smlog->setProperty("LogName", "Filename");
451 smlog->setProperty("LogText", inputData);
452 smlog->executeAsChildAlg();
453 } else {
454 if (mustLoad) {
455 std::ostringstream mess;
456 mess << "DgsReduction: Either the " << inFileProp << " property or ";
457 mess << inWsProp << " property must be provided!";
458 throw std::runtime_error(mess.str());
459 } else {
460 return std::shared_ptr<Workspace>();
461 }
462 }
463
464 return inputWS;
465}
466
468 const std::string hardMask = this->getProperty("HardMaskFile");
469 if (hardMask.empty()) {
470 return std::shared_ptr<MatrixWorkspace>();
471 } else {
472 IAlgorithm_sptr loadMask;
473 bool castWorkspace = false;
474 if (hardMask.ends_with(".nxs")) {
475 loadMask = this->createChildAlgorithm("Load");
476 loadMask->setProperty("Filename", hardMask);
477 } else {
478 const std::string instName = this->reductionManager->getProperty("InstrumentName");
479 loadMask = this->createChildAlgorithm("LoadMask");
480 loadMask->setProperty("Instrument", instName);
481 loadMask->setProperty("InputFile", hardMask);
482 castWorkspace = true;
483 }
484 loadMask->execute();
485 if (castWorkspace) {
486 MaskWorkspace_sptr tmp = loadMask->getProperty("OutputWorkspace");
487 return std::dynamic_pointer_cast<MatrixWorkspace>(tmp);
488 }
489 return loadMask->getProperty("OutputWorkspace");
490 }
491}
492
494 const std::string propName = prop + "GroupingFile";
495 const std::string groupFile = this->getProperty(propName);
496 if (groupFile.empty()) {
497 return std::shared_ptr<MatrixWorkspace>();
498 } else {
499 try {
500 auto loadGrpFile = createChildAlgorithm("LoadDetectorsGroupingFile");
501 loadGrpFile->setProperty("InputFile", groupFile);
502 loadGrpFile->execute();
503 return loadGrpFile->getProperty("OutputWorkspace");
504 } catch (...) {
505 // This must be an old format grouping file.
506 // Set a property to use later.
507 g_log.warning() << "Old format grouping file in use.\n";
508 this->reductionManager->declareProperty(
509 std::make_unique<PropertyWithValue<std::string>>(prop + "OldGroupingFilename", groupFile));
510 return std::shared_ptr<MatrixWorkspace>();
511 }
512 }
513}
514
515double DgsReduction::getParameter(const std::string &algParam, const MatrixWorkspace_sptr &ws,
516 const std::string &altParam) {
517 double param = this->getProperty(algParam);
518 if (EMPTY_DBL() == param) {
519 param = ws->getInstrument()->getNumberParameter(altParam)[0];
520 }
521 return param;
522}
523
524//----------------------------------------------------------------------------------------------
528 // Reduction property manager - don't call getProcessProperties as
529 // it will reuse. This needs to create a fresh one every time
530 const std::string reductionManagerName = this->getProperty("ReductionProperties");
531 if (reductionManagerName.empty()) {
532 g_log.error() << "ERROR: Reduction Property Manager name is empty\n";
533 return;
534 }
535 this->reductionManager = std::make_shared<PropertyManager>();
536 PropertyManagerDataService::Instance().addOrReplace(reductionManagerName, this->reductionManager);
537
538 // Put all properties except input files/workspaces into property manager.
539 const std::vector<Property *> props = this->getProperties();
540 for (auto prop : props) {
541 if (!boost::contains(prop->name(), "Input")) {
542 this->reductionManager->declareProperty(std::unique_ptr<Property>(prop->clone()));
543 }
544 }
545
546 Progress progress(this, 0.0, 1.0, 7);
547
548 progress.report();
549
550 // Determine the default facility
551 const FacilityInfo defaultFacility = ConfigService::Instance().getFacility();
552
553 // Need to load data to get certain bits of information.
554 Workspace_sptr sampleWS = this->loadInputData("Sample");
555 MatrixWorkspace_sptr WS = std::dynamic_pointer_cast<MatrixWorkspace>(sampleWS);
556 this->reductionManager->declareProperty(
557 std::make_unique<PropertyWithValue<std::string>>("InstrumentName", WS->getInstrument()->getName()));
558
559 // Check the facility for the loaded file and make sure it's the
560 // same as the default.
561 const InstrumentInfo info = ConfigService::Instance().getInstrument(WS->getInstrument()->getName());
562 if (defaultFacility.name() != info.facility().name()) {
563 std::ostringstream mess;
564 mess << "Default facility must be set to " << info.facility().name();
565 mess << " in order for reduction to work!";
566 throw std::runtime_error(mess.str());
567 }
568
569 MatrixWorkspace_sptr sampleMonWS = this->getProperty("SampleInputMonitorWorkspace");
570
571 const bool showIntermedWS = this->getProperty("ShowIntermediateWorkspaces");
572
573 std::string outputWsName = this->getPropertyValue("OutputWorkspace");
574 if (outputWsName.ends_with("_spe")) {
575 boost::erase_all(outputWsName, "_spe");
576 }
577
578 progress.report("Loading hard mask...");
579
580 // Load the hard mask if available
581 MatrixWorkspace_sptr hardMaskWS = this->loadHardMask();
582 if (hardMaskWS && showIntermedWS) {
583 std::string hardMaskName = outputWsName + "_hardmask";
584 this->declareProperty(std::make_unique<WorkspaceProperty<>>("ReductionHardMask", hardMaskName, Direction::Output));
585 this->setProperty("ReductionHardMask", hardMaskWS);
586 }
587
588 progress.report("Loading grouping file...");
589 // Load the grouping file if available
590 MatrixWorkspace_sptr groupingWS = this->loadGroupingFile("");
591 if (groupingWS && showIntermedWS) {
592 std::string groupName = outputWsName + "_grouping";
593 this->declareProperty(std::make_unique<WorkspaceProperty<>>("ReductionGrouping", groupName, Direction::Output));
594 this->setProperty("ReductionGrouping", groupingWS);
595 }
596
597 // This will be diagnostic mask if DgsDiagnose is run and hard mask if not.
599
600 // Process the sample detector vanadium if present
601 Workspace_sptr detVanWS = this->loadInputData("DetectorVanadium", false);
602 MatrixWorkspace_sptr detVanMonWS = this->getProperty("DetectorVanadiumInputMonitorWorkspace");
603 bool isProcessedDetVan = this->getProperty("UseProcessedDetVan");
604 // Process a comparison detector vanadium if present
605 Workspace_sptr detVan2WS = this->loadInputData("DetectorVanadium2", false);
606 MatrixWorkspace_sptr detVan2MonWS = this->getProperty("DetectorVanadium2InputMonitorWorkspace");
607 IAlgorithm_sptr detVan;
608 Workspace_sptr idetVanWS;
609 if (detVanWS && !isProcessedDetVan) {
610 auto diag = createChildAlgorithm("DgsDiagnose");
611 diag->setProperty("DetVanWorkspace", detVanWS);
612 diag->setProperty("DetVanMonitorWorkspace", detVanMonWS);
613 diag->setProperty("DetVanCompWorkspace", detVan2WS);
614 diag->setProperty("DetVanCompMonitorWorkspace", detVan2MonWS);
615 diag->setProperty("SampleWorkspace", sampleWS);
616 diag->setProperty("SampleMonitorWorkspace", sampleMonWS);
617 diag->setProperty("HardMaskWorkspace", hardMaskWS);
618 diag->setProperty("ReductionProperties", getPropertyValue("ReductionProperties"));
619 diag->executeAsChildAlg();
620 maskWS = diag->getProperty("OutputWorkspace");
621
622 if (showIntermedWS) {
623 const std::string detVanMaskName = outputWsName + "_diagmask";
624 this->declareProperty(
625 std::make_unique<WorkspaceProperty<>>("SampleDetVanDiagMask", detVanMaskName, Direction::Output));
626 this->setProperty("SampleDetVanDiagMask", maskWS);
627 }
628
629 detVan = this->createChildAlgorithm("DgsProcessDetectorVanadium");
630 detVan->setProperty("InputWorkspace", detVanWS);
631 detVan->setProperty("InputMonitorWorkspace", detVanMonWS);
632 detVan->setProperty("MaskWorkspace", maskWS);
633 detVan->setProperty("ReductionProperties", getPropertyValue("ReductionProperties"));
634 detVan->executeAsChildAlg();
635 MatrixWorkspace_sptr oWS = detVan->getProperty("OutputWorkspace");
636 idetVanWS = std::dynamic_pointer_cast<Workspace>(oWS);
637
638 if (showIntermedWS) {
639 const std::string idetVanName = outputWsName + "_idetvan";
640 this->declareProperty(
641 std::make_unique<WorkspaceProperty<>>("IntegratedNormWorkspace", idetVanName, Direction::Output));
642 this->setProperty("IntegratedNormWorkspace", idetVanWS);
643 }
644 } else {
645 idetVanWS = detVanWS;
646 maskWS = std::dynamic_pointer_cast<MatrixWorkspace>(idetVanWS);
647 detVanWS.reset();
648 }
649
650 progress.report("Converting to energy transfer...");
651 auto etConv = createChildAlgorithm("DgsConvertToEnergyTransfer");
652 etConv->setProperty("InputWorkspace", sampleWS);
653 etConv->setProperty("InputMonitorWorkspace", sampleMonWS);
654 etConv->setProperty("IntegratedDetectorVanadium", idetVanWS);
655 const double ei = this->getProperty("IncidentEnergyGuess");
656 etConv->setProperty("IncidentEnergyGuess", ei);
657 if (!maskWS && hardMaskWS) {
658 maskWS = hardMaskWS;
659 }
660 etConv->setProperty("MaskWorkspace", maskWS);
661 if (groupingWS) {
662 etConv->setProperty("GroupingWorkspace", groupingWS);
663 }
664 etConv->setProperty("ReductionProperties", getPropertyValue("ReductionProperties"));
665 std::string tibWsName = this->getPropertyValue("OutputWorkspace") + "_tib";
666 etConv->executeAsChildAlg();
667 MatrixWorkspace_sptr outputWS = etConv->getProperty("OutputWorkspace");
668 MatrixWorkspace_sptr tibWS = etConv->getProperty("OutputTibWorkspace");
669
670 if (tibWS && showIntermedWS) {
671 this->declareProperty(std::make_unique<WorkspaceProperty<>>("SampleTibWorkspace", tibWsName, Direction::Output));
672 this->setProperty("SampleTibWorkspace", tibWS);
673 }
674
675 Workspace_sptr absSampleWS = this->loadInputData("AbsUnitsSample", false);
676
677 progress.report("Absolute units reduction...");
678
679 // Perform absolute normalisation if necessary
680 if (absSampleWS) {
681 // Collect the other workspaces first.
682 MatrixWorkspace_sptr absSampleMonWS = this->getProperty("AbsUnitsSampleInputMonitorWorkspace");
683 Workspace_sptr absDetVanWS = this->loadInputData("AbsUnitsDetectorVanadium", false);
684 MatrixWorkspace_sptr absDetVanMonWS = this->getProperty("AbsUnitsDetectorVanadiumInputMonitorWorkspace");
685 MatrixWorkspace_sptr absGroupingWS = this->loadGroupingFile("AbsUnits");
686
687 // Run the absolute normalisation reduction
688 auto absUnitsRed = createChildAlgorithm("DgsAbsoluteUnitsReduction");
689 absUnitsRed->setProperty("InputWorkspace", absSampleWS);
690 absUnitsRed->setProperty("InputMonitorWorkspace", absSampleMonWS);
691 absUnitsRed->setProperty("DetectorVanadiumWorkspace", absDetVanWS);
692 absUnitsRed->setProperty("DetectorVanadiumMonitorWorkspace", absDetVanMonWS);
693 absUnitsRed->setProperty("GroupingWorkspace", absGroupingWS);
694 absUnitsRed->setProperty("MaskWorkspace", maskWS);
695 absUnitsRed->setProperty("ReductionProperties", getPropertyValue("ReductionProperties"));
696 absUnitsRed->executeAsChildAlg();
697 MatrixWorkspace_sptr absUnitsWS = absUnitsRed->getProperty("OutputWorkspace");
699 // is using wrong property for masks
700 MatrixWorkspace_sptr absMaskWS = absUnitsRed->getProperty("OutputWorkspace");
701
702 auto mask = createChildAlgorithm("MaskDetectors");
703 mask->setProperty("Workspace", outputWS);
704 mask->setProperty("MaskedWorkspace", absMaskWS);
705 mask->executeAsChildAlg();
706 outputWS = mask->getProperty("Workspace");
707
708 // Do absolute normalisation
709 outputWS = divide(outputWS, absUnitsWS);
710
711 if (showIntermedWS) {
712 const std::string absWsName = outputWsName + "_absunits";
713 this->declareProperty(std::make_unique<WorkspaceProperty<>>("AbsUnitsWorkspace", absWsName, Direction::Output));
714 this->setProperty("AbsUnitsWorkspace", absUnitsWS);
715 this->declareProperty(std::make_unique<WorkspaceProperty<>>(
716 "AbsUnitsDiagMask", outputWsName + "_absunits_diagmask", Direction::Output));
717 this->setProperty("AbsUnitsDiagMask", absMaskWS);
718 }
719 }
720
721 progress.report();
722
723 // sort events if necessary
724 if (auto eventWS = std::dynamic_pointer_cast<EventWorkspace>(outputWS)) {
725 const auto timerStart = std::chrono::high_resolution_clock::now();
726 g_log.information("Sorting events");
727 eventWS->sortAll(Mantid::DataObjects::TOF_SORT, nullptr);
728 addTimer("sortByTOF", timerStart, std::chrono::high_resolution_clock::now());
729 }
730
731 // Convert from DeltaE to powder S(Q,W)
732 const bool doPowderConvert = this->getProperty("DoPowderDataConversion");
733 if (doPowderConvert) {
734 g_log.notice("Converting to powder S(Q,W)");
735 // Collect information
736 std::string sqwWsName = outputWsName + "_pd_sqw";
737 std::vector<double> qBinning = this->getProperty("PowderMomTransferRange");
738 const auto initialEnergy = outputWS->run().getPropertyValueAsType<double>("Ei");
739
740 auto sofqw = createChildAlgorithm("SofQW3");
741 sofqw->setProperty("InputWorkspace", outputWS);
742 sofqw->setProperty("QAxisBinning", qBinning);
743 sofqw->setProperty("EMode", "Direct");
744 sofqw->setProperty("EFixed", initialEnergy);
745 sofqw->executeAsChildAlg();
746 MatrixWorkspace_sptr sqwWS = sofqw->getProperty("OutputWorkspace");
747 this->declareProperty(std::make_unique<WorkspaceProperty<>>("PowderSqwWorkspace", sqwWsName, Direction::Output));
748 this->setProperty("PowderSqwWorkspace", sqwWS);
749
750 const bool saveProcNexus = this->getProperty("SavePowderNexusFile");
751 if (saveProcNexus) {
752 std::string saveProcNexusFilename = this->getProperty("SavePowderNexusFilename");
753 if (saveProcNexusFilename.empty()) {
754 saveProcNexusFilename = sqwWsName + ".nxs";
755 }
756 auto saveNxs = createChildAlgorithm("SaveNexus");
757 saveNxs->setProperty("InputWorkspace", sqwWS);
758 saveNxs->setProperty("Filename", saveProcNexusFilename);
759 saveNxs->executeAsChildAlg();
760 }
761 }
762
763 progress.report();
764
765 this->setProperty("OutputWorkspace", outputWS);
766}
767
768} // namespace Mantid::WorkflowAlgorithms
std::string name
Definition Run.cpp:60
#define DECLARE_ALGORITHM(classname)
Definition Algorithm.h:538
gsl_vector * tmp
@ OptionalSave
to specify a file to write to but an empty string is
@ OptionalLoad
to specify a file to read but the file doesn't have to exist
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.
std::string getPropertyValue(const std::string &name) const override
Get the property held by this object.
Workspace_sptr load(const std::string &inputData, const bool loadQuiet=false)
Determine what kind of input data we have and load it.
MatrixWorkspace_sptr divide(const MatrixWorkspace_sptr lhs, const MatrixWorkspace_sptr rhs)
Divide a matrix workspace by another matrix workspace.
Helper class for reporting progress from algorithms.
Definition Progress.h:25
A property class for workspaces.
Support for a property that holds an array of values.
A class that holds information about a facility.
const std::string & name() const
Return the name of the facility.
A class that holds information about an instrument.
const FacilityInfo & facility() const
The facility to which this instrument belongs.
void debug(const std::string &msg)
Logs at debug level.
Definition Logger.cpp:145
void notice(const std::string &msg)
Logs at notice level.
Definition Logger.cpp:126
void error(const std::string &msg)
Logs at error level.
Definition Logger.cpp:108
void warning(const std::string &msg)
Logs at warning level.
Definition Logger.cpp:117
void information(const std::string &msg)
Logs at information level.
Definition Logger.cpp:136
void report()
Increments the loop counter by 1, then sends the progress notification on behalf of its algorithm.
The concrete, templated class for properties.
DgsReduction : This is the top-level workflow algorithm for controlling direct geometry spectrometer ...
int version() const override
Algorithm's version for identification.
std::shared_ptr< Kernel::PropertyManager > reductionManager
API::MatrixWorkspace_sptr loadHardMask()
void exec() override
Execute the algorithm.
API::MatrixWorkspace_sptr loadGroupingFile(const std::string &prop)
double getParameter(const std::string &algParam, const API::MatrixWorkspace_sptr &ws, const std::string &altParam)
void init() override
Initialize the algorithm's properties.
const std::string category() const override
Algorithm's category for identification.
API::Workspace_sptr loadInputData(const std::string &prop, const bool mustLoad=true)
Create a workspace by either loading a file or using an existing workspace.
std::shared_ptr< IAlgorithm > IAlgorithm_sptr
shared pointer to Mantid::API::IAlgorithm
std::shared_ptr< Workspace > Workspace_sptr
shared pointer to Mantid::API::Workspace
Kernel::Logger g_log("ExperimentInfo")
static logger object
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
std::shared_ptr< MaskWorkspace > MaskWorkspace_sptr
shared pointer to the MaskWorkspace class
constexpr int EMPTY_INT() noexcept
Returns what we consider an "empty" integer within a property.
Definition EmptyValues.h:24
constexpr double EMPTY_DBL() noexcept
Returns what we consider an "empty" double within a property.
Definition EmptyValues.h:42
STL namespace.
@ Input
An input workspace.
Definition Property.h:53
@ Output
An output workspace.
Definition Property.h:54