Details
-
Type:
Bug
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: meas_base
-
Labels:None
-
Story Points:4
-
Epic Link:
-
Team:Architecture
-
Urgent?:No
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
- relates to
-
DM-3476 calcmom in SdssShape.cc has poor error reporting
- Won't Fix
Assert makes no sense in this context `int calcmom` already gracefullt checks on the input parameters.