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

Fix error in cmodel related to computing LinearTransforms

    Details

    • Type: Bug
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: afw, meas_modelfit
    • Labels:
      None
    • Story Points:
      4
    • Sprint:
      DRP X16-3, DRP F16-1
    • Team:
      Data Release Production

      Description

      When running cmodel in ci_hsc, the cmodel plugin throws the error:

      processCcd.charImage.detectAndMeasure.measurement WARNING: Error in modelfit_CModel.measure on record 775961510756221246: 
        File "src/geom/LinearTransform.cc", line 66, in const lsst::afw::geom::LinearTransform lsst::afw::geom::LinearTransform::invert() const
          Could not compute LinearTransform inverse {0}
      lsst::afw::geom::SingularTransformException: 'Could not compute LinearTransform inverse'
      

      This seems to be causing some aperture corrections to fail, as there are no sources to compute the corrections from. Investigate why this error is being thrown. If it is a bug, fix it, if the code is not handling situations it should then make the algorithm more robust.

        Attachments

          Issue Links

            Activity

            Hide
            nlust Nate Lust added a comment -

            As an update, I have traced the issue down to the shapelet approximation for the psf of one image failing for every source. I have extracted the failing exposure post isr and am attempting to isolate the failing code now.

            Show
            nlust Nate Lust added a comment - As an update, I have traced the issue down to the shapelet approximation for the psf of one image failing for every source. I have extracted the failing exposure post isr and am attempting to isolate the failing code now.
            Hide
            nlust Nate Lust added a comment -

            Update #2:
            The problem is triggered when the initial exposure does not have a psf, one is generated for it with InstallSimplePsf. This is then used to make measurements and actually measure a psf from the image. This is the psf that is failing. The failing psf is fed back into detectMeasureAndEstimatePsf to refine the psf estimation. The incorrectly measured psf from the first iteration is a bad model for reasons that must still be determined. The next step will be to look at all the sources that go into psfex and see if any problems exist.

            As a note if the FWHM size is increased in InstallSimplePsf, the problem goes away, most likely because different sources are used in the psf modeling.

            Show
            nlust Nate Lust added a comment - Update #2: The problem is triggered when the initial exposure does not have a psf, one is generated for it with InstallSimplePsf. This is then used to make measurements and actually measure a psf from the image. This is the psf that is failing. The failing psf is fed back into detectMeasureAndEstimatePsf to refine the psf estimation. The incorrectly measured psf from the first iteration is a bad model for reasons that must still be determined. The next step will be to look at all the sources that go into psfex and see if any problems exist. As a note if the FWHM size is increased in InstallSimplePsf, the problem goes away, most likely because different sources are used in the psf modeling.
            Hide
            nlust Nate Lust added a comment -

            Update on this: I extracted images of the stars that are going into the psf modeler, and there clearly is something very wrong with each of these images. These defects do not seem to be present when an initial wider psf is used. The next step is to investigate what is causing these issues, and what can be done to make the pipeline more robust against future failures.

            Show
            nlust Nate Lust added a comment - Update on this: I extracted images of the stars that are going into the psf modeler, and there clearly is something very wrong with each of these images. These defects do not seem to be present when an initial wider psf is used. The next step is to investigate what is causing these issues, and what can be done to make the pipeline more robust against future failures.
            Hide
            nlust Nate Lust added a comment -

            This ticket successfully found the issue in the code, and a new ticket: DM-6562 was created to fix the specific issue in the relevant package.

            Show
            nlust Nate Lust added a comment - This ticket successfully found the issue in the code, and a new ticket: DM-6562 was created to fix the specific issue in the relevant package.

              People

              • Assignee:
                nlust Nate Lust
                Reporter:
                nlust Nate Lust
                Watchers:
                Nate Lust
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel