diff --git a/Framework/DataHandling/src/SaveNexusGeometry.cpp b/Framework/DataHandling/src/SaveNexusGeometry.cpp index bb2b4d6c42f8eeaf9abeec11d6bb18608236b726..ab5e69c3f93453e58a6854e16fc5475c27086b45 100644 --- a/Framework/DataHandling/src/SaveNexusGeometry.cpp +++ b/Framework/DataHandling/src/SaveNexusGeometry.cpp @@ -75,7 +75,7 @@ void SaveNexusGeometry::init() { "Filename", "", API::FileProperty::OptionalSave), "Full path to save destination file"); - declareProperty("H5Path", "entry" /*default*/, + declareProperty("EntryName", "entry" /*default*/, "(optional) Name of the H5 root group in which the " "Instrument is to be saved. Default name: 'entry'."); } @@ -86,7 +86,7 @@ void SaveNexusGeometry::init() { void SaveNexusGeometry::exec() { API::MatrixWorkspace_const_sptr workspace = getProperty("InputWorkspace"); std::string destinationFile = getPropertyValue("FileName"); - std::string rootFileName = getPropertyValue("H5Path"); + std::string rootFileName = getPropertyValue("EntryName"); auto ws = workspace.get(); const auto &compInfo = ws->componentInfo(); diff --git a/Framework/DataHandling/test/SaveNexusGeometryTest.h b/Framework/DataHandling/test/SaveNexusGeometryTest.h index 039b92e5d2d77927cfa6dcafa41be60d6484c769..8c200e4f0c9d24546114079872b549f0abaafc87 100644 --- a/Framework/DataHandling/test/SaveNexusGeometryTest.h +++ b/Framework/DataHandling/test/SaveNexusGeometryTest.h @@ -56,7 +56,7 @@ public: TS_ASSERT_THROWS_NOTHING(alg.setProperty("InputWorkspace", "testWS")); TS_ASSERT_THROWS_NOTHING(alg.setPropertyValue("FileName", destinationFile)); TS_ASSERT_THROWS_NOTHING( - alg.setPropertyValue("H5Path", "algorithm_test_data")); + alg.setPropertyValue("EntryName", "algorithm_test_data")); TS_ASSERT_THROWS_NOTHING(alg.execute()); TS_ASSERT(alg.isExecuted()); diff --git a/docs/source/algorithms/SaveNexusGeometry-v1.rst b/docs/source/algorithms/SaveNexusGeometry-v1.rst index 5f30cbb4e4a9798d7508aa413a4185d5d48fa878..7dcf7163c49cd9ef56ea9c4dbe57a533589dbbd6 100644 --- a/docs/source/algorithms/SaveNexusGeometry-v1.rst +++ b/docs/source/algorithms/SaveNexusGeometry-v1.rst @@ -30,9 +30,7 @@ Usage import os ws = CreateSampleWorkspace() - compInfo = ws.componentInfo() - detInfo = ws.detectorInfo() - file_name = "example_save_Nexus_geometry_1.nxs" + file_name = "example_save_nexus_geometry.nxs" path = os.path.join(os.path.expanduser("~"), file_name) SaveNexusGeometry(ws, path) @@ -59,45 +57,6 @@ Output: removeFiles([file_name]) - -**Example - basic example using SaveNexusGeometry, with specific H5 root group** - -.. testcode:: SaveNexusGeometryExampleOption - - import os - - ws = CreateSampleWorkspace() - compInfo = ws.componentInfo() - detInfo = ws.detectorInfo() - file_name = "example_save_Nexus_geometry_2.hdf5" - path = os.path.join(os.path.expanduser("~"), file_name) - - SaveNexusGeometry(ws, path) - print(os.path.isfile(path)) - - - -Output: - -.. testoutput:: SaveNexusGeometryExampleOption - - True - -.. testcleanup:: SaveNexusGeometryExampleOption - - import os - def removeFiles(files): - for ws in files: - try: - path = os.path.join(os.path.expanduser("~"), ws) - os.remove(path) - except: - pass - - removeFiles([file_name]) - - - .. categories:: .. sourcelink::