Ticket #6125 (closed: fixed)

Opened 8 years ago

Last modified 5 years ago

Engin-X event files crash mantid

Reported by: Nick Draper Owned by: Martyn Gigg
Priority: blocker Milestone: Release 2.3.1
Component: Mantid Keywords: PatchCandidate,Released
Cc: Blocked By:
Blocking: Tester: Peter Peterson

Description (last modified by Nick Draper) (diff)

This is Saurabh from ENGIN-X. We have been working on getting event mode capability going on ENGIN-X. Last cycle we successfully collected some event mode data. I was trying to load the data on to MANTID but haven’t been able to do so. The instrument definition for ENGIN-X exists on MANTID and we can load regular data without problem. When I try to load event mode data MANTID recognizes the data as event mode and brings up the right dialog box but crashes while loading the file. 
 
The file I  am trying to load is \\isis\inst$\NDXENGINX\Instrument\data\cycle_12_3\ENGINX00189400.nxs 
 
Could you please let me know what would be the reason for this? We anticipate doing more and more event mode experiments and therefore want to further develop capabilities of reducing and analysing data in a variety of different ways. I look forward to working with you going forward. 

Change History

comment:1 Changed 8 years ago by Nick Draper

  • Description modified (diff)

comment:2 Changed 8 years ago by Nick Draper

I've tracked the crash down to LoadEventNexus::makeMapToEventLists()

The crash occurs on the first instance of this line and is an access out of range of the eventVectors array

eventVectors[j-pixelID_to_wi_offset] = &WS->getEventList(wi).getEvents();

surrounding that line with this code

      // Save a POINTER to the vector<tofEvent>
      //HACK just put protection around the line that is throwing the out of range error
      // I don't really understand the offset maths here or exactly what this is doing
      // but for engin-x event mode data it is requesting an offset outside of the vector
      // \\isis\inst$\NDXENGINX\Instrument\data\cycle_12_3\ENGINX00189400.nxs 
      if ((j-pixelID_to_wi_offset) < (eventid_max+1))
      {
        eventVectors[j-pixelID_to_wi_offset] = &WS->getEventList(wi).getEvents();
      }
      else
      {
        g_log.warning()<<"Attempt to access eventvectors out of range, size is " << eventid_max+1 
          << ", attempted to write to index " << j-pixelID_to_wi_offset 
          << ".  j=" << j << ", pixelID_to_wi_offset=" << pixelID_to_wi_offset << std::endl;
      }

does allow it not to crash, but reports two our of range attempts. We need to understand what is going on here, and what is different about this data.

One difference that may or may not be related is that the DetectorIDs for this instrument are not uniform, there is a gap of 5 missing at one point.

Also this is a new event mode instrument, it has not worked before so there is a greater likelihood of something in the file being wrong, or just not something we anticipated.

You probably should talk to Martyn about this one as he put in the ISIS event mode support.

comment:3 Changed 8 years ago by Roman Tolchenov

  • Status changed from new to accepted

comment:4 Changed 8 years ago by Roman Tolchenov

  • Owner changed from Roman Tolchenov to Martyn Gigg
  • Status changed from accepted to assigned

The spectra-detector map has a gap in the middle because of the monitors. The spectra ids are not contiguous.

comment:5 Changed 8 years ago by Nick Draper

  • Keywords PatchCandidate added
  • Milestone changed from Release 2.4 to Release 2.3.1

comment:6 Changed 8 years ago by Martyn Gigg

  • Status changed from assigned to accepted

comment:7 Changed 8 years ago by Martyn Gigg

Handle event ID to wksp index better LoadEventNexus... Refs #6125

for those files that do not have a 1:1 detector mapping.

Changeset: 459ab103529f3eacb1e86b525a3bdc6a2d5e47be

comment:8 Changed 8 years ago by Martyn Gigg

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

comment:9 Changed 8 years ago by Martyn Gigg

Handle event ID to wksp index better LoadEventNexus... Refs #6125

for those files that do not have a 1:1 detector mapping.

Changeset: 9fa22c2e601bf418084ce20644f92e30f21fe222

comment:10 Changed 8 years ago by Peter Peterson

This was merged into the release branch.

comment:11 Changed 8 years ago by Peter Peterson

  • Status changed from verify to verifying
  • Tester set to Peter Peterson

comment:12 Changed 8 years ago by Peter Peterson

  • Status changed from verifying to closed

This was done correctly.

comment:13 Changed 8 years ago by Martyn Gigg

Handle event ID to wksp index better LoadEventNexus... Refs #6125

for those files that do not have a 1:1 detector mapping.

Changeset: 459ab103529f3eacb1e86b525a3bdc6a2d5e47be

comment:14 Changed 7 years ago by Nick Draper

  • Keywords PatchCandidate,Released added; PatchCandidate removed

comment:15 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 6971

Note: See TracTickets for help on using tickets.