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

Segfault when the input SourceCatalog has a different schema at SourceDeblendTask

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: meas_deblender
    • Labels:
      None
    • Templates:
    • 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.

        Attachments

          Activity

            People

            • Assignee:
              hchiang2 Hsin-Fang Chiang
              Reporter:
              hchiang2 Hsin-Fang Chiang
              Reviewers:
              Jim Bosch
              Watchers:
              Hsin-Fang Chiang, Jim Bosch
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel