Skip to content

Commit

Permalink
Refs #4814. Fixing a bug found during MedianDetectorTest conversion.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterfpeterson committed Feb 21, 2012
1 parent 00a743a commit c410162
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions Code/Mantid/Framework/Algorithms/src/DetectorDiagnostic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,10 @@ namespace Mantid
PARALLEL_START_INTERUPT_REGION

if (checkForMask) {
if (instrument->isDetectorMasked(i))
const std::set<detid_t>& detids = input->getSpectrum(i)->getDetectorIDs();
if (instrument->isDetectorMasked(detids))
continue;
if (instrument->isMonitor(i))
if (instrument->isMonitor(detids))
continue;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,10 @@ namespace Mantid

if (checkForMask)
{
if(instrument->isMonitor(i))
const std::set<detid_t>& detids = counts1->getSpectrum(i)->getDetectorIDs();
if(instrument->isMonitor(detids))
continue;
if(instrument->isDetectorMasked(i))
if(instrument->isDetectorMasked(detids))
{
// Ensure it is masked on the output
maskWS->dataY(i)[0] = deadValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,13 @@ namespace Mantid

if (checkForMask)
{
if (instrument->isMonitor(i))
const std::set<detid_t>& detids = countsWS->getSpectrum(i)->getDetectorIDs();
if (instrument->isMonitor(detids))
{
continue; // do include or exclude from mask
}

if (instrument->isDetectorMasked(i))
if (instrument->isDetectorMasked(detids))
{
keepData = false;
}
Expand Down

0 comments on commit c410162

Please sign in to comment.