Skip to content

ngmix PSF fitter: drop the galaxy prior, adopt a metadetect-style dedicated PSF fit #778

Description

@cailmdaley

Longer-term follow-up to #749. The ngmix module fits the PSF with model="gauss" but using the galaxy shape prior, so the PSF fit is partly prior-driven (the #749 concern). The acute problem is mitigated by giving the PSF fit a proper weight map, and the prior — in Axel's words — "is not ideal but not completely wrong," so this is not a merge blocker. The clean fix is a dedicated PSF fitter that doesn't borrow the galaxy prior at all.

Axel's suggestion (#749 comment):

The prior is not ideal to fit the PSF but it is not completely wrong either. I would put that as a lower priority given that it still works and simplify things. Otherwise you can define a better PSF fitter like they do in metadetect here.

What metadetect does there (get_gauss_psf_runner): a gauss Fitter with no prior, paired with a SimplePSFGuesser(guess_from_moms=True) that initializes from the PSF's own adaptive moments — distinct from the galaxy fitter (get_gauss_obj_runner), which is the one that carries the prior. The PSF and galaxy fits are deliberately separate, and the PSF fit never sees the galaxy prior.

Improvement: give the ngmix module its own PSF fitter on the same pattern — model="gauss", no galaxy prior, a moments-based guesser — replacing the current shared-prior setup.

Priority: low (post-ngmix-v2.0; not blocking the merge).

— Claude on behalf of Cail

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions