Mantid
Loading...
Searching...
No Matches
LoadMuonNexus2.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#include "MantidAPI/Axis.h"
10#include "MantidAPI/Progress.h"
12#include "MantidAPI/Run.h"
23#include "MantidKernel/Unit.h"
27#include <Poco/Path.h>
28#include <memory>
29// clang-format off
30#include <nexus/NeXusFile.hpp>
31#include <nexus/NeXusException.hpp>
32// clang-format on
33
34#include <cmath>
35#include <numeric>
36
37using Mantid::Types::Core::DateAndTime;
38
39namespace Mantid::DataHandling {
40// Register the algorithm into the algorithm factory
42
43using namespace Kernel;
44using namespace DateAndTimeHelpers;
45using namespace API;
46using Geometry::Instrument;
47using Mantid::HistogramData::BinEdges;
48using Mantid::HistogramData::Counts;
49using Mantid::HistogramData::Histogram;
50using namespace Mantid::NeXus;
51using Mantid::Types::Core::DateAndTime;
52
53namespace {
54inline std::string getLoadAlgName(int confidence1, int confidenceV2) {
55 return confidence1 > confidenceV2 ? "LoadMuonNexus" : "LoadMuonNexusV2";
56}
57} // namespace
58
61
68 LoadMuonNexus1 load1;
69 LoadMuonNexusV2 loadV2;
70 load1.initialize();
71 loadV2.initialize();
72
73 std::string filePath = getPropertyValue("Filename");
74 Kernel::NexusDescriptor descriptor(filePath);
75 int confidence1 = load1.confidence(descriptor);
76 int confidence2 = this->confidence(descriptor);
77 int confidenceV2 = 0;
78 // If the file is hdf5 then we can possibly use LoadMuonNexusV2
79 // To check this we'll have to create an HDF5 descriptor for the file.
81 Kernel::NexusHDF5Descriptor descriptorHDF5(filePath);
82 confidenceV2 = loadV2.confidence(descriptorHDF5);
83 };
84
85 // if none can load the file throw
86 if (confidence1 < 80 && confidence2 < 80 && confidenceV2 < 80) {
87 throw Kernel::Exception::FileError("Cannot open the file ", filePath);
88 }
89 // Now pick the correct alg
90 if (confidence2 > std::max(confidence1, confidenceV2)) {
91 // Use this loader
92 doExec();
93 } else {
94 // Version 1 or V2
95 auto childAlg = createChildAlgorithm(getLoadAlgName(confidence1, confidenceV2), 0, 1, true, 1);
96 auto loader = std::dynamic_pointer_cast<API::Algorithm>(childAlg);
97 loader->copyPropertiesFrom(*this);
98 loader->executeAsChildAlg();
99 this->copyPropertiesFrom(*loader);
100 API::Workspace_sptr outWS = loader->getProperty("OutputWorkspace");
101 setProperty("OutputWorkspace", outWS);
102 }
103}
104
112 // Create the root Nexus class
113 NXRoot root(getPropertyValue("Filename"));
114
115 int64_t iEntry = getProperty("EntryNumber");
116 if (iEntry >= static_cast<int64_t>(root.groups().size())) {
117 throw std::invalid_argument("EntryNumber is out of range");
118 }
119
120 // Open the data entry
121 m_entry_name = root.groups()[iEntry].nxname;
122 NXEntry entry = root.openEntry(m_entry_name);
123
124 // Read in the instrument name from the Nexus file
125 m_instrument_name = entry.getString("instrument/name");
126
127 // Read the number of periods in this file
128 if (entry.containsGroup("run")) {
129 try {
130 m_numberOfPeriods = entry.getInt("run/number_periods");
131 } catch (::NeXus::Exception &) {
132 // assume 1
134 }
135 } else {
137 }
138
139 // Need to extract the user-defined output workspace name
140 Property *ws = getProperty("OutputWorkspace");
141 std::string localWSName = ws->value();
142 // If multiperiod, will need to hold the Instrument & Sample for copying
143 std::shared_ptr<Instrument> instrument;
144 std::shared_ptr<Sample> sample;
145
146 std::string detectorName;
147 // Only the first NXdata found
148 for (auto &group : entry.groups()) {
149 std::string className = group.nxclass;
150 if (className == "NXdata") {
151 detectorName = group.nxname;
152 break;
153 }
154 }
155 NXData dataGroup = entry.openNXData(detectorName);
156
157 Mantid::NeXus::NXInt spectrum_index = dataGroup.openNXInt("spectrum_index");
158 spectrum_index.load();
159 m_numberOfSpectra = spectrum_index.dim0();
160
161 // Load detector mapping
162 const auto &detMapping = loadDetectorMapping(spectrum_index);
163
164 // Call private method to validate the optional parameters, if set
166
167 NXFloat raw_time = dataGroup.openNXFloat("raw_time");
168 raw_time.load();
169 int nBins = raw_time.dim0();
170 std::vector<double> timeBins;
171 timeBins.assign(raw_time(), raw_time() + nBins);
172 timeBins.emplace_back(raw_time[nBins - 1] + raw_time[1] - raw_time[0]);
173
174 // Calculate the size of a workspace, given its number of periods & spectra to
175 // read
176 int total_specs;
177 if (m_interval || m_list) {
178 total_specs = static_cast<int>(m_spec_list.size());
179 if (m_interval) {
180 total_specs += static_cast<int>((m_spec_max - m_spec_min + 1));
181 } else {
182 m_spec_max = -1; // to stop entering the min - max loop
183 }
184 } else {
185 total_specs = static_cast<int>(m_numberOfSpectra);
186 // for nexus return all spectra
187 m_spec_min = 1;
188 m_spec_max = m_numberOfSpectra; // was +1?
189 }
190
191 // Create the 2D workspace for the output
192 DataObjects::Workspace2D_sptr localWorkspace = std::dynamic_pointer_cast<DataObjects::Workspace2D>(
193 WorkspaceFactory::Instance().create("Workspace2D", total_specs, nBins + 1, nBins));
194 // Set the unit on the workspace to muon time, for now in the form of a Label
195 // Unit
196 std::shared_ptr<Kernel::Units::Label> lblUnit =
197 std::dynamic_pointer_cast<Kernel::Units::Label>(UnitFactory::Instance().create("Label"));
198 lblUnit->setLabel("Time", Units::Symbol::Microsecond);
199 localWorkspace->getAxis(0)->unit() = lblUnit;
200 // Set y axis unit
201 localWorkspace->setYUnit("Counts");
202
203 // g_log.error()<<" number of perioids= "<<m_numberOfPeriods<<'\n';
205 if (entry.containsDataSet("title")) {
206 wsGrpSptr->setTitle(entry.getString("title"));
207 }
208
209 if (entry.containsDataSet("notes")) {
210 wsGrpSptr->setComment(entry.getString("notes"));
211 }
212
213 if (m_numberOfPeriods > 1) {
214 setProperty("OutputWorkspace", std::dynamic_pointer_cast<Workspace>(wsGrpSptr));
215 }
216
217 // period_index is currently unused
218 // Mantid::NeXus::NXInt period_index = dataGroup.openNXInt("period_index");
219 // period_index.load();
220
221 Mantid::NeXus::NXInt counts = dataGroup.openIntData();
222 counts.load();
223
224 NXInstrument instr = entry.openNXInstrument("instrument");
225
226 if (instr.containsGroup("detector_fb")) {
227 NXDetector detector = instr.openNXDetector("detector_fb");
228 if (detector.containsDataSet("time_zero")) {
229 double dum = detector.getFloat("time_zero");
230 setProperty("TimeZero", dum);
231 }
232 if (detector.containsDataSet("first_good_time")) {
233 double dum = detector.getFloat("first_good_time");
234 setProperty("FirstGoodData", dum);
235 }
236
237 if (detector.containsDataSet("last_good_time")) {
238 double dum = detector.getFloat("last_good_time");
239 setProperty("LastGoodData", dum);
240 }
241 }
242
243 API::Progress progress(this, 0.0, 1.0, m_numberOfPeriods * total_specs);
244 // Loop over the number of periods in the Nexus file, putting each period in a
245 // separate workspace
246 for (int period = 0; period < m_numberOfPeriods; ++period) {
247
248 if (period == 0) {
249 // Only run the Child Algorithms once
250 loadRunDetails(localWorkspace);
251 runLoadInstrument(localWorkspace);
252 loadLogs(localWorkspace, entry, period);
253 } else // We are working on a higher period of a multiperiod raw file
254 {
255 localWorkspace =
256 std::dynamic_pointer_cast<DataObjects::Workspace2D>(WorkspaceFactory::Instance().create(localWorkspace));
257 }
258
259 std::string outws;
260 if (m_numberOfPeriods > 1) {
261 std::string outputWorkspace = "OutputWorkspace";
262 std::stringstream suffix;
263 suffix << (period + 1);
264 outws = outputWorkspace + "_" + suffix.str();
265 std::string WSName = localWSName + "_" + suffix.str();
266 declareProperty(std::make_unique<WorkspaceProperty<Workspace>>(outws, WSName, Direction::Output));
267 if (wsGrpSptr)
268 wsGrpSptr->addWorkspace(localWorkspace);
269 }
270
271 // create spectrum -> index correspondence
272 std::map<int, int> index_spectrum;
273 for (int i = 0; i < m_numberOfSpectra; ++i) {
274 index_spectrum[spectrum_index[i]] = i;
275 }
276
277 int wsIndex = 0;
278 localWorkspace->mutableX(0) = timeBins;
279 for (auto spec = static_cast<int>(m_spec_min); spec <= static_cast<int>(m_spec_max); ++spec) {
280 int i = index_spectrum[spec]; // if spec not found i is 0
281 localWorkspace->setHistogram(wsIndex, loadData(localWorkspace->binEdges(0), counts, period, i));
282 localWorkspace->getSpectrum(wsIndex).setSpectrumNo(spectrum_index[i]);
283 localWorkspace->getSpectrum(wsIndex).setDetectorIDs(detMapping.at(i));
284 wsIndex++;
285 progress.report();
286 }
287
288 // Read in the spectra in the optional list parameter, if set
289 if (m_list) {
290 for (auto spec : m_spec_list) {
291 int k = index_spectrum[spec]; // if spec not found k is 0
292 localWorkspace->setHistogram(wsIndex, loadData(localWorkspace->binEdges(0), counts, period, k));
293 localWorkspace->getSpectrum(wsIndex).setSpectrumNo(spectrum_index[k]);
294 localWorkspace->getSpectrum(wsIndex).setDetectorIDs(detMapping.at(k));
295 wsIndex++;
296 progress.report();
297 }
298 }
299 // Just a sanity check
300 assert(wsIndex == total_specs);
301
302 bool autogroup = getProperty("AutoGroup");
303
304 if (autogroup) {
305 g_log.warning("Autogrouping is not implemented for muon NeXus version 2 files");
306 }
307
308 // Assign the result to the output workspace property
309 if (m_numberOfPeriods > 1)
310 setProperty(outws, std::static_pointer_cast<Workspace>(localWorkspace));
311 else {
312 setProperty("OutputWorkspace", std::dynamic_pointer_cast<Workspace>(localWorkspace));
313 }
314
315 } // loop over periods
316}
317
321Histogram LoadMuonNexus2::loadData(const BinEdges &edges, const Mantid::NeXus::NXInt &counts, int period, int spec) {
322 int nBins = 0;
323 const int *data = nullptr;
324
325 if (counts.rank() == 3) {
326 nBins = counts.dim2();
327 data = &counts(period, spec, 0);
328 } else if (counts.rank() == 2) {
329 nBins = counts.dim1();
330 data = &counts(spec, 0);
331 } else {
332 throw std::runtime_error("Data have unsupported dimensionality");
333 }
334
335 return Histogram(edges, Counts(data, data + nBins));
336}
337
344void LoadMuonNexus2::loadLogs(const API::MatrixWorkspace_sptr &ws, NXEntry &entry, int period) {
345 // Avoid compiler warning
346 (void)period;
347
348 std::string start_time = entry.getString("start_time");
349
350 std::string sampleName = entry.getString("sample/name");
351 NXMainClass runlogs = entry.openNXClass<NXMainClass>("sample");
352 ws->mutableSample().setName(sampleName);
353
354 for (std::vector<NXClassInfo>::const_iterator it = runlogs.groups().begin(); it != runlogs.groups().end(); ++it) {
355 NXLog nxLog = runlogs.openNXLog(it->nxname);
356 Kernel::Property *logv = nxLog.createTimeSeries(start_time);
357 if (!logv)
358 continue;
359 ws->mutableRun().addLogData(logv);
360 }
361
362 ws->setTitle(entry.getString("title"));
363
364 if (entry.containsDataSet("notes")) {
365 ws->setComment(entry.getString("notes"));
366 }
367
368 std::string run_num = std::to_string(entry.getInt("run_number"));
369 // The sample is left to delete the property
370 ws->mutableRun().addLogData(new PropertyWithValue<std::string>("run_number", run_num));
371
372 ws->populateInstrumentParameters();
373}
374
379 API::Run &runDetails = localWorkspace->mutableRun();
380
381 runDetails.addProperty("run_title", localWorkspace->getTitle(), true);
382
383 auto numSpectra = static_cast<int>(localWorkspace->getNumberHistograms());
384 runDetails.addProperty("nspectra", numSpectra);
385
386 m_filename = getPropertyValue("Filename");
387 NXRoot root(m_filename);
388 NXEntry entry = root.openEntry(m_entry_name);
389
390 std::string start_time = entry.getString("start_time");
391 runDetails.addProperty("run_start", start_time);
392
393 std::string stop_time = entry.getString("end_time");
394 runDetails.addProperty("run_end", stop_time);
395
396 if (entry.containsGroup("run")) {
397 NXClass runRun = entry.openNXGroup("run");
398
399 if (runRun.containsDataSet("good_total_frames")) {
400 int dum = runRun.getInt("good_total_frames");
401 runDetails.addProperty("goodfrm", dum);
402 }
403
404 if (runRun.containsDataSet("number_periods")) {
405 int dum = runRun.getInt("number_periods");
406 runDetails.addProperty("nperiods", dum);
407 }
408 }
409
410 { // Duration taken to be stop_time minus stat_time
411 auto start = createFromSanitizedISO8601(start_time);
412 auto end = createFromSanitizedISO8601(stop_time);
413 double duration_in_secs = DateAndTime::secondsFromDuration(end - start);
414 runDetails.addProperty("dur_secs", duration_in_secs);
415 }
416}
417
425 const auto &firstEntryNameType = descriptor.firstEntryNameType();
426 const std::string root = "/" + firstEntryNameType.first;
427 if (!descriptor.pathExists(root + "/definition"))
428 return 0;
429
430 bool upperIDF(true);
431 if (descriptor.pathExists(root + "/IDF_version"))
432 upperIDF = true;
433 else {
434 if (descriptor.pathExists(root + "/idf_version"))
435 upperIDF = false;
436 else
437 return 0;
438 }
439
440 try {
441 std::string versionField = "idf_version";
442 if (upperIDF)
443 versionField = "IDF_version";
444
445 auto &file = descriptor.data();
446 file.openPath(root + "/" + versionField);
447 int32_t version = 0;
448 file.getData(&version);
449 if (version != 2)
450 return 0;
451
452 file.openPath(root + "/definition");
453 std::string def = file.getStrData();
454 if (def == "muonTD" || def == "pulsedTD") {
455 // If all this succeeded then we'll assume this is an ISIS Muon NeXus file
456 // version 2
457 return 81;
458 }
459 } catch (...) {
460 }
461 return 0;
462}
463
477std::map<int, std::set<int>> LoadMuonNexus2::loadDetectorMapping(const Mantid::NeXus::NXInt &spectrumIndex) {
478 std::map<int, std::set<int>> mapping;
479 const int nSpectra = spectrumIndex.dim0();
480
481 // Find and open the data group
482 NXRoot root(getPropertyValue("Filename"));
483 NXEntry entry = root.openEntry(m_entry_name);
484 const std::string detectorName = [&entry]() {
485 // Only the first NXdata found
486 for (auto &group : entry.groups()) {
487 std::string className = group.nxclass;
488 if (className == "NXdata") {
489 return group.nxname;
490 }
491 }
492 throw std::runtime_error("No NXdata found in file");
493 }();
494 NXData dataGroup = entry.openNXData(detectorName);
495
496 // Usually for muon data, detector id = spectrum number
497 // If not, the optional groups "detector_index", "detector_list" and
498 // "detector_count" will be present to map one to the other
499 const bool hasDetectorMapping = dataGroup.containsDataSet("detector_index") &&
500 dataGroup.containsDataSet("detector_list") &&
501 dataGroup.containsDataSet("detector_count");
502 if (hasDetectorMapping) {
503 // Read detector IDs
504 try {
505 const auto detIndex = dataGroup.openNXInt("detector_index");
506 const auto detCount = dataGroup.openNXInt("detector_count");
507 const auto detList = dataGroup.openNXInt("detector_list");
508 const int nDet = detIndex.dim0();
509 for (int i = 0; i < nDet; ++i) {
510 const int start = detIndex[i];
511 const int nDetectors = detCount[i];
512 std::set<int> detIDs;
513 for (int jDet = 0; jDet < nDetectors; ++jDet) {
514 detIDs.insert(detList[start + jDet]);
515 }
516 mapping[i] = detIDs;
517 }
518 } catch (const ::NeXus::Exception &err) {
519 // Throw a more user-friendly message
520 std::ostringstream message;
521 message << "Failed to read detector mapping: " << err.what();
522 throw std::runtime_error(message.str());
523 }
524 } else {
525 for (int i = 0; i < nSpectra; ++i) {
526 mapping[i] = std::set<int>{spectrumIndex[i]};
527 }
528 }
529
530 return mapping;
531}
532
533} // namespace Mantid::DataHandling
int nSpectra
#define DECLARE_NEXUS_FILELOADER_ALGORITHM(classname)
DECLARE_NEXUS_FILELOADER_ALGORITHM should be used in place of the standard DECLARE_ALGORITHM macro wh...
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
void initialize() override
Initialization method invoked by the framework.
Definition: Algorithm.cpp:283
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
virtual void copyPropertiesFrom(const Algorithm &alg)
Make m_properties point to the same PropertyManager as alg.m_properties.
Definition: Algorithm.h:332
void progress(double p, const std::string &msg="", double estimatedTime=0.0, int progressPrecision=0)
Sends ProgressNotification.
Definition: Algorithm.cpp:231
void addProperty(Kernel::Property *prop, bool overwrite=false)
Add data to the object in the form of a property.
Definition: LogManager.h:79
Helper class for reporting progress from algorithms.
Definition: Progress.h:25
This class stores information regarding an experimental run as a series of log entries.
Definition: Run.h:38
Class to hold a set of workspaces.
A property class for workspaces.
int confidence(Kernel::NexusDescriptor &descriptor) const override
Returns a confidence value that this algorithm can load a file.
std::map< int, std::set< int > > loadDetectorMapping(const Mantid::NeXus::NXInt &spectrumIndex)
Loads the mapping between index -> set of detector IDs.
void doExec()
Execute this version of the algorithm.
void loadLogs(const API::MatrixWorkspace_sptr &ws, Mantid::NeXus::NXEntry &entry, int period)
Load logs from Nexus file.
HistogramData::Histogram loadData(const Mantid::HistogramData::BinEdges &edges, const Mantid::NeXus::NXInt &counts, int period, int spec)
loadData Load the counts data from an NXInt into a workspace
void loadRunDetails(const DataObjects::Workspace2D_sptr &localWorkspace)
Log the run details from the file.
int version() const override
Algorithm's version for identification overriding a virtual method.
int confidence(Kernel::NexusDescriptor &descriptor) const override
Returns a confidence value that this algorithm can load a file.
void exec() override
Overwrites Algorithm method.
Loads a file in the Nexus Muon format V2 and stores it in a 2D workspace (Workspace2D class).
int confidence(Kernel::NexusHDF5Descriptor &descriptor) const override
Returns a confidence value that this algorithm can load a file.
It is a base class for loaders for versions 1 and 2 of the muon nexus file format.
Definition: LoadMuonNexus.h:50
std::string m_filename
The name and path of the input file.
Definition: LoadMuonNexus.h:81
specnum_t m_spec_min
The value of the spectrum_min property.
void runLoadInstrument(const DataObjects::Workspace2D_sptr &)
Run the Child Algorithm LoadInstrument.
std::string m_entry_name
The first top-level entry name in the file.
Definition: LoadMuonNexus.h:83
std::string m_instrument_name
The instrument name from Nexus.
Definition: LoadMuonNexus.h:85
int64_t m_numberOfPeriods
The number of periods in the raw file.
Definition: LoadMuonNexus.h:93
bool m_interval
Have the spectrum_min/max properties been set?
Definition: LoadMuonNexus.h:97
bool m_list
Has the spectrum_list property been set?
Definition: LoadMuonNexus.h:95
specnum_t m_spec_max
The value of the spectrum_max property.
void checkOptionalProperties()
Validates the optional 'spectra to read' properties, if they have been set.
std::vector< specnum_t > m_spec_list
The value of the spectrum_list property.
Definition: LoadMuonNexus.h:99
specnum_t m_numberOfSpectra
The number of spectra in the raw file.
Definition: LoadMuonNexus.h:91
Records the filename and the description of failure.
Definition: Exception.h:98
IPropertyManager * setProperty(const std::string &name, const T &value)
Templated method to set the value of a PropertyWithValue.
void warning(const std::string &msg)
Logs at warning level.
Definition: Logger.cpp:86
Defines a wrapper around a file whose internal structure can be accessed using the NeXus API.
static bool isReadable(const std::string &filename, const Version version=AnyVersion)
Returns true if the file is considered to store data in a hierarchy.
inline ::NeXus::File & data()
Access the open NeXus File object.
const std::pair< std::string, std::string > & firstEntryNameType() const
Returns the name & type of the first entry in the file.
bool pathExists(const std::string &path) const
Query if a path exists.
The concrete, templated class for properties.
Base class for properties.
Definition: Property.h:94
virtual std::string value() const =0
Returns the value of the property as a string.
static T & Instance()
Return a reference to the Singleton instance, creating it if it does not already exist Creation is do...
static const UnitLabel Microsecond
Microsecond.
The base class for a Nexus class (group).
Definition: NexusClasses.h:487
int getInt(const std::string &name) const
Returns a int.
NX openNXClass(const std::string &name) const
Templated method for creating derived NX classes.
Definition: NexusClasses.h:519
NXInt openNXInt(const std::string &name) const
Creates and opens an integer dataset.
Definition: NexusClasses.h:546
NXClass openNXGroup(const std::string &name) const
Creates and opens an arbitrary (non-standard) class (group).
Definition: NexusClasses.h:529
bool containsGroup(const std::string &query) const
Returns whether an individual group (or group) is present.
std::vector< NXClassInfo > & groups() const
Returns a list of all classes (or groups) in this NXClass.
Definition: NexusClasses.h:589
bool containsDataSet(const std::string &query) const
Returns whether an individual dataset is present.
float getFloat(const std::string &name) const
Returns a float.
NXFloat openNXFloat(const std::string &name) const
Creates and opens a float dataset.
Definition: NexusClasses.h:551
std::string getString(const std::string &name) const
Returns a string.
Templated class implementation of NXDataSet.
Definition: NexusClasses.h:203
void load(const int blocksize=1, int i=-1, int j=-1, int k=-1, int l=-1) override
Implementation of the virtual NXDataSet::load(...) method.
Definition: NexusClasses.h:289
int dim2() const
Returns the number of elements along the third dimension.
int dim0() const
Returns the number of elements along the first dimension.
int rank() const
Returns the rank (number of dimensions) of the data. The maximum is 4.
Definition: NexusClasses.h:147
int dim1() const
Returns the number of elements along the second dimension.
Implements NXdata Nexus class.
Definition: NexusClasses.h:795
NXInt openIntData()
Opens data of int type.
Definition: NexusClasses.h:828
Implements NXdetector Nexus class.
Definition: NexusClasses.h:837
Implements NXentry Nexus class.
Definition: NexusClasses.h:898
NXData openNXData(const std::string &name) const
Opens a NXData.
Definition: NexusClasses.h:912
NXInstrument openNXInstrument(const std::string &name) const
Opens a NXInstrument.
Definition: NexusClasses.h:917
Implements NXinstrument Nexus class.
Definition: NexusClasses.h:873
NXDetector openNXDetector(const std::string &name)
Opens a NXDetector.
Definition: NexusClasses.h:887
Implements NXlog Nexus class.
Definition: NexusClasses.h:629
Kernel::Property * createTimeSeries(const std::string &start_time="", const std::string &new_name="")
Creates a TimeSeriesProperty and returns a pointer to it.
Main class is the one that can contain auxiliary classes.
Definition: NexusClasses.h:773
NXLog openNXLog(const std::string &name)
Opens a NXLog class.
Definition: NexusClasses.h:785
Implements NXroot Nexus class.
Definition: NexusClasses.h:922
NXEntry openEntry(const std::string &name)
Opens an entry – a topmost Nexus class.
Definition: NexusClasses.h:939
std::shared_ptr< WorkspaceGroup > WorkspaceGroup_sptr
shared pointer to Mantid::API::WorkspaceGroup
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< Workspace2D > Workspace2D_sptr
shared pointer to Mantid::DataObjects::Workspace2D
std::unique_ptr< T > create(const P &parent, const IndexArg &indexArg, const HistArg &histArg)
This is the create() method that all the other create() methods call.
MANTID_KERNEL_DLL Types::Core::DateAndTime createFromSanitizedISO8601(const std::string &date)
Creates a DateAndTime object from a date string even if the string does not exactly conform to ISO860...
std::string to_string(const wide_integer< Bits, Signed > &n)
@ Output
An output workspace.
Definition: Property.h:54