Details
-
Type:
Story
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: meas_base
-
Labels:None
-
Story Points:2
-
Epic Link:
-
Sprint:DRP X16-2, DRP X16-3
-
Team:Data Release Production
Description
SingleFrameVariancePlugin can produce the following numpy warning, with no hint as to where the problem is coming from:
/Users/rowen/UW/LSST/lsstsw/miniconda/lib/python2.7/site-packages/numpy/core/_methods.py:59: RuntimeWarning: Mean of empty slice.
|
warnings.warn("Mean of empty slice.", RuntimeWarning)
|
I tracked it down by adding the following code to the calling code:
import warnings
|
with warnings.catch_warnings():
|
warnings.filterwarnings('error')
|
It would be nice if the measurement plugin handled this situation more gracefully, such as turning the warning into an exception or testing for it and handling it.
One way to reproduce this problem is to run tests/testProcessCcd.py in pipe_tasks. However, it is commonly seen when running processCcd on other data, as well.
Attachments
Issue Links
- mentioned in
-
Page Loading...
Using Nate Lust's recommendation for how to use the existing MeasurementError framework to gracefuly handle empty slices.