Skip to content

Commit

Permalink
Remove unnecessary (and possibly harmful code to set FAILURE flag to …
Browse files Browse the repository at this point in the history
…False

I think this is leftover from an older style of setting flag, which allowed
the algorithm to throw out from anywhere, knowing that the flag was True.
I believe that such failures will now be caught by the framework.
Plus, this strategy would circumvent any other code (such as the Centroid
Checker itself) which might want to set a failure flag but allow the alg.
to continue on.
  • Loading branch information
pgee2000 committed Aug 4, 2016
1 parent 7db5428 commit 6293fd7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/NaiveCentroid.cc
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ void NaiveCentroidAlgorithm::measure(
result.x = lsst::afw::image::indexToPosition(x + image.getX0()) + sum_x / sum;
result.y = lsst::afw::image::indexToPosition(y + image.getY0()) + sum_y / sum;
measRecord.set(_centroidKey, result);
_flagHandler.setValue(measRecord, FAILURE, false); // if we had a suspect flag, we'd set that instead
_centroidChecker(measRecord);
}

Expand Down
1 change: 0 additions & 1 deletion src/SdssCentroid.cc
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,6 @@ void SdssCentroidAlgorithm::measure(
result.xSigma = sqrt(dxc*dxc);
result.ySigma = sqrt(dyc*dyc);
measRecord.set(_centroidKey, result);
_flagHandler.setValue(measRecord, FAILURE, false);
_centroidChecker(measRecord);
}

Expand Down

0 comments on commit 6293fd7

Please sign in to comment.