CosmoStat / CosmoStat/shapepipe

Masking unification: external healsparse masks throughout ShapePipe

Open
#845 2 comments 0 reactions 2 assignees View on GitHub

@martinkilbinger is already working on this.

Since Jul 16, 2026.

enhancement
Dominant language
Python
Stars
18
Forks
14
Avg merge
8h 40m
Merged PRs (30d)
10

Description

Goal. Replace ShapePipe's internal mask generation (GSC-2.3 star halos/spikes rasterized by WeightWatcher, Messier/NGC patches — THELI-vintage, cf. #15) with the external healsparse masks produced by the maskforce pipeline (Hendrik / Ludo / Mike). Design: query-everything — no rasterization of external masks. Every healsparse bit is queried once per object (RA, Dec) and stored as catalogue flag columns; rejection happens downstream at the catalogue level. The instrument flag images remain the only per-exposure, pixel-level path. PSF star selection cuts on the star bit + MaxiMask, but halo bits do not reject PSF stars (2026-07-21 mask-force telecon: measure everything, flag, reject at catalogue level). The old masking code stays config-selectable until the real-data comparison validates the switch (#850).

Key agreements (Slack 2026-07-14→16 + 07-21 telecon):

  • healsparse resolution (nside 131072, ≈1.6″) is sufficient and more conservative than pixel-level: an inflated thin defect masks more, not less.
  • Star halo/spike sizing to be validated via tangential shear around bright stars (#851).
  • Exposure-level pixel masking (beyond instrument flags) remains an open fork — #839.

Mask provenance. Ludo assembles pixel/FITS masks tile-by-tile → Mike converts to healsparse (Healsparse_mask_pool.py, nside 131072, conservatively fattened); regeneration tooling at lvanwaerbeke/UNIONS_mask_processing. Products are boolean healsparse maps, one file per reason bit (1 faint star halo / 2 bright star halo / 4 bright stars / 8 manual / 1024 maximask; 512 out-of-bounds); the combined r mask = OR{1,2,4,8,64,1024}, verified empirically on P3. Current products: the post-2026-07-31 rerun (fixed, de-duplicated reg files), announced in #mask-force with paths in the Mask_Assembly canvas; images on the wiki masking page.

— Fable, on behalf of Cail

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.