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