Ticket #11818 (inprogress)
Change the order that instrument files are loaded in preferece for nexus files
Reported by: | Nick Draper | Owned by: | Nick Draper |
---|---|---|---|
Priority: | major | Milestone: | Backlog |
Component: | Framework | Keywords: | CORE, Maintenance |
Cc: | Blocked By: | #11569 | |
Blocking: | Tester: |
Description (last modified by Nick Draper) (diff)
At the moment:
For determining the mangled filename
- If the filename is present use the file contents if it is available
- If the filename is present use the file contents if it is available
for loading the file
- if instrument name is not set, undefined behaviour
- if instrument_xml is present then load that xml (instrument filename is set to the value in the NXS file, not the nxs file itself)
- if filename has been entered them make up a filename out of the directory and instrument name and output an incorrect log message.
- Load the most fitting file based on the instrument name
- At no point would the filename specified be loaded even if correct and present
I suggest we change this to:
For file name mangling:
- use the xml string for loading the file from nexus
- use the xml string for the file that has been identified from the instrument name
for loading the file:
- if instrument_xml is present then load that xml (instrument filename is set to the nxs file itself)
- Load the most fitting file based on the instrument name
Change History
comment:3 Changed 5 years ago by Nick Draper
- Description modified (diff)
simplification after TSC discussions
comment:6 Changed 5 years ago by Nick Draper
- Status changed from new to inprogress
First implementation of changes
- IDS mangling used for checksum is now inst name + sha1 of xml 1.1. sha1 is computed after converitng to linux line endings and trim
- VTP file names changes to be same filename as IDS mangling
- VTP save directory moved to appdata/mantidproject/instrument/geometryCache
- VTP file saving simplified as files based on a checksum cannot be out of date
- unit tests updated to account for this
- unused methods removed from IDFObject
- InstrumentDefinitionParser changed to initialise during constructor
- XML parsing changed to lazy load rather than during initialisation.
Still to do:
- cache SHA1 checksum if needed
- Change the filename reported for nexus files
- Manually test
- Stop saving the filename to nexus files
- update documentation
re #11818
Changeset: da16824e65a652b7cfea2f1eed1dfa5920d5ba74
comment:7 Changed 5 years ago by Nick Draper
Further steps as defined below
- Change the filename reported for nexus files if xml contained within
- Stop saving the filename to nexus processed files
- removed some unused includes
Still to do:
- cache SHA1 checksum if needed
- Manually test
- update documentation
- investigate this error:
ctest -C Debug -J 4 -R LoadEventNexusTest -V
548: LoadParameterFile-[Error] Bad path syntax: C:\Mantid\Code\Mantid\instrument
\C:\Users\rrc79113\AppData\Roaming\mantidproject\mantid\instrument\HYSPECA_Param eters.xml. Unable to parse File: in C:/Mantid/Code/Mantid/instrument//C:\Users\r rc79113\AppData\Roaming\mantidproject\mantid\instrument\HYSPECA_Parameters.xml 548: LoadIDFFromNexus-[Notice] Instrument parameter file: C:\Users\rrc79113\AppD ata\Roaming\mantidproject\mantid\instrument\HYSPECA_Parameters.xml not found or un-parsable. Instrument parameter file: C:/Mantid/Code/Mantid/instrument/HYSPECA _Parameters.xml has been loaded
re #11818
Changeset: 0e064a7ff78427df06094f3ae56603f09a58247f
comment:8 Changed 5 years ago by Nick Draper
99% tests passed, 4 tests failed out of 1338
Total Test time (real) = 4435.75 sec The following tests FAILED: 402 - PythonAlgorithms_CylinderPaalmanPingsCorrectionTest_Debug (Failed) - False positive on my PC 712 - AlgorithmsTest_CreateDummyCalFileTest (Failed) 1181 - MDAlgorithmsTest_LoadMDTest (Timeout) 1195 - MDAlgorithmsTest_MergeMDFilesTest (Failed) Errors while running CTest
comment:9 Changed 5 years ago by Nick Draper
fixed the following unit test failures
712 - AlgorithmsTest_CreateDummyCalFileTest (Failed) 1181 - MDAlgorithmsTest_LoadMDTest (Timeout) 1195 - MDAlgorithmsTest_MergeMDFilesTest (Failed)
re #11818
Changeset: 5ac567bcec5e0b9f6724650ed88e7fcfd7bbc9b4
comment:10 Changed 5 years ago by Nick Draper
Error 4: from above the instrument parameter loading is fixed
re #11818
Changeset: 455e782e08b63666b9fcf0a09674f0ff7e741f15
comment:11 Changed 5 years ago by Nick Draper
Manual test and documentation to go
comment:12 Changed 5 years ago by Nick Draper
manual test passed, documentation to go
comment:13 Changed 5 years ago by Nick Draper
Pull request https://github.com/mantidproject/mantid/pull/815 in order to assess system tests.
Documentation still to do
comment:14 Changed 5 years ago by Nick Draper
re #11818 for doxygen warning
Changeset: b34f136e520d2b6bf8427f283615f65e102d4f75
comment:15 Changed 5 years ago by Nick Draper
re #11818 update documentation
Changeset: c4aded7f68c3ab63583aa6cc4c652087b95142be
comment:16 Changed 5 years ago by Nick Draper
re #11818 update documentation
Changeset: c817b1b2728c342edf72bbf8de8bba5ae352b119
comment:17 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 12656
This primarlily involves changes to: