Ticket #2375 (closed: fixed)

Opened 10 years ago

Last modified 5 years ago

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

ticket2375.py (357 bytes) - added by Michael Whitty 10 years ago.
grpA.map (335 bytes) - added by Michael Whitty 10 years ago.
grpB.map (353 bytes) - added by Michael Whitty 10 years ago.

Change History

comment:1 Changed 10 years ago by Anders Markvardsen

(In [9327]) Fix: In GroupDetectors don't ignore dublicate Spectra IDs when reading mapfile. re #2375

comment:2 Changed 10 years ago by Anders Markvardsen

  • Status changed from new to accepted

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.

Changed 10 years ago by Michael Whitty

Changed 10 years ago by Michael Whitty

Changed 10 years ago by Michael Whitty

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:7 Changed 10 years ago by Anders Markvardsen

(In [9598]) Fix: In GroupDetectors don't ignore dublicate Spectra IDs when reading mapfile Added more unit tests Tested that Mike's script works

re #2375

comment:8 Changed 10 years ago by Anders Markvardsen

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

comment:9 Changed 9 years ago by Michael Whitty

  • Status changed from verify to verifying

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

Note: See TracTickets for help on using tickets.