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

Python crashes when measuring flux from invalid shape parameters

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: meas_base
    • Labels:
      None

      Description

      Running the following snippet causes the Python kernel crashes:

      import lsst.afw.geom as afwGeom
      import lsst.afw.image as afwImage
      import lsst.meas.base as measBase
      import numpy as np
       
      img = afwImage.ImageD(np.random.randn(16,16))
      shape = afwGeom.Quadrupole(-2, -2, 0)  # <-- This is invalid
      flux = measBase.SdssShapeAlgorithm.computeFixedMomentsFlux(img, shape,
                                                                 img.getBBox().getCenter())
      
      

      This is yet another example of a user error that causes a complete crash instead of raising Exceptions. The correct way is to set `normalize=True` when constructing the `shape` variable.

        Attachments

          Issue Links

            Activity

            No work has yet been logged on this issue.

              People

              Assignee:
              wittgen Matthias Wittgen
              Reporter:
              kannawad Arun Kannawadi
              Reviewers:
              Arun Kannawadi
              Watchers:
              Arun Kannawadi, Matthias Wittgen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.