grizli icon indicating copy to clipboard operation
grizli copied to clipboard

Refine mosaic weight strategies

Open gbrammer opened this issue 2 years ago • 5 comments

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

  1. Source detection
  2. Photometry
  3. Morphological analysis with, e.g., galfit.

gbrammer avatar Jun 30 '23 14:06 gbrammer

Added time weighting in PR https://github.com/gbrammer/grizli/pull/167.

gbrammer avatar Jul 01 '23 09:07 gbrammer

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).

gbrammer avatar Jul 01 '23 09:07 gbrammer

Fix bug in jwst weighting in https://github.com/gbrammer/grizli/commit/84ab356cb0f3e6cb7a54ba06356fd23ab38e185a.

gbrammer avatar Jul 01 '23 13:07 gbrammer

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.

gbrammer avatar Jul 11 '23 12:07 gbrammer

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.

gbrammer avatar Jul 12 '23 11:07 gbrammer