-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle empty variance array gracefully.
SingleFrameVariancePlugin attempts to compute the median of the variance array for pixels in the heavy footprint of a source. Some pixels are ignored because mask flags are set indicating that the pixel is not to be trusted. Sometimes, this results in all pixels getting rejected at which point numpy raises a RuntimeWarning stating that it is trying to compute the median of an empty array. We check for the empty array and raise a MeasurementError if all the pixels are flagged. The testVariance unittest has been modified to test the new behavior.
- Loading branch information
Showing
2 changed files
with
54 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters