Ticket #8083 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Failure to load the spectra map when instrument is inside nexus file

Reported by: Gesner Passos Owned by: Gesner Passos
Priority: major Milestone: Release 3.0
Component: Framework Keywords:
Cc: martyn.gigg@… Blocked By:
Blocking: Tester: Martyn Gigg

Description

To reproduce, load the file attached (LARMOR17.nxs). Them, show detector. You will see a wrong definition of the spectra map updateSpectraUsing was moved inside an if that refers to not having the instrument inside the nexus file.

I think it is related to #6191, when I did this, the problem was sorted. But, I'm not sure it is correct.

diff --git a/Code/Mantid/Framework/DataHandling/src/LoadISISNexus2.cpp b/Code/Mantid/Framework/DataHandling/src/LoadISISNexus2.cpp
index 6a9b4ae..8475647 100644
--- a/Code/Mantid/Framework/DataHandling/src/LoadISISNexus2.cpp
+++ b/Code/Mantid/Framework/DataHandling/src/LoadISISNexus2.cpp
@@ -202,8 +202,8 @@ namespace Mantid
       } catch(std::exception & ) {  // No valid instrument and sample section found
         parameterString="not found";
       }
+      local_workspace->updateSpectraUsing(SpectrumDetectorMapping(spec(),udet(),udet.dim0()));
       if( parameterString == "not found") {
-        local_workspace->updateSpectraUsing(SpectrumDetectorMapping(spec(),udet(),udet.dim0()));
         runLoadInstrument(local_workspace);
       } else {  // Use parameters got from instrument section of Nexus file
         local_workspace->readParameterMap(parameterString);

Attachments

LARMOR00000017.nxs (2.4 MB) - added by Gesner Passos 7 years ago.
larmor_pictures.png (31.3 KB) - added by Gesner Passos 7 years ago.

Change History

Changed 7 years ago by Gesner Passos

comment:1 Changed 7 years ago by Gesner Passos

  • Status changed from new to inprogress

comment:2 Changed 7 years ago by Gesner Passos

  • Cc martyn.gigg@… added

comment:3 Changed 7 years ago by Gesner Passos

Correct the LoadISISNexus2 to load instrument defined in nxs

re #8083

Changeset: 83c626582989161b7bbb64f6f1b90881217098fb

comment:4 Changed 7 years ago by Gesner Passos

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

Changed 7 years ago by Gesner Passos

comment:5 Changed 7 years ago by Gesner Passos

Tester:

Load LARMOR17.nxs. Show the instrument in this file.

You will see a result similar to the larmor_pictures.png attached.

The reason for this is explained in http://www.mantidproject.org/Visualization_of_Calibrated_Tubes.

This means, that the tubes are calibrated. Hence, the job was done.

comment:6 Changed 7 years ago by Martyn Gigg

  • Status changed from verify to verifying
  • Tester set to Martyn Gigg

comment:7 Changed 7 years ago by Martyn Gigg

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/bugfix/8083_load_instrument_inside_nexus'

Full changeset: ea36b3ffc7da42d0760852e883ca74e849b45fe4

comment:8 Changed 7 years ago by Martyn Gigg

The detector table looks correct now.

comment:9 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 8928

Note: See TracTickets for help on using tickets.