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

PSFex will reduce fitting order to an illegal extent

    XMLWordPrintable

Details

    • 1
    • DRP S23B, Ops Pipelines 2023
    • Data Release Production
    • No

    Description

      PSFex will reduce the fitting order when there aren't many stars, emitting messages like

      > WARNING: 1st context group-degree lowered (not enough samples)
      > WARNING: 1st context group removed (not enough samples)
      

      and appears to succeed, but as soon as you call anything on the attached PSF it raises with

      *** lsst.pex.exceptions.wrappers.InvalidParameterError: 
        File "src/PsfexPsf.cc", line 233, in virtual std::shared_ptr<lsst::afw::image::Image<double> > lsst::meas::extensions::psfex::PsfexPsf::_doComputeImage(const Point2D&, const lsst::afw::image::Color&, const Point2D&) const
          Only spatial variation (ndim == 2) is supported; saw 0 {0}
      lsst::pex::exceptions::InvalidParameterError: 'Only spatial variation (ndim == 2) is supported; saw 0'
      

      This appears to be pointless, and the fitting code should just fail/raise at the point it reduces the order outside of valid values, given that the downstream object is useless.
      Either that, or if that object would be usable with ndim==0, remove that internal check so that the fitted PSFs are functional.

      Attachments

        Issue Links

          Activity

            Ignore sprints and labels. We are just experimenting with sprint boards.

            yusra Yusra AlSayyad added a comment - Ignore sprints and labels. We are just experimenting with sprint boards.
            Parejkoj John Parejko added a comment -

            I'm now getting this same failure in the new CalibrateImageTask, because my test has only a handful of stars. I know this worked a week or two ago, and I don't know if it's changes I made during debugging/development, or changes in the stack in the past two weeks.

            Parejkoj John Parejko added a comment - I'm now getting this same failure in the new CalibrateImageTask, because my test has only a handful of stars. I know this worked a week or two ago, and I don't know if it's changes I made during debugging/development, or changes in the stack in the past two weeks.
            erykoff Eli Rykoff added a comment -

            I did the simple thing that was discussed on this ticket and in the sprint meeting "just fail early rather than passing on an unusable psf to fail later". It's the responsibility of the caller to catch any error or not.

            erykoff Eli Rykoff added a comment - I did the simple thing that was discussed on this ticket and in the sprint meeting "just fail early rather than passing on an unusable psf to fail later". It's the responsibility of the caller to catch any error or not.

            People

              erykoff Eli Rykoff
              mfisherlevine Merlin Fisher-Levine
              Jim Bosch
              Eli Rykoff, Jim Bosch, John Parejko, Merlin Fisher-Levine, Yusra AlSayyad
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Jenkins

                  No builds found.