Ticket #2375 (closed: fixed)
In GroupDetectors don't ignore dublicate Spectra IDs when reading mapfile
Reported by: | Anders Markvardsen | Owned by: | Anders Markvardsen |
---|---|---|---|
Priority: | major | Milestone: | Iteration 28 |
Component: | Mantid | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Michael Whitty |
Description
In GroupDetectors don't ignore dublicate Spectra IDs when reading mapfile. For instance currently:
<detector-grouping description="">
<group name="1">
<ids val="1-2"/>
</group> <group name="2">
<ids val="1-5"/>
</group> <default name="2"/>
</detector-grouping>
creates two histogram: one the sum of spectra 1-2 the other the sum of 3-5. Chance this so dublicate spectra numbers aren't ignored and for the above example this means two histograms one sum of 1-2 the other sum of 1-5.
Attachments
Change History
comment:3 Changed 10 years ago by Anders Markvardsen
- Status changed from accepted to verify
- Resolution set to fixed
comment:4 Changed 10 years ago by Michael Whitty
- Status changed from verify to verifying
- Tester set to Michael Whitty
comment:5 Changed 10 years ago by Michael Whitty
- Status changed from verifying to reopened
- Resolution fixed deleted
Does not seem to work as advertised. Reopenning, will attach example python and grouping files demonstrating what I mean. Basic problem: does not seem to work with creating a detector group object if ws already has a detector group with that detector id.
Get lines in the results log along the lines of:
Invalid value of newSpectrum. It is forbidden to create a new spectrum number with this method.
comment:6 Changed 10 years ago by Anders Markvardsen
- Status changed from reopened to accepted
- Milestone changed from Iteration 27 to Iteration 28
Before commenting out check for: "For now at least, the newSpectrum must already exist in the map" needs to do a bit more thinking when will not be fitting into this release
void SpectraDetectorMap::remap(const int oldSpectrum, const int newSpectrum) {
Do nothing if the two spectrum numbers given are the same if (oldSpectrum == newSpectrum) return; For now at least, the newSpectrum must already exist in the map
if ( ndet(newSpectrum) == 0 ) { g_log.error("Invalid value of newSpectrum. It is forbidden to create a new spectrum number with this method."); return; }
comment:8 Changed 10 years ago by Anders Markvardsen
- Status changed from accepted to verify
- Resolution set to fixed
comment:10 Changed 9 years ago by Michael Whitty
- Status changed from verifying to closed
tested in 11062
comment:11 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 3222
(In [9327]) Fix: In GroupDetectors don't ignore dublicate Spectra IDs when reading mapfile. re #2375