DP2 coadd sigma and PSF extraction

Hi Rubin team & the community,

I have two questions on extracting the sigma & PSF images for a DP2 cutout:

  1. Sigma / correlated noise: for a band (say ‘g’) I am taking a 324 × 324 pixel region from .variance.array, setting any negative variance values to zero, and taking the square root to obtain the per-pixel 1σ uncertainty. Is using sqrt(variance) directly appropriate for DP2 coadds, or is there a recommended way to account for the correlated noise? Since resampling/coaddition may introduce correlations between neighboring pixels, the variance plane contains only the diagonal variance.

  2. PSF: Since PSF is constant within 150 × 150-pixel cells, so for my 324x324 sized cutout, it could span multiple cells. Is it reasonable to use a single PSF for such a cutout, and if not, what is the recommended approach?

My code block is attached below:

Thanks!
Debasish

        imgs[band] = butler.get("deep_coadd", dataId={"tract":tract, "patch":patch, "band":band})

        # sigma img ---------------
        variance_cut = imgs[band].variance.array[y0:y0+CUTOUT_SIZE, x0:x0+CUTOUT_SIZE]
        sigma = np.sqrt(np.clip(variance_cut, 0, None))

        # mask img ----------------
        mask_full = imgs[band].mask.array
        mask_cut = mask_full[y0:y0+CUTOUT_SIZE, x0:x0+CUTOUT_SIZE]

        # psf img -----------------
        psf = imgs[band].psf
        band_wcs = imgs[band].sky_projection

        psf_xy = band_wcs.sky_to_pixel(sky)
        psf_x, psf_y = psf_xy.x, psf_xy.y

        try:
            psf_bbox = psf.compute_stellar_bbox(x=psf_x, y=psf_y)
        except Exception as psf_err:
            print(f"\nWARNING: no PSF model at this position for band={band} ({psf_err})")
            continue

        if not psf_bbox:
            print(f"\nWARNING: no PSF model at this position for band={band}")
            continue

        psf_image = psf.compute_kernel_image(x=psf_x, y=psf_y)

        psf_array = np.asarray(psf_image.array)