Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-5427

SingleFrameVariancePlugin can give numpy warnings

    Details

    • Type: Story
    • Status: Done
    • Priority: Major
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: meas_base
    • Labels:
      None
    • Templates:
    • Story Points:
      2
    • 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

          Container Issues

            Issue Links

              Activity

                People

                • Assignee:
                  vpk24 Vishal Kasliwal [X] (Inactive)
                  Reporter:
                  rowen Russell Owen
                  Reviewers:
                  John Swinbank
                  Watchers:
                  Jim Bosch, John Swinbank, Russell Owen, Vishal Kasliwal [X] (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Summary Panel