diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadILLDiffraction.h b/Framework/DataHandling/inc/MantidDataHandling/LoadILLDiffraction.h index 308d79c9058a1ca474d693cce1744226f8ac2f33..891be66c8903d0bc95bfe70e4e8ecd27121aa25e 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadILLDiffraction.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadILLDiffraction.h @@ -70,6 +70,7 @@ private: std::vector<double> getAxis(const NeXus::NXDouble &) const; std::vector<double> getDurations(const NeXus::NXDouble &) const; std::vector<double> getMonitor(const NeXus::NXDouble &) const; + std::string getInstrumentFilePath(const std::string &) const; void fillDataScanMetaData(const NeXus::NXDouble &); void fillMovingInstrumentScan(const NeXus::NXUInt &, diff --git a/Framework/DataHandling/src/LoadILLDiffraction.cpp b/Framework/DataHandling/src/LoadILLDiffraction.cpp index 01775d3636087d35c730049a9d550b9cea637286..c223d1844bd90131a3a47153d886ca59beaaa44a 100644 --- a/Framework/DataHandling/src/LoadILLDiffraction.cpp +++ b/Framework/DataHandling/src/LoadILLDiffraction.cpp @@ -6,6 +6,7 @@ #include "MantidAPI/WorkspaceFactory.h" #include "MantidDataHandling/H5Util.h" #include "MantidGeometry/Instrument/ComponentHelper.h" +#include "MantidKernel/ConfigService.h" #include "MantidKernel/DateAndTime.h" #include "MantidKernel/make_unique.h" #include "MantidKernel/TimeSeriesProperty.h" @@ -15,6 +16,7 @@ #include <H5Cpp.h> #include <nexus/napi.h> +#include <Poco/Path.h> namespace Mantid { namespace DataHandling { @@ -438,7 +440,7 @@ void LoadILLDiffraction::initWorkspace() { */ void LoadILLDiffraction::loadStaticInstrument() { IAlgorithm_sptr loadInst = createChildAlgorithm("LoadInstrument"); - loadInst->setPropertyValue("InstrumentName", m_instName); + loadInst->setPropertyValue("Filename", getInstrumentFilePath(m_instName)); loadInst->setProperty<MatrixWorkspace_sptr>("Workspace", m_outWorkspace); loadInst->setProperty("RewriteSpectraMap", OptionalBool(true)); loadInst->execute(); @@ -459,5 +461,20 @@ void LoadILLDiffraction::moveTwoThetaZero(double twoTheta0) { m_outWorkspace->mutableDetectorInfo().setRotation(*component, rotation); } +/** +* Makes up the full path of the relevant IDF dependent on resolution mode +* @param instName : the name of the instrument (including the resolution mode +* suffix) +* @return : the full path to the corresponding IDF +*/ +std::string +LoadILLDiffraction::getInstrumentFilePath(const std::string &instName) const { + + Poco::Path directory(ConfigService::Instance().getInstrumentDirectory()); + Poco::Path file(instName + "_Definition.xml"); + Poco::Path fullPath(directory, file); + return fullPath.toString(); +} + } // namespace DataHandling } // namespace Mantid diff --git a/instrument/Facilities.xml b/instrument/Facilities.xml index cb3a2138fb60cd9e2da871d991b776db0c2cb8c0..b9ada13b161c03b3dd3f1dc13e79741669f96fea 100644 --- a/instrument/Facilities.xml +++ b/instrument/Facilities.xml @@ -631,18 +631,10 @@ <technique>Powder diffraction</technique> </instrument> - <instrument name="D20_lr"> - <technique>Powder diffraction</technique> - </instrument> - <instrument name="D20"> <technique>Powder diffraction</technique> </instrument> - <instrument name="D20_hr"> - <technique>Powder diffraction</technique> - </instrument> - <instrument name="D1B"> <technique>Powder diffraction</technique> </instrument> @@ -651,10 +643,6 @@ <technique>Liquid diffraction</technique> </instrument> - <instrument name="D4_hr"> - <technique>Liquid diffraction</technique> - </instrument> - <instrument name="D17"> <technique>Reflectometry</technique> </instrument>