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

ObjectSizeStarSelector can produce numpy warnings

    Details

    • Type: Bug
    • Status: Done
    • Priority: Major
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: meas_algorithms
    • Labels:
      None
    • Templates:
    • Story Points:
      2
    • Sprint:
      DRP X16-3
    • Team:
      Data Release Production

      Description

      `ObjectSizeStarSelector` can produce the following numpy warning:

      RuntimeWarning: invalid value encountered in less
      

      This occurs at the following point in the code:

              for i in range(nCluster):
                  # Only compute func if some points are available; otherwise, default to NaN.
                  pointsInCluster = (clusterId == i)
                  if numpy.any(pointsInCluster):
                      centers[i] = func(yvec[pointsInCluster])
      

      where `func` has been assigned to `numpy.mean`. When I have seen this occur I have found that `dist` is an array of `nan`

      I suggest that the star selector handle this situation more gracefully, e.g. by reporting an appropriate exception or handling the data in an appropriate way. If logging a message would be helpful, then please do that (and if RFC-154 is adopted, a log will be available).

      One way to reproduce this is to run `tests/testProcessCcd.py` in `pipe_tasks`. However, I often see it when running `processCcd.py` on other data, as well.

        Attachments

          Container Issues

            Issue Links

              Activity

                People

                • Assignee:
                  vpk24 Vishal Kasliwal [X] (Inactive)
                  Reporter:
                  rowen Russell Owen
                  Reviewers:
                  Pim Schellart
                  Watchers:
                  Jim Bosch, Paul Price, Pim Schellart, Russell Owen, Vishal Kasliwal [X] (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Summary Panel