Ticket #7154 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Instrument_xml info does not get read from isis raw nexus event file

Reported by: Anders Markvardsen Owned by: Karl Palmen
Priority: blocker Milestone: Release 2.6
Component: Framework Keywords:
Cc: Blocked By:
Blocking: Tester: Alex Buts

Description

If instrument_xml is present in isis raw nexus histogram file this get read but at present this is not the case for isis raw event nexus file

more details to follow

Change History

comment:1 Changed 7 years ago by Anders Markvardsen

LoadEventNexus reads ISIS and SNS event nexus data.

This class uses the method LoadEventNexus::runLoadInstrument to load the instrument, which currently does not check if an IDF is defined in the nexus file.

Modify so that this loader so that it works the same way as when isis raw histogram nexus file and mantid processed data are loaded

Freddie will provide a test file. More specifically an isis raw event nexus file for the WISH instrument where panel03 of the instrument has been artificially moved up by one meter.

comment:2 Changed 7 years ago by Anders Markvardsen

  • Owner changed from Anders Markvardsen to Karl Palmen
  • Status changed from new to assigned

comment:3 Changed 7 years ago by Karl Palmen

LoadISISNexus2::runLoadInstrument does not seem to check if an IDF is defined in the nexus file. Instead it is done by the LoadISISNexus2::exec before calling runLoadInstrument, which is done only if it does not find a valid instrument in the nexus file.

I think LoadEventNexus should do likewise and better still they share code.

comment:4 Changed 7 years ago by Karl Palmen

  • Status changed from assigned to accepted

comment:5 Changed 7 years ago by Karl Palmen

LoadEventNexus seems to load the instrument twice. Once when loading detector events and once when loading monitor events.

comment:6 Changed 7 years ago by Karl Palmen

I found the double load of the instument only occurs when the loadMonitors and MonotorsAsEvents checkboxes are ticked and the Nexus file has monitor events. Then two workspaces are created, the second one for monitors. Therefore this could not be fixed merely by surpressing a second load of the instrument. The instrument would need copying from first workspace to second. This is not worth doing given that little time would be saved (except in debug mode).

comment:7 Changed 7 years ago by Karl Palmen

My plan is to leave runLoadInstrument as it is but call it from loadInstrument, which will first call loadInstrumentFromNexus and then call runLoadInstrument if no instrument has yet been loaded.

loadInstrumentFromNexus will call workspace->loadExperimentInfoNexus or possibly be replaced by it.

comment:8 Changed 7 years ago by Karl Palmen

Add and Call dummy function loadInstrumentFromNexus re #7154

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 4817340d6c50e46f036ae46ae82fe4addca18672

comment:9 Changed 7 years ago by Karl Palmen

I find that an algorithm LoadInstrumentFromNexus exists. This should be able to load the instrument from an event Nexus file like the one provided by Freddie for this ticket. Currently it causes Mantid to crash. Then LoadEventNexus could call LoadInstrumentFromNexus as a child algorithm.

comment:10 Changed 7 years ago by Karl Palmen

Rename to runLoadIDFFromNexus re #7154

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 56a363423ddeccf288914fa15df9f6e6ad3ec5f8

comment:11 Changed 7 years ago by Karl Palmen

Add empty LoadIDFFromNexus algorithm re #7154

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: e986e0a9688330abf47b256b4c582258aac0619a

comment:12 Changed 7 years ago by Karl Palmen

LoadIDFFromNexus works on test file re #7154

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: abbd3b45d9f8fc00d340d46d97b1c18f4f8cb04c

comment:13 Changed 7 years ago by Karl Palmen

Change argument list of runLoadIDFFromNexus to use filename re #7154

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 01094c29b8a905bed3b0c24bbc278ed3fd225883

comment:14 Changed 7 years ago by Karl Palmen

Make LoadEventNexus run LoadIDFFromNexus re #7154

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: ba330223976bbbc4b4827e7c6c2f7a1e2c581b18

comment:15 Changed 7 years ago by Karl Palmen

Tidy up logging re #7154

Still need to make child algorithm LoadIDFFromNexus quiet, if it does not find an IDF in the Nexus file.

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 6cf973146dd0d3f6c0b7c132af3e091be83325ca

comment:16 Changed 7 years ago by Karl Palmen

Tidy up error reporting and ...Path property re #7154

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 949c7be589cc1e7a3aeaac14aac11ed8516c87f4

comment:17 Changed 7 years ago by Karl Palmen

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

To test:

The only Nexus files currently in existence that are suitable for testing are found available at
Olympic\Babylon5\Scratch\Anders as wish00024142_move_panel03.nxs and WISH00024124.nxs. If you can't obtain either of these files, please ask me to E-mail you a copy.

Both files have panel03 moved up one metre in the internal IDF. Load either or both files and then view the instrument. Panel03 should appear raised 1 metre (in Y direction).

Also test that it behaves well with other event nexus files such as WISH00023552.nxs.

comment:18 Changed 7 years ago by Russell Taylor

  • Status changed from verify to reopened
  • Resolution fixed deleted

There's a warning at line 1774 of LoadEventNexus.cpp that needs fixing (executionSuccessful is not used): see https://builds.sns.gov/job/ornl_clean_rhel6_develop/1987/warnings22Result/

And where is the unit test for LoadIDFFromNexus?

comment:19 Changed 7 years ago by Karl Palmen

The issue of the unit test is covered by ticket #7396 .

comment:20 Changed 7 years ago by Karl Palmen

The unused variable (executionSuccessful) has been removed, but the change has not shown up in TRAC.

comment:21 Changed 7 years ago by Karl Palmen

  • Status changed from reopened to accepted

comment:22 Changed 7 years ago by Karl Palmen

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

comment:23 Changed 7 years ago by Alex Buts

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

comment:24 Changed 7 years ago by Alex Buts

  • Status changed from verifying to closed

works as descried

comment:25 Changed 7 years ago by Nick Draper

  • Component changed from Mantid to Framework

comment:26 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 8000

Note: See TracTickets for help on using tickets.