Ticket #633 (closed: fixed)
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: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....
The distribution flag is also not read in (but is saved).