Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the order that instrument files are loaded in preferece for nexus files #12656

Closed
1 task done
NickDraper opened this issue May 20, 2015 · 1 comment · Fixed by #815
Closed
1 task done

Change the order that instrument files are loaded in preferece for nexus files #12656

NickDraper opened this issue May 20, 2015 · 1 comment · Fixed by #815
Assignees
Labels
Extra Attention Testers and Gate keepers should pay extra attention as this affects core aspects. Framework Issues and pull requests related to components in the Framework Maintenance Unassigned issues to be addressed in the next maintenance period.

Comments

@NickDraper
Copy link
Contributor

This issue was originally TRAC 11818

This ticket is blocked by :

At the moment:

For determining the mangled filename

  1. If the filename is present use the file contents if it is available
  2. If the filename is present use the file contents if it is available

for loading the file

  1. if instrument name is not set, undefined behaviour
  2. 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)
    1. if filename has been entered them make up a filename out of the directory and instrument name and output an incorrect log message.
  3. Load the most fitting file based on the instrument name
  4. At no point would the filename specified be loaded even if correct and present

I suggest we change this to:

For file name mangling:

  1. use the xml string for loading the file from nexus
  2. use the xml string for the file that has been identified from the instrument name

for loading the file:

  1. if instrument_xml is present then load that xml (instrument filename is set to the nxs file itself)

  2. Load the most fitting file based on the instrument name

    Keywords: CORE, Maintenance

@NickDraper
Copy link
Contributor Author

@NickDraper (2015-05-20T14:57:36):
This primarlily involves changes to:

  • ExperimentInfo::loadInstrumentInfoNexus - for the loading order of the IDF itself
  • InstrumentDefinitionParser::getMangledName - for the order of determining the mangled name

@NickDraper (2015-05-26T14:02:46):
simplification after TSC discussions


@NickDraper (2015-05-27T14:32:21):
First implementation of changes

  1. 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
  2. VTP file names changes to be same filename as IDS mangling
  3. VTP save directory moved to appdata/mantidproject/instrument/geometryCache
  4. VTP file saving simplified as files based on a checksum cannot be out of date
  5. unit tests updated to account for this
  6. unused methods removed from IDFObject
  7. InstrumentDefinitionParser changed to initialise during constructor
  8. XML parsing changed to lazy load rather than during initialisation.

Still to do:

  1. cache SHA1 checksum if needed
  2. Change the filename reported for nexus files
  3. Manually test
  4. Stop saving the filename to nexus files
  5. update documentation

re http://trac.mantidproject.org/mantid/ticket/11818

da16824


@NickDraper (2015-05-27T16:20:53):
Further steps as defined below

  1. Change the filename reported for nexus files if xml contained within
  2. Stop saving the filename to nexus processed files
  3. removed some unused includes

Still to do:

  1. cache SHA1 checksum if needed
  2. Manually test
  3. update documentation
  4. 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 http://trac.mantidproject.org/mantid/ticket/11818

0e064a7


@NickDraper (2015-05-28T13:24:36):
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

@NickDraper (2015-05-28T15:47:04):
fixed the following unit test failures

    712 - AlgorithmsTest_CreateDummyCalFileTest (Failed)
    1181 - MDAlgorithmsTest_LoadMDTest (Timeout)
    1195 - MDAlgorithmsTest_MergeMDFilesTest (Failed)

re http://trac.mantidproject.org/mantid/ticket/11818

5ac567b


@NickDraper (2015-05-28T17:12:41):
Error 4: from above the instrument parameter loading is fixed

re http://trac.mantidproject.org/mantid/ticket/11818

455e782


@NickDraper (2015-05-28T17:13:15):
Manual test and documentation to go


@NickDraper (2015-05-29T11:03:23):
manual test passed, documentation to go


@NickDraper (2015-05-29T11:05:19):
Pull request #815
in order to assess system tests.

Documentation still to do


@NickDraper (2015-06-03T13:27:12):
re http://trac.mantidproject.org/mantid/ticket/11818 for doxygen warning

b34f136


@NickDraper (2015-06-03T13:27:13):
re http://trac.mantidproject.org/mantid/ticket/11818 update documentation

c4aded7


@NickDraper (2015-06-03T14:05:34):
re http://trac.mantidproject.org/mantid/ticket/11818 update documentation

c817b1b

@NickDraper NickDraper added Framework Issues and pull requests related to components in the Framework Maintenance Unassigned issues to be addressed in the next maintenance period. Extra Attention Testers and Gate keepers should pay extra attention as this affects core aspects. labels Jun 3, 2015
@NickDraper NickDraper self-assigned this Jun 3, 2015
martyngigg added a commit that referenced this issue Jun 15, 2015
martyngigg added a commit that referenced this issue Jun 15, 2015
The instrument_source attribute was removed and so the code hit an
error when trying to load the parameter map. As the instrument_source
is no longer used anywhere there is no point in trying to load it from
older files.
Refs #12656
martyngigg added a commit that referenced this issue Jun 15, 2015
Preserves the expected path within the Nexus file
Refs #12656
martyngigg added a commit that referenced this issue Jun 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Extra Attention Testers and Gate keepers should pay extra attention as this affects core aspects. Framework Issues and pull requests related to components in the Framework Maintenance Unassigned issues to be addressed in the next maintenance period.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants