Ticket #9467 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

When Nexus contains the correct param map don't try load external param file

Reported by: Anders Markvardsen Owned by: Anders Markvardsen
Priority: critical Milestone: Release 3.3
Component: Framework Keywords:
Cc: Blocked By:
Blocking: Tester: Alex Buts

Description (last modified by Anders Markvardsen) (diff)

With conversation with Martyn

When ISIS/SNS raw Nexus fils contains param map don't try load external param file.

This should make no difference to SNS since it is believed that SNS do not include param map in Nexus file.

But it will work better for ISIS where a valid param map is shipped with the raw Nexus file

Put as critical, since at ISIS this is causing considerable confusion, when instrument scientist is hoping to work with the parameters contained within the nexus file but finds that these have been overwritten by different values upon load

Change History

comment:1 Changed 6 years ago by Anders Markvardsen

  • Owner set to Anders Markvardsen
  • Status changed from new to assigned
  • Description modified (diff)
  • Summary changed from When Nexus self-contained - option to not load external param files to When Nexus contain param map don't try load external param file

comment:2 Changed 6 years ago by Anders Markvardsen

  • Description modified (diff)

comment:3 Changed 6 years ago by Anders Markvardsen

  • Description modified (diff)

comment:4 Changed 6 years ago by Anders Markvardsen

  • Summary changed from When Nexus contain param map don't try load external param file to When Nexus contains the correct param map don't try load external param file

comment:5 Changed 6 years ago by Anders Markvardsen

From discussions with Alex he has pointed out a valid point, which at least I had not really registered. That is there is an advantage of have external IDF and parameter files over internal once in that the former can be modified retrospective and ensure that new releases of Mantid are shipped with backward competable such files.... Hence based on this I would be useful if we could have a transparent mechanism for automatically overwrite wrongly embedded IDF and parameter information in a Nexus, hopefully this will only happen rarely, but it will happen

comment:6 Changed 6 years ago by Anders Markvardsen

For information.

The order at which Load handle ISIS/SNS Nexus files with an embedded IDF at the moment is (from the point of view IDF and instrument parameters):

  1. Load embedded IDF, including any instrument parameters defined in this file. These instrument parameters are then applied after the log files have been read in - in order to handle the <logfile> instrument parameter file entries like:

<parameter name="x">

<logfile id="trolley2_x_displacement" extract-single-value-as="position 1" />

</parameter>

  1. For ISIS raw Nexus file only, I believe, the Nexus file may also contain an entry instrument->instrument_parameter_map entry which is a text string format version of a parameter map contained in workspace (identical to those we store for processes mantid nexus files)

If exist this parameter map gets applied to the workspace after step 1

  1. Say the instrument is LET, then Load will look for LET_Parameters.xml and if exist apply the parameters in this file

comment:7 Changed 6 years ago by Anders Markvardsen

  • Milestone changed from Release 3.2 to Backlog

note in connection with this ticket the tread ​https://github.com/mantidproject/documents/blob/master/Design/EmbeddedInstrumentInfoNexus.md has been created

comment:8 Changed 6 years ago by Anders Markvardsen

  • Milestone changed from Backlog to Release 3.3

comment:9 Changed 6 years ago by Anders Markvardsen

  • Status changed from assigned to inprogress

don't load 'fallback' parameter file if map in nexus. re #9467

Change the behaviour of LoadIDFFromNexus and before doing this, as part of trying to ensure I wasn't broking something, updated various code comments related to loading of xml files

Changeset: f1865b55a3de41be8505985ca7b48cea7cc533b9

comment:10 Changed 6 years ago by Anders Markvardsen

To test e.g. do:

  1. load HYSA_12509.nxs.h5 in AutoTestData which contains an embedded IDF. When loading it you should get the log message: "Instrument parameter file: C:/Backup/Backup_folder1/work/code/Mantid/git/mantid/Code/Mantid/instrument/HYSPECA_Parameters.xml has been loaded"
  1. Load MAPS00018314.nxs in systemtest/data (recently added with #8214). When loaded you should get the message: "Found Instrument parameter map entry in Nexus file, which is loaded"

comment:11 Changed 6 years ago by Anders Markvardsen

Updated alg doc so it reflect what is done in code. re #9467

Changeset: 0aa2ccf4882c2d86d787fe54294f56a5828b6aac

comment:12 Changed 6 years ago by Anders Markvardsen

  • Status changed from inprogress to verify
  • Resolution set to fixed

To tester: see comment 10

comment:13 Changed 6 years ago by Alex Buts

  • Status changed from verify to verifying
  • Tester set to Alex Buts

comment:14 Changed 6 years ago by Alex Buts

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/9467_if_param_map_in_nexus'

Full changeset: 781eca6cc7b69625d9d40dc0b409d4a2e0ad0a47

comment:15 Changed 6 years ago by Alex Buts

works as described and fine as first step of changes outlined in https://github.com/mantidproject/documents/blob/master/Design/EmbeddedInstrumentInfoNexus.md

comment:16 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 10310

Note: See TracTickets for help on using tickets.