diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadBBY.h b/Framework/DataHandling/inc/MantidDataHandling/LoadBBY.h index e208950ba2b28ed73460661195f2f70a3366882b..d9abe5178efbe7b0525f89b345c9331dabf4648c 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadBBY.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadBBY.h @@ -50,11 +50,18 @@ class DLLExport LoadBBY : public API::IFileLoader<Kernel::FileDescriptor> { int32_t bm_counts; int32_t att_pos; bool is_tof; // tof or wavelength data - double wavelength; + double wavelength; // -> /nvs067/lambda // std::string sample_name; + std::string sample_description; double sample_aperture; + double sample_x; + double sample_y; + double sample_z; + // double source_aperture; + int32_t master1_chopper_id; + int32_t master2_chopper_id; // double period_master; double period_slave; diff --git a/Framework/DataHandling/src/LoadBBY.cpp b/Framework/DataHandling/src/LoadBBY.cpp index d209bfac9b2012894fe4309e11be3ac037efaac6..af8c166248dea145c1e2830cd467b93f1bd05dd9 100644 --- a/Framework/DataHandling/src/LoadBBY.cpp +++ b/Framework/DataHandling/src/LoadBBY.cpp @@ -343,11 +343,32 @@ void LoadBBY::exec() { logManager.addProperty("end_time", end_time.toISO8601String()); logManager.addProperty("is_tof", instrumentInfo.is_tof); - logManager.addProperty("sample_name", instrumentInfo.sample_name); - logManager.addProperty("sample_aperture", instrumentInfo.sample_aperture); - logManager.addProperty("source_aperture", instrumentInfo.source_aperture); std::string time_str = start_time.toISO8601String(); + + AddSinglePointTimeSeriesProperty(logManager, time_str, "sample_name", + instrumentInfo.sample_name); + AddSinglePointTimeSeriesProperty(logManager, time_str, "sample_description", + instrumentInfo.sample_description); + AddSinglePointTimeSeriesProperty(logManager, time_str, "sample_aperture", + instrumentInfo.sample_aperture); + AddSinglePointTimeSeriesProperty(logManager, time_str, "sample_x", + instrumentInfo.sample_x); + AddSinglePointTimeSeriesProperty(logManager, time_str, "sample_y", + instrumentInfo.sample_y); + AddSinglePointTimeSeriesProperty(logManager, time_str, "sample_z", + instrumentInfo.sample_z); + + AddSinglePointTimeSeriesProperty(logManager, time_str, "wavelength", + instrumentInfo.wavelength); + + AddSinglePointTimeSeriesProperty(logManager, time_str, "source_aperture", + instrumentInfo.source_aperture); + AddSinglePointTimeSeriesProperty(logManager, time_str, "master1_chopper_id", + instrumentInfo.master1_chopper_id); + AddSinglePointTimeSeriesProperty(logManager, time_str, "master2_chopper_id", + instrumentInfo.master2_chopper_id); + AddSinglePointTimeSeriesProperty(logManager, time_str, "Lt0_value", instrumentInfo.Lt0_value); AddSinglePointTimeSeriesProperty(logManager, time_str, "Ltof_curtainl_value", @@ -457,8 +478,15 @@ void LoadBBY::createInstrument(ANSTO::Tar::File &tarFile, instrumentInfo.wavelength = 0.0; instrumentInfo.sample_name = "UNKNOWN"; + instrumentInfo.sample_description = "UNKNOWN"; instrumentInfo.sample_aperture = 0.0; + instrumentInfo.sample_x = 0.0; + instrumentInfo.sample_y = 0.0; + instrumentInfo.sample_z = 0.0; + instrumentInfo.source_aperture = 0.0; + instrumentInfo.master1_chopper_id = -1; + instrumentInfo.master2_chopper_id = -1; instrumentInfo.period_master = 0.0; instrumentInfo.period_slave = (1.0 / 50.0) * 1.0e6; @@ -518,10 +546,23 @@ void LoadBBY::createInstrument(ANSTO::Tar::File &tarFile, if (loadNXString(entry, "sample/name", tmp_str)) instrumentInfo.sample_name = tmp_str; + if (loadNXString(entry, "sample/description", tmp_str)) + instrumentInfo.sample_description = tmp_str; if (loadNXDataSet(entry, "sample/sample_aperture", tmp_float)) instrumentInfo.sample_aperture = tmp_float; + if (loadNXDataSet(entry, "sample/samx", tmp_float)) + instrumentInfo.sample_x = tmp_float; + if (loadNXDataSet(entry, "sample/samy", tmp_float)) + instrumentInfo.sample_y = tmp_float; + if (loadNXDataSet(entry, "sample/samz", tmp_float)) + instrumentInfo.sample_z = tmp_float; + if (loadNXDataSet(entry, "instrument/source_aperture", tmp_float)) instrumentInfo.source_aperture = tmp_float; + if (loadNXDataSet(entry, "instrument/master1_chopper_id", tmp_int32)) + instrumentInfo.master1_chopper_id = tmp_int32; + if (loadNXDataSet(entry, "instrument/master2_chopper_id", tmp_int32)) + instrumentInfo.master2_chopper_id = tmp_int32; if (loadNXString(entry, "instrument/detector/frame_source", tmp_str)) instrumentInfo.is_tof = tmp_str == "EXTERNAL";