Mantid
Loading...
Searching...
No Matches
LoadDiffCal.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
11#include "MantidAPI/Progress.h"
12#include "MantidAPI/Run.h"
13#include "MantidAPI/TableRow.h"
22#include "MantidKernel/Unit.h"
23
24#include <H5Cpp.h>
25#include <cmath>
26
27namespace Mantid::DataHandling {
28
41
42using namespace H5;
43
44namespace {
45namespace PropertyNames {
46const std::string CAL_FILE("Filename");
47const std::string GROUP_FILE("GroupFilename");
48const std::string MAKE_CAL("MakeCalWorkspace");
49const std::string MAKE_GRP("MakeGroupingWorkspace");
50const std::string MAKE_MSK("MakeMaskWorkspace");
51} // namespace PropertyNames
52} // namespace
53
54// Register the algorithm into the AlgorithmFactory
55DECLARE_ALGORITHM(LoadDiffCal)
56
57
58const std::string LoadDiffCal::name() const { return "LoadDiffCal"; }
59
61int LoadDiffCal::version() const { return 1; }
62
64const std::string LoadDiffCal::category() const { return "DataHandling\\Instrument;Diffraction\\DataHandling"; }
65
67const std::string LoadDiffCal::summary() const { return "Loads a calibration file for powder diffraction"; }
68
72 // 3 properties for getting the right instrument
74
75 const std::vector<std::string> exts{".h5", ".hd5", ".hdf", ".cal"};
76 declareProperty(std::make_unique<FileProperty>(PropertyNames::CAL_FILE, "", FileProperty::Load, exts),
77 "Path to the .h5 file.");
78 declareProperty(std::make_unique<FileProperty>(PropertyNames::GROUP_FILE, "", FileProperty::OptionalLoad,
79 std::vector<std::string>{".xml", ".cal"}),
80 "Overrides grouping from CalFileName");
81
82 declareProperty(std::make_unique<PropertyWithValue<bool>>(PropertyNames::MAKE_GRP, true, Direction::Input),
83 "Set to true to create a GroupingWorkspace with called "
84 "WorkspaceName_group.");
85
86 declareProperty(std::make_unique<PropertyWithValue<bool>>(PropertyNames::MAKE_CAL, true, Direction::Input),
87 "Set to true to create a CalibrationWorkspace with called "
88 "WorkspaceName_cal.");
89
90 declareProperty(std::make_unique<PropertyWithValue<bool>>(PropertyNames::MAKE_MSK, true, Direction::Input),
91 "Set to true to create a MaskWorkspace with called WorkspaceName_mask.");
92
93 declareProperty(std::make_unique<PropertyWithValue<std::string>>("WorkspaceName", "", Direction::Input),
94 "The base of the output workspace names. Names will have '_group', "
95 "'_cal', '_mask' appended to them.");
96
97 std::string grpName("Calibration Validation");
98 declareProperty("TofMin", 0., "Minimum for TOF axis. Defaults to 0.");
99 declareProperty("TofMax", EMPTY_DBL(), "Maximum for TOF axis. Defaults to Unused.");
100 declareProperty(std::make_unique<PropertyWithValue<bool>>("FixConversionIssues", true, Direction::Input),
101 "Set DIFA and TZERO to zero if there is an error and the "
102 "pixel is masked");
103 setPropertyGroup("TofMin", grpName);
104 setPropertyGroup("TofMax", grpName);
105 setPropertyGroup("FixConversionIssues", grpName);
106}
107
108namespace { // anonymous
109
110bool endswith(const std::string &str, const std::string &ending) {
111 if (ending.size() > str.size()) {
112 return false;
113 }
114
115 return std::equal(str.begin() + str.size() - ending.size(), str.end(), ending.begin());
116}
117
118void setGroupWSProperty(API::Algorithm *alg, const std::string &prefix, const GroupingWorkspace_sptr &wksp) {
119 alg->declareProperty(std::make_unique<WorkspaceProperty<DataObjects::GroupingWorkspace>>(
120 "OutputGroupingWorkspace", prefix + "_group", Direction::Output),
121 "Set the the output GroupingWorkspace, if any.");
122 alg->setProperty("OutputGroupingWorkspace", wksp);
123}
124
125void setMaskWSProperty(API::Algorithm *alg, const std::string &prefix, const MaskWorkspace_sptr &wksp) {
126 alg->declareProperty(std::make_unique<WorkspaceProperty<DataObjects::MaskWorkspace>>(
127 "OutputMaskWorkspace", prefix + "_mask", Direction::Output),
128 "Set the the output MaskWorkspace, if any.");
129 alg->setProperty("OutputMaskWorkspace", wksp);
130}
131
132void setCalWSProperty(API::Algorithm *alg, const std::string &prefix, const ITableWorkspace_sptr &wksp) {
133 alg->declareProperty(
134 std::make_unique<WorkspaceProperty<ITableWorkspace>>("OutputCalWorkspace", prefix + "_cal", Direction::Output),
135 "Set the output Diffraction Calibration workspace, if any.");
136 alg->setProperty("OutputCalWorkspace", wksp);
137}
138
139} // anonymous namespace
140
141void LoadDiffCal::getInstrument(H5File &file) {
142 // don't bother if there isn't a mask or grouping requested
143 bool makeMask = getProperty(PropertyNames::MAKE_MSK);
144 bool makeGrouping = getProperty(PropertyNames::MAKE_GRP);
145 if ((!makeMask) & (!makeGrouping))
146 return;
147
148 // see if the user specified the instrument independently
151 return;
152 }
153
154 std::string idf = H5Util::readString(file, "/calibration/instrument/instrument_source");
155 std::string instrumentName = H5Util::readString(file, "/calibration/instrument/name");
156
157 g_log.debug() << "IDF : " << idf << "\n"
158 << "NAME: " << instrumentName << "\n";
159
160 API::Algorithm_sptr childAlg = this->createChildAlgorithm("LoadInstrument", 0.0, 0.1);
161 MatrixWorkspace_sptr tempWS(new Workspace2D());
162 childAlg->setProperty<MatrixWorkspace_sptr>("Workspace", tempWS);
163 if (idf.empty()) {
164 childAlg->setPropertyValue("InstrumentName", instrumentName);
165 } else {
166 childAlg->setPropertyValue("Filename", idf);
167 }
168 childAlg->setProperty("RewriteSpectraMap", Mantid::Kernel::OptionalBool(false));
169 childAlg->executeAsChildAlg();
170
171 m_instrument = tempWS->getInstrument();
172
173 g_log.information() << "Loaded instrument \"" << m_instrument->getName() << "\" from \""
174 << m_instrument->getFilename() << "\"\n";
175}
176
177void LoadDiffCal::makeGroupingWorkspace(const std::vector<int32_t> &detids, const std::vector<int32_t> &groups) {
178 bool makeWS = getProperty(PropertyNames::MAKE_GRP);
179 if (!makeWS) {
180 g_log.information("Not loading GroupingWorkspace from the calibration file");
181 return;
182 }
183
184 // load grouping from a separate file if supplied
185 if (!isDefault(PropertyNames::GROUP_FILE)) {
187 return;
188 }
189
190 size_t numDet = detids.size();
191 Progress progress(this, .4, .6, numDet);
192
193 GroupingWorkspace_sptr wksp = std::make_shared<DataObjects::GroupingWorkspace>(m_instrument);
194 wksp->setTitle(m_filename);
195 wksp->mutableRun().addProperty("Filename", m_filename);
196
197 for (size_t i = 0; i < numDet; ++i) {
198 auto detid = static_cast<detid_t>(detids[i]);
199 wksp->setValue(detid, groups[i]);
200 progress.report();
201 }
202
203 setGroupWSProperty(this, m_workspaceName, wksp);
204}
205
206void LoadDiffCal::makeMaskWorkspace(const std::vector<int32_t> &detids, const std::vector<int32_t> &use) {
207 bool makeWS = getProperty(PropertyNames::MAKE_MSK);
208 if (!makeWS) {
209 g_log.information("Not making a MaskWorkspace");
210 return;
211 }
212
213 size_t numDet = detids.size();
214 Progress progress(this, .6, .8, numDet);
215
216 MaskWorkspace_sptr wksp = std::make_shared<DataObjects::MaskWorkspace>(m_instrument);
217 wksp->setTitle(m_filename);
218 wksp->mutableRun().addProperty("Filename", m_filename);
219
220 for (size_t i = 0; i < numDet; ++i) {
221 bool shouldUse = (use[i] > 0); // true if detector is calibrated
222 auto detid = static_cast<detid_t>(detids[i]);
223 // in maskworkspace 0=use, 1=dontuse
224 wksp->setMasked(detid, !shouldUse);
225 // The mask value is 0 if the detector is good for use
226 wksp->setValue(detid, (shouldUse ? 0. : 1.));
227 progress.report();
228 }
229
230 setMaskWSProperty(this, m_workspaceName, wksp);
231}
232
233void LoadDiffCal::makeCalWorkspace(const std::vector<int32_t> &detids, const std::vector<double> &difc,
234 const std::vector<double> &difa, const std::vector<double> &tzero,
235 const std::vector<int32_t> &dasids, const std::vector<double> &offsets,
236 const std::vector<int32_t> &use) {
237 bool makeWS = getProperty(PropertyNames::MAKE_CAL);
238 if (!makeWS) {
239 g_log.information("Not making a calibration workspace");
240 return;
241 }
242
243 size_t numDet = detids.size();
244 Progress progress(this, .8, 1., numDet);
245
246 bool haveDasids = !dasids.empty();
247 bool haveOffsets = !offsets.empty();
248 bool fixIssues = getProperty("FixConversionIssues");
249
250 double tofMin = getProperty("TofMin");
251 double tofMax = getProperty("TofMax");
252 bool useTofMax = !isEmpty(tofMax);
253
254 ITableWorkspace_sptr wksp = std::make_shared<DataObjects::TableWorkspace>();
255 wksp->setTitle(m_filename);
256 wksp->addColumn("int", "detid");
257 wksp->addColumn("double", "difc");
258 wksp->addColumn("double", "difa");
259 wksp->addColumn("double", "tzero");
260 // only add these columns if they have values
261 if (haveDasids)
262 wksp->addColumn("int", "dasid");
263 if (haveOffsets)
264 wksp->addColumn("double", "offset");
265
266 // columns for valid range of data
267 wksp->addColumn("double", "tofmin");
268 if (useTofMax)
269 wksp->addColumn("double", "tofmax");
270
271 size_t badCount = 0;
272 for (size_t i = 0; i < numDet; ++i) {
273 API::TableRow newrow = wksp->appendRow();
274 newrow << detids[i];
275 newrow << difc[i];
276 newrow << difa[i];
277 newrow << tzero[i];
278 if (haveDasids)
279 newrow << dasids[i];
280 if (haveOffsets)
281 newrow << offsets[i];
282
283 // calculate tof range for information
284 Kernel::Units::dSpacing dspacingUnit;
285 const double tofMinRow = dspacingUnit.calcTofMin(difc[i], difa[i], tzero[i], tofMin);
286 std::stringstream msg;
287 if (tofMinRow != tofMin) {
288 msg << "TofMin shifted from " << tofMin << " to " << tofMinRow << " ";
289 }
290 newrow << tofMinRow;
291 if (useTofMax) {
292 const double tofMaxRow = dspacingUnit.calcTofMax(difc[i], difa[i], tzero[i], tofMax);
293 newrow << tofMaxRow;
294
295 if (tofMaxRow != tofMax) {
296 msg << "TofMax shifted from " << tofMax << " to " << tofMaxRow;
297 }
298 }
299 if (!msg.str().empty()) {
300 badCount += 1;
301 std::stringstream longMsg;
302 longMsg << "[detid=" << detids[i];
303 if (haveDasids)
304 longMsg << ", dasid=" << dasids[i];
305 longMsg << "] " << msg.str();
306
307 // to fix issues for masked pixels, just zero difa and tzero
308 if (fixIssues && (!use[i])) {
309 longMsg << " pixel is masked, ";
310 longMsg << " changing difa (" << wksp->cell<double>(i, 2) << " to 0.)";
311 wksp->cell<double>(i, 2) = 0.;
312
313 longMsg << " and tzero (" << wksp->cell<double>(i, 3) << " to 0.)";
314 wksp->cell<double>(i, 3) = 0.;
315
316 // restore valid tof range
317 size_t index = 4; // where tofmin natively is
318 if (haveDasids)
319 index += 1;
320 if (haveOffsets)
321 index += 1;
322 wksp->cell<double>(i, index) = tofMin;
323 if (useTofMax)
324 wksp->cell<double>(i, index + 1) = tofMax;
325 }
326
327 this->g_log.warning(longMsg.str());
328 }
329
330 progress.report();
331 }
332 if (badCount > 0) {
333 this->g_log.warning() << badCount << " rows have reduced time-of-flight range\n";
334 }
335
336 setCalWSProperty(this, m_workspaceName, wksp);
337}
338
342 bool makeWS = getProperty(PropertyNames::MAKE_GRP);
343 if (!makeWS)
344 return; // input property says not to load grouping
345
346 if (isDefault(PropertyNames::GROUP_FILE))
347 return; // a separate grouping file was not specified
348
349 std::string filename = getPropertyValue(PropertyNames::GROUP_FILE);
350 g_log.information() << "Override grouping with information from \"" << filename << "\"\n";
351 if (!m_instrument) {
352 throw std::runtime_error("Do not have an instrument defined before loading separate grouping");
353 }
354 GroupingWorkspace_sptr wksp = std::make_shared<DataObjects::GroupingWorkspace>(m_instrument);
355
356 if (filename.find(".cal") != std::string::npos) {
357 auto alg = createChildAlgorithm("LoadDiffCal");
358 alg->setProperty("InputWorkspace", wksp);
359 alg->setPropertyValue(PropertyNames::CAL_FILE, filename);
360 alg->setProperty<bool>(PropertyNames::MAKE_CAL, false);
361 alg->setProperty<bool>(PropertyNames::MAKE_GRP, true);
362 alg->setProperty<bool>(PropertyNames::MAKE_MSK, false);
363 alg->setPropertyValue("WorkspaceName", m_workspaceName);
364 alg->executeAsChildAlg();
365
366 // get the workspace
367 wksp = alg->getProperty("OutputGroupingWorkspace");
368 } else {
369 auto alg = createChildAlgorithm("LoadDetectorsGroupingFile");
370 alg->setProperty("InputWorkspace", wksp);
371 alg->setProperty("InputFile", filename);
372 alg->executeAsChildAlg();
373
374 // get the workspace
375 wksp = alg->getProperty("OutputWorkspace");
376 }
377 setGroupWSProperty(this, m_workspaceName, wksp);
378}
379
381 bool makeCalWS = getProperty(PropertyNames::MAKE_CAL);
382 bool makeMaskWS = getProperty(PropertyNames::MAKE_MSK);
383 bool makeGroupWS = getProperty(PropertyNames::MAKE_GRP);
384 API::MatrixWorkspace_sptr inputWs = getProperty("InputWorkspace");
385
386 bool haveGroupingFile = !isDefault(PropertyNames::GROUP_FILE);
387
388 auto alg = createChildAlgorithm("LoadCalFile", 0., 1.);
389 alg->setPropertyValue("CalFilename", m_filename);
390 alg->setProperty("InputWorkspace", inputWs);
391 alg->setPropertyValue("InstrumentName", getPropertyValue("InstrumentName"));
392 alg->setPropertyValue("InstrumentFilename", getPropertyValue("InstrumentFilename"));
393 alg->setProperty<bool>("MakeOffsetsWorkspace", makeCalWS);
394 alg->setProperty<bool>("MakeGroupingWorkspace", makeGroupWS);
395 alg->setProperty<bool>("MakeMaskWorkspace", makeMaskWS);
396 alg->setPropertyValue("WorkspaceName", m_workspaceName);
397 alg->executeAsChildAlg();
398
399 if (makeCalWS) {
400 ITableWorkspace_sptr wksp = alg->getProperty("OutputCalWorkspace");
401 setCalWSProperty(this, m_workspaceName, wksp);
402 }
403
404 if (makeMaskWS) {
405 MatrixWorkspace_sptr wksp = alg->getProperty("OutputMaskWorkspace");
406 setMaskWSProperty(this, m_workspaceName, std::dynamic_pointer_cast<DataObjects::MaskWorkspace>(wksp));
407 }
408
409 if (makeGroupWS) {
410 GroupingWorkspace_sptr wksp = alg->getProperty("OutputGroupingWorkspace");
411 if (haveGroupingFile) {
412 // steal the instrument from what was loaded already
413 if (!m_instrument)
414 m_instrument = wksp->getInstrument();
416 } else {
417 setGroupWSProperty(this, m_workspaceName, wksp);
418 }
419 }
420}
421
422//----------------------------------------------------------------------------------------------
426 m_filename = getPropertyValue(PropertyNames::CAL_FILE);
427 m_workspaceName = getPropertyValue("WorkspaceName");
428
429 if (endswith(m_filename, ".cal")) {
431 return;
432 }
433
434 // read in everything from the file
435 H5::Exception::dontPrint();
436 H5File file;
437 try {
438 file = H5File(m_filename, H5F_ACC_RDONLY);
439 } catch (FileIException &) {
440 throw FileError("Failed to open file using HDF5", m_filename);
441 }
442 getInstrument(file);
443
444 Progress progress(this, 0.1, 0.4, 8);
445 Group calibrationGroup;
446 try {
447 calibrationGroup = file.openGroup("calibration");
448 } catch (FileIException &e) {
449#if H5_VERSION_GE(1, 8, 13)
450 UNUSED_ARG(e);
451 H5::Exception::printErrorStack();
452#else
453 e.printError(stderr);
454#endif
455 file.close();
456 throw FileError("Did not find group \"/calibration\"", m_filename);
457 }
458
459 progress.report("Reading detid");
460 std::vector<int32_t> detids = H5Util::readArray1DCoerce<int32_t>(calibrationGroup, "detid");
461 progress.report("Reading dasid");
462 std::vector<int32_t> dasids = H5Util::readArray1DCoerce<int32_t>(calibrationGroup, "dasid");
463 progress.report("Reading group");
464 std::vector<int32_t> groups = H5Util::readArray1DCoerce<int32_t>(calibrationGroup, "group");
465 progress.report("Reading use");
466 std::vector<int32_t> use = H5Util::readArray1DCoerce<int32_t>(calibrationGroup, "use");
467
468 progress.report("Reading difc");
469 std::vector<double> difc = H5Util::readArray1DCoerce<double>(calibrationGroup, "difc");
470 progress.report("Reading difa");
471 std::vector<double> difa = H5Util::readArray1DCoerce<double>(calibrationGroup, "difa");
472 progress.report("Reading tzero");
473 std::vector<double> tzero = H5Util::readArray1DCoerce<double>(calibrationGroup, "tzero");
474 progress.report("Reading offset");
475 std::vector<double> offset = H5Util::readArray1DCoerce<double>(calibrationGroup, "offset");
476
477 file.close();
478
479 // verify the minimum is present
480 if (detids.empty()) {
481 throw std::runtime_error("File was missing required field \"/calibraion/detid\"");
482 }
483 if (difc.empty()) {
484 throw std::runtime_error("File was missing required field \"/calibraion/difc\"");
485 }
486
487 // fix up empty arrays
488 if (groups.empty())
489 groups.assign(detids.size(), 1); // all go to one spectrum
490 if (use.empty())
491 use.assign(detids.size(), 1); // all detectors are good, use them
492 if (difa.empty())
493 difa.assign(detids.size(), 0.); // turn off difa
494 if (tzero.empty())
495 tzero.assign(detids.size(), 0.); // turn off tzero
496
497 // create the appropriate output workspaces
498 makeGroupingWorkspace(detids, groups);
499 makeMaskWorkspace(detids, use);
500 makeCalWorkspace(detids, difc, difa, tzero, dasids, offset, use);
501}
502
503Parallel::ExecutionMode
504LoadDiffCal::getParallelExecutionMode(const std::map<std::string, Parallel::StorageMode> &storageModes) const {
505 // There is an optional input workspace which may have
506 // StorageMode::Distributed but it is merely used for passing an instrument.
507 // Output should always have StorageMode::Cloned, so we run with
508 // ExecutionMode::Identical.
509 static_cast<void>(storageModes);
510 return Parallel::ExecutionMode::Identical;
511}
512
513} // namespace Mantid::DataHandling
#define DECLARE_ALGORITHM(classname)
Definition: Algorithm.h:576
std::map< DeltaEMode::Type, std::string > index
Definition: DeltaEMode.cpp:19
#define UNUSED_ARG(x)
Function arguments are sometimes unused in certain implmentations but are required for documentation ...
Definition: System.h:64
void declareProperty(std::unique_ptr< Kernel::Property > p, const std::string &doc="") override
Add a property to the list of managed properties.
Definition: Algorithm.cpp:1913
std::string getPropertyValue(const std::string &name) const override
Get the value of a property as a string.
Definition: Algorithm.cpp:2026
TypedValue getProperty(const std::string &name) const override
Get the value of a property.
Definition: Algorithm.cpp:2076
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.
Definition: Algorithm.cpp:842
Kernel::Logger & g_log
Definition: Algorithm.h:451
void progress(double p, const std::string &msg="", double estimatedTime=0.0, int progressPrecision=0)
Sends ProgressNotification.
Definition: Algorithm.cpp:231
bool isDefault(const std::string &name) const
Definition: Algorithm.cpp:2084
static bool isEmpty(const NumT toCheck)
checks that the value was not set by users, uses the value in empty double/int.
A specialized class for dealing with file properties.
Definition: FileProperty.h:42
@ OptionalLoad
to specify a file to read but the file doesn't have to exist
Definition: FileProperty.h:53
@ Load
allowed here which will be passed to the algorithm
Definition: FileProperty.h:52
ITableWorkspace is an implementation of Workspace in which the data are organised in columns of same ...
Helper class for reporting progress from algorithms.
Definition: Progress.h:25
TableRow represents a row in a TableWorkspace.
Definition: TableRow.h:39
T & cell(size_t col)
Templated method to access the element col in the row.
Definition: TableRow.h:115
A property class for workspaces.
static bool instrumentIsSpecified(API::Algorithm *alg)
Definition: LoadCalFile.cpp:56
static void getInstrument3WaysInit(Mantid::API::Algorithm *alg)
For use by getInstrument3Ways, initializes the properties.
Definition: LoadCalFile.cpp:35
static Geometry::Instrument_const_sptr getInstrument3Ways(API::Algorithm *alg)
Get a pointer to an instrument in one of 3 ways: InputWorkspace, InstrumentName, InstrumentFilename.
Definition: LoadCalFile.cpp:73
LoadDiffCal : TODO: DESCRIPTION.
Definition: LoadDiffCal.h:23
int version() const override
Algorithm's version for identification.
Definition: LoadDiffCal.cpp:61
Parallel::ExecutionMode getParallelExecutionMode(const std::map< std::string, Parallel::StorageMode > &storageModes) const override
Get correct execution mode based on input storage modes for an MPI run.
Geometry::Instrument_const_sptr m_instrument
Definition: LoadDiffCal.h:50
void init() override
Initialize the algorithm's properties.
Definition: LoadDiffCal.cpp:71
void getInstrument(H5::H5File &file)
const std::string summary() const override
Algorithm's summary for use in the GUI and help.
Definition: LoadDiffCal.cpp:67
void exec() override
Execute the algorithm.
void makeGroupingWorkspace(const std::vector< int32_t > &detids, const std::vector< int32_t > &groups)
const std::string category() const override
Algorithm's category for identification.
Definition: LoadDiffCal.cpp:64
void makeMaskWorkspace(const std::vector< int32_t > &detids, const std::vector< int32_t > &use)
void makeCalWorkspace(const std::vector< int32_t > &detids, const std::vector< double > &difc, const std::vector< double > &difa, const std::vector< double > &tzero, const std::vector< int32_t > &dasids, const std::vector< double > &offsets, const std::vector< int32_t > &use)
Concrete workspace implementation.
Definition: Workspace2D.h:29
The class Group represents a set of symmetry operations (or symmetry group).
Definition: Group.h:135
Records the filename and the description of failure.
Definition: Exception.h:98
void setPropertyGroup(const std::string &name, const std::string &group)
Set the group for a given property.
void debug(const std::string &msg)
Logs at debug level.
Definition: Logger.cpp:114
void warning(const std::string &msg)
Logs at warning level.
Definition: Logger.cpp:86
void information(const std::string &msg)
Logs at information level.
Definition: Logger.cpp:105
OptionalBool : Tri-state bool.
Definition: OptionalBool.h:25
The concrete, templated class for properties.
d-Spacing in Angstrom
Definition: Unit.h:383
double calcTofMax(const double difc, const double difa, const double tzero, const double tofmax=0.)
Definition: Unit.cpp:761
double calcTofMin(const double difc, const double difa, const double tzero, const double tofmin=0.)
Definition: Unit.cpp:754
Definition: H5Util.h:16
std::shared_ptr< ITableWorkspace > ITableWorkspace_sptr
shared pointer to Mantid::API::ITableWorkspace
std::shared_ptr< Algorithm > Algorithm_sptr
Typedef for a shared pointer to an Algorithm.
Definition: Algorithm.h:61
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
template MANTID_DATAHANDLING_DLL std::vector< double > readArray1DCoerce< double >(DataSet &dataset)
MANTID_DATAHANDLING_DLL std::string readString(H5::H5File &file, const std::string &path)
Definition: H5Util.cpp:174
template MANTID_DATAHANDLING_DLL std::vector< int32_t > readArray1DCoerce< int32_t >(DataSet &dataset)
static bool endswith(const std::string &s, const std::string &subs)
std::shared_ptr< GroupingWorkspace > GroupingWorkspace_sptr
shared pointer to the GroupingWorkspace class
std::shared_ptr< MaskWorkspace > MaskWorkspace_sptr
shared pointer to the MaskWorkspace class
Definition: MaskWorkspace.h:64
int32_t detid_t
Typedef for a detector ID.
Definition: SpectrumInfo.h:21
constexpr double EMPTY_DBL() noexcept
Returns what we consider an "empty" double within a property.
Definition: EmptyValues.h:43
STL namespace.
Describes the direction (within an algorithm) of a Property.
Definition: Property.h:50
@ Input
An input workspace.
Definition: Property.h:53
@ Output
An output workspace.
Definition: Property.h:54