Refine mosaic weight strategies
The fix implemented at https://github.com/gbrammer/grizli/pull/165 appears to improve the profile shapes of stars in drizzled image mosaics, though it does not necessarily produce statistically robust inverse variance wht images. Explore strategies for making optimal science and weight images for
- Source detection
- Photometry
- Morphological analysis with, e.g.,
galfit.
Added time weighting in PR https://github.com/gbrammer/grizli/pull/167.
Added jwst weighting in https://github.com/gbrammer/grizli/commit/af8d36a04d802afbaa9eb68f566586762d09bdc6, which weights by VAR_RNOISE + median(VAR_POISSON) if those extensions are available and falls back to the median_err strategy otherwise (e.g., for HST).
Fix bug in jwst weighting in https://github.com/gbrammer/grizli/commit/84ab356cb0f3e6cb7a54ba06356fd23ab38e185a.
More robust "tweak" alignment parameters updated in https://github.com/gbrammer/grizli/commit/a1d8bf96471d88b9dc05f1136d924d3200b6e231, with limits on source FLUX_RADIUS and matching tolerances.
The iterate_tweak_align function can also iterate the alignment corrections by aligning each exposure to a catalog made from the combination of the exposures in a visit, which should be deeper and more precise than the astrometry of individual exposures.
To use the updated weighting scheme when creating mosaics, run
grizli.aws.visit_processor.cutout_mosaic(...,
weight_type='jwst',
make_exptime_map=True,
)
The latter will make an exposure-time map that can be used to regenerate the Poisson component of the image variance map.