Details
-
Type:
Story
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: meas_deblender
-
Labels:None
-
Team:Data Facility
Description
The following code gives segfault:
import lsst.afw.image as afwImage
|
from lsst.afw.table import SourceTable
|
from lsst.meas.algorithms import SourceDetectionTask
|
from lsst.meas.deblender import SourceDeblendTask
|
|
exposure = afwImage.ExposureF('/datasets/hsc/repo/rerun/RC/w_2018_18/DM-14243/01111/HSC-Z/corr/CORR-0017962-101.fits')
|
|
schema = SourceTable.makeMinimalSchema()
|
detectTask = SourceDetectionTask(schema=schema)
|
|
# these two lines need to switch the order
|
table = SourceTable.make(schema)
|
deblendTask = SourceDeblendTask(schema=schema)
|
|
detectResult = detectTask.run(table, exposure)
|
catalog = detectResult.sources
|
deblendTask.run(exposure, catalog)
|
This is because the schema is modified when SourceDeblendTask is constructed. So the above code passes a catalog of a different schema to deblendTask than its schema.
Add a check to make the error clearer.
May you please review the two-line change?
I was thinking to add a test, but somehow the existing fits does not reproduce the problem (!?) I'm not sure this is worth adding a full calexp in the package.
Jenkins is running: https://ci.lsst.codes/blue/organizations/jenkins/stack-os-matrix/detail/stack-os-matrix/27963/pipeline