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

When making PSF-matched coadds, warp first then PSF-match

    Details

    • Templates:
    • Story Points:
      16
    • Sprint:
      DRP F16-6
    • Team:
      Data Release Production

      Description

      Currently we PSF-match then warp when making PSF-matched coadds. In the case where the output projection is simply a rotation, translation or scaling (circularly symmetric) this is OK if matching to a symmetric model. But for the general case of any affine transform, warping after PSF-matching will undo the PSF-matching. Also, currently we cannot make PSF-matched co-adds with calexps which were processed with PsfexPsf because ModelPsfMatchTask requires that the input PSF be a KernelPsf. => we can make PSF-matched co-adds for SDSS which uses PcaPSF by default but not HSC which uses Psfex by default. (PcaPsf inherits from KernelPsf, and PsfexPsf inherits from ImagePsf.)

      This ticket will make the appropriate changes to WarpPsf, ModelPsfMatchTask and WarpAndPsfMatchTask, to make PSF-matching warpedPSFs and PsfexPSFs possible and swap the order of operations. Some emergent considerations for warping first:
      1) Warping first shrinks area on which to model the PSF. Need to pad by the spatial cell size.
      2) Warped PSF is currently not guaranteed to be: square, the same size for each image, or the same size across one image. The PSF matcher requires that the model PSF and the science PSF be the same dimensions. Make minimal changes to WarpedPsf to produce square PSFs and PSFs of constant dimensions across the image. Push (modelPsf = self.config.modelPsf.apply() if self.config.doPsfMatch else None) down a level to adapt to the WarpedPSF size rather than be specified by the user. This requires that PSFs have cheap method revealing their dimensions.
      3) Spatial Variation. Currently, a WarpedPsf is an ImagePsf but is not a KernelPsf.

      This ticket will include testing. Not in the scope of this ticket is testing and improvement of the performance of the PSF modeling and matching.

        Issue Links

          Activity

          Hide
          yusra Yusra AlSayyad added a comment - - edited

          This ticket needs a review. It touches meas_algorithms, ip_diffim, pipe_tasks. It'd been tested on SDSS and HSC data.

          In Summary, this ticket:

          • Makes ModelPsfMatchTask less strict. To accommodate WarpedPsfs with dimensions that vary across an image, it now adjusts your reference model psf to have the right dimensions, and pads/clips the WarpedPsfs to have constant dimensions. Science Psfs no longer must be KernelPsfs, though the requirement remains for reference Model Psfs.
          • Added the supporting methods the Psfs derived from KernelPsf; SingleGaussianPsf and DoubleGaussianPsf.
          • Swaps the order of operations in WarpAndPsfMatchTask, optionally allowing the user to make coadd temp exps the old way.
          • Note: I backed off on requiring that WarpedPSFs be square in this ticket, and simply pad/clip them in the client code in ModelPsfMatchTask. Changing WarpedPsf has potential to affect CoaddPsf and I'd like to test more thoroughly.

          Emergent work TBD:

          • DM-8175 (next up)
          • Add resized method to other PSFs in the PSF class hierarchy DM-8490
          • Investigate effect of removing constraint that warping kernels << PSF kernel, by growing psf kernel dimensions (using above resized()).
          • Add PSF-matched coadds conceptually to DRP and concretely ci_hsc DM-8491 DM-8438
          Show
          yusra Yusra AlSayyad added a comment - - edited This ticket needs a review. It touches meas_algorithms , ip_diffim , pipe_tasks . It'd been tested on SDSS and HSC data. In Summary, this ticket: Makes ModelPsfMatchTask less strict. To accommodate WarpedPsfs with dimensions that vary across an image, it now adjusts your reference model psf to have the right dimensions, and pads/clips the WarpedPsfs to have constant dimensions. Science Psfs no longer must be KernelPsfs, though the requirement remains for reference Model Psfs. Added the supporting methods the Psfs derived from KernelPsf; SingleGaussianPsf and DoubleGaussianPsf. Swaps the order of operations in WarpAndPsfMatchTask, optionally allowing the user to make coadd temp exps the old way. Note: I backed off on requiring that WarpedPSFs be square in this ticket, and simply pad/clip them in the client code in ModelPsfMatchTask. Changing WarpedPsf has potential to affect CoaddPsf and I'd like to test more thoroughly. Emergent work TBD: DM-8175 (next up) Add resized method to other PSFs in the PSF class hierarchy DM-8490 Investigate effect of removing constraint that warping kernels << PSF kernel, by growing psf kernel dimensions (using above resized()). Add PSF-matched coadds conceptually to DRP and concretely ci_hsc DM-8491 DM-8438
          Show
          yusra Yusra AlSayyad added a comment - Notes: https://paper.dropbox.com/doc/PSF-Matching-Notes-for-DM-8088-0wIZ2HDi52ZfpPZfRpMk5

            People

            • Assignee:
              yusra Yusra AlSayyad
              Reporter:
              yusra Yusra AlSayyad
              Reviewers:
              Joshua Meyers
              Watchers:
              Jim Bosch, John Swinbank, Joshua Meyers, Paul Price, Yusra AlSayyad
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development

                  Agile