Ticket #633 (closed: fixed)

Opened 11 years ago

Last modified 5 years ago

Load (or Save) NexusProcessed isn't doing spectrum numbers right

Reported by: Russell Taylor Owned by: Roman Tolchenov
Priority: major Milestone: Iteration 18
Component: Keywords:
Cc: Blocked By:
Blocking: Tester:

Description

I'd saved a workspace containing just a couple of spectra pulled out the middle of a GEM file, but when I loaded it back again it had lost the spectrum numbers - it was just counting from 1 again, and showing the first two detectors.

A quick look using HDF Explorer indicates that the spectrum numbers are being stored (in workspace:axis2), but line 163 of LoadNexusProcessed is just setting the spectrum numbers using a loop index. But even if that's fixed I think there's also a problem with the saving of the spectraDetectorMap because it seems as though only the first two UDETS are stored there (in instrument:detector:detector_list), not the ones relating to the spectra I saved.

Change History

comment:1 Changed 11 years ago by Russell Taylor

The distribution flag is also not read in (but is saved).

comment:2 Changed 11 years ago by Russell Taylor

Looking into this some more, there are further issues to sort out. Only the detector ID 'side' of the spectra-detector map is written out, not the spectrum number side (in NexusFileIO::writeNexusProcessedSpectraMap). You get lucky if you're using all the spectra starting from 1, but otherwise it ends up wrong.

I think there's also inconsistency/confusion (well I'm confused, anyway) about whether spectrum_min/max/list refers to spectrum numbers, workspace indices, workspace indices+1....

comment:3 Changed 11 years ago by Russell Taylor

  • Owner set to Roman Tolchenov

comment:4 Changed 11 years ago by Roman Tolchenov

(In [2611]) Saving and loading of parts of workspaces preserve the spectra numbers. re #633

comment:5 Changed 11 years ago by Roman Tolchenov

(In [2613]) Fix tests. re #633

comment:6 Changed 11 years ago by Russell Taylor

(In [2623]) Fix FindPeaks test. Re #633.

comment:7 Changed 11 years ago by Roman Tolchenov

  • Status changed from new to closed
  • Resolution set to fixed

comment:8 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 1481

Note: See TracTickets for help on using tickets.