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

PsfMatched slivers of calexps are worthless

    Details

      Description

      When a calexp overlaps a patch by < 1%, the PSF-matching is bad.

      This is especially problematic now that we're requiring the PSF-matched pixels to agree with a template PSF-matched coadd before the the DIRECT warp's pixels (which are probably fine) in a coadd.

      Make it less bad or require that a calexp overlap by a minimum number of pixels before plopping it down.

        Attachments

          Issue Links

            Activity

            Hide
            yusra Yusra AlSayyad added a comment -

            Merged.

            I visually inspected ~20 of the visits in 9813 (full focal plane) and didn't see anything weird. There were a couple psfMatched warps with < 10,000 pixels that looked a little noisy w/ zscale but changing the stretch showed they were OK. e.g. psfMatchedWarp-HSC-R-9813-1,7-23692.fits

            Show
            yusra Yusra AlSayyad added a comment - Merged. I visually inspected ~20 of the visits in 9813 (full focal plane) and didn't see anything weird. There were a couple psfMatched warps with < 10,000 pixels that looked a little noisy w/ zscale but changing the stretch showed they were OK. e.g. psfMatchedWarp-HSC-R-9813-1,7-23692.fits
            Hide
            sullivan Ian Sullivan added a comment -

            The changes look straightforward, and it looks like they fix the problem in the example images.

            Show
            sullivan Ian Sullivan added a comment - The changes look straightforward, and it looks like they fix the problem in the example images.
            Hide
            yusra Yusra AlSayyad added a comment -

            Looking for a reviewer.

            Jenkins running here: https://ci.lsst.codes/job/stack-os-matrix/27221/
            tract 9813 of HSC RC dataset going here: /datasets/hsc/repo/rerun/private/yusra/psfMatching/DM-12664

            Show
            yusra Yusra AlSayyad added a comment - Looking for a reviewer. Jenkins running here: https://ci.lsst.codes/job/stack-os-matrix/27221/ tract 9813 of HSC RC dataset going here: /datasets/hsc/repo/rerun/private/yusra/psfMatching/ DM-12664
            Hide
            yusra Yusra AlSayyad added a comment -

            Opted for simple solution: extending the bbox by a cell size width. This fixes a few things:

            1) Matching kernels are spatially varying, and now the spatial model has data points beyond the image to fit. This means that the edges of the image are being fit properly rather than extrapolated.
            2) Cell Sets cannot be partial. In 1D for example, this means if cellSize = 128pix, and the image is 255pix, there's one data point at 64pix. With this tickets update, there will be a data point at -64, 64 and 192.
            3) Narrow slivers of calexp can now have sufficient data to fit an accurate matching kernel.

            Note: that this bbox extension is IN ADDITION to WarpAndPsfMatchTask (pipe_tasks) bbox extension of the warped image. While that could be also improved, it needs to stay because otherwise you get border of NaNs after psfMatching.

            Show
            yusra Yusra AlSayyad added a comment - Opted for simple solution: extending the bbox by a cell size width. This fixes a few things: 1) Matching kernels are spatially varying, and now the spatial model has data points beyond the image to fit. This means that the edges of the image are being fit properly rather than extrapolated. 2) Cell Sets cannot be partial. In 1D for example, this means if cellSize = 128pix, and the image is 255pix, there's one data point at 64pix. With this tickets update, there will be a data point at -64, 64 and 192. 3) Narrow slivers of calexp can now have sufficient data to fit an accurate matching kernel. Note: that this bbox extension is IN ADDITION to WarpAndPsfMatchTask (pipe_tasks) bbox extension of the warped image. While that could be also improved, it needs to stay because otherwise you get border of NaNs after psfMatching.
            Hide
            yusra Yusra AlSayyad added a comment - - edited

            BEFORE and AFTER (Need to click on them to see the edges):

            Show
            yusra Yusra AlSayyad added a comment - - edited BEFORE and AFTER (Need to click on them to see the edges):

              People

              • Assignee:
                yusra Yusra AlSayyad
                Reporter:
                yusra Yusra AlSayyad
                Watchers:
                Ian Sullivan, Yusra AlSayyad
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel