Ticket #4826 (closed: fixed)

Opened 9 years ago

Last modified 5 years ago

det->isMasked is not always same as instrument->isDetectorMasked

Reported by: Peter Peterson Owned by: Nick Draper
Priority: major Milestone: Release 2.1
Component: Mantid Keywords:
Cc: zikovskyjl@… Blocked By:
Blocking: Tester: Russell Taylor

Description

While trying to refactor MedianDetectorTest as part of #4814 it was discovered that the two methods for determining if a detector is masked do not match.

Change History

comment:1 Changed 9 years ago by Peter Peterson

  • Owner set to Peter Peterson
  • Status changed from new to accepted

comment:2 Changed 9 years ago by Peter Peterson

Inside Instrument::isDetectorMasked(const detid_t) the last couple of lines are where the difference lies. m_map->get(det, "masked") does not give the same as det->isMasked().

comment:3 Changed 9 years ago by Peter Peterson

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

Turns out that there was a big error code 18 in the way. Replaced user and tried again.

comment:4 Changed 9 years ago by Peter Peterson

Refs #4826. More appropriate return for isDetectorMasked.

Changeset: dfae42f4f42b5224df4f7cc4a3aa1f2acadd1cb6

comment:5 Changed 8 years ago by Nick Draper

  • Status changed from verify to reopened
  • Resolution invalid deleted

Marked invalid, but code was submitted. reopened and marked as fixed. The owner will change to me but the real developer is Peter Peterson

comment:6 Changed 8 years ago by Nick Draper

  • Owner changed from Peter Peterson to Nick Draper
  • Status changed from reopened to accepted

comment:7 Changed 8 years ago by Nick Draper

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

comment:8 Changed 8 years ago by Russell Taylor

  • Status changed from verify to verifying
  • Tester set to Russell Taylor

comment:9 Changed 8 years ago by Russell Taylor

  • Status changed from verifying to closed

I don't think the single commit to this ticket could ever make a jot of functional difference, so arguably it belongs under 'trivial changes' which would make the original invalid resolution appropriate.

A code inspection of the two methods tells me that they should give the same answer - except perhaps if the detector id was pulled from a detector group (and you were then unwittingly comparing isDetectorMasked with DetectorGroup::isMasked). It doesn't seem ideal to have these two ways of asking this question - I hope the performance difference is real rather than just perceived.

comment:10 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 5673

Note: See TracTickets for help on using tickets.