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

sip/cleanBadPoints can generate numpy warnings

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: meas_astrom
    • Labels:
      None
    • Team:
      Data Release Production

      Description

      Running meas_astrom can generate numpy errors due to requesting operations on empty arrays. Please fix this.

      /u/lsst/products/DarwinX86/anaconda/1.8.0/lib/python2.7/site-packages/numpy/core/_methods.py:57: RuntimeWarning: invalid value encountered in double_scalars
      ret = ret / float(rcount)
      /u/lsst/products/DarwinX86/anaconda/1.8.0/lib/python2.7/site-packages/numpy/core/_methods.py:72: RuntimeWarning: invalid value encountered in true_divide
      out=arrmean, casting='unsafe', subok=False)
      /u/lsst/products/DarwinX86/anaconda/1.8.0/lib/python2.7/site-packages/numpy/core/_methods.py:96: RuntimeWarning: invalid value encountered in double_scalars

        Attachments

          Activity

          Hide
          rhl Robert Lupton added a comment -

          Simple fix

          Show
          rhl Robert Lupton added a comment - Simple fix
          Hide
          price Paul Price added a comment -

          Where is the fix (what fork, what branch)?

          Show
          price Paul Price added a comment - Where is the fix (what fork, what branch)?
          Hide
          price Paul Price added a comment -

          Found fix on the LSST fork, in tickets/DM-818:

          price@price-laptop-astro:~/LSST/meas/astrom (tickets/DM-818=) $ git --no-pager log --stat origin/master..
          commit 21ddddd0936dd8fa59eb0ad376292c516dd52a09
          Author: Robert Lupton the Good <rhl@astro.princeton.edu>
          Date:   Fri Jun 6 18:17:05 2014 -0400
           
              Check for empty arrays being passed to numpy (DM-818)
              
              Also added an 'import sys' needed when processing errors
           
           python/lsst/meas/astrom/astrom.py             |  1 +
           python/lsst/meas/astrom/sip/cleanBadPoints.py | 31 ++++++++++++++++-----------
           2 files changed, 20 insertions(+), 12 deletions(-)

          As noted, the fix is straightforward. I would have preferred that the coding standards violations (spaces around operators) be fixed at the same time the code was indented, but no biggie.

          Is a test for this necessary?

          Show
          price Paul Price added a comment - Found fix on the LSST fork, in tickets/ DM-818 : price@price-laptop-astro:~/LSST/meas/astrom (tickets/DM-818=) $ git --no-pager log --stat origin/master.. commit 21ddddd0936dd8fa59eb0ad376292c516dd52a09 Author: Robert Lupton the Good <rhl@astro.princeton.edu> Date: Fri Jun 6 18:17:05 2014 -0400   Check for empty arrays being passed to numpy (DM-818) Also added an 'import sys' needed when processing errors   python/lsst/meas/astrom/astrom.py | 1 + python/lsst/meas/astrom/sip/cleanBadPoints.py | 31 ++++++++++++++++----------- 2 files changed, 20 insertions(+), 12 deletions(-) As noted, the fix is straightforward. I would have preferred that the coding standards violations (spaces around operators) be fixed at the same time the code was indented, but no biggie. Is a test for this necessary?

            People

            • Assignee:
              rhl Robert Lupton
              Reporter:
              rhl Robert Lupton
              Reviewers:
              Paul Price
              Watchers:
              Paul Price, Robert Lupton
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel