Repository navigation
One catalogue-masking path for PSF stars and galaxies (manual-mask bit 8 via sky maps) - #457
Merged
Merged
Conversation
A mask config's optional `maps` names a sky map per mask column (path or arc:/vos: URL, fetched once with vcp into ~/.cache/sp_validation/masks). get_masks_from_config reads a cut's column from the catalogue, or from the map at the objects' positions when the catalogue lacks it. catalogue_selection, the AND of those cuts, is what scripts/masking.py and the rho/tau star selection both evaluate. A cat_config psf block names its mask config (mask_config, relative to the catalogue config) and the cuts stars take (mask_cuts). ShapePipe's star catalogue has no MASK_* columns, so with mask_v2.0.yaml's MASK_8_Manual -> DR6 bit-8 map, stars inside the manual mask (M33's HII regions and clusters, shapepipe#993) are dropped under the same cut galaxies take from their column. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JK7o9GrF3X5AAqQo1X5UmX
cailmdaley
force-pushed
the
feat/psf-star-manual-mask
branch
from
October 31, 2026 00:32
e91f741 to
eb1b709
Compare
This was referenced Nov 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claude (Opus) on behalf of Cail.
PSF stars and galaxies are now masked by one code path. A mask config is evaluated by one function,
masks.catalogue_selection. The star selection behind ρ/τ and the galaxy masking both go through it. A cut whose column a catalogue lacks is read from a sky map the config names. So one predicate,MASK_8_Manual equal False, masks galaxies from their column and PSF stars from the DR6 bit-8 map. There is no ρ/τ-specific veto.Why stars need it: in run 1, M33's HII regions and clusters enter PSF star selection and dominate the first-bin ρ statistics. This drives the α/η sign flip in #452. ShapePipe's manual mask (bit 8) removes 1,024 of M33's 1,025 oversize detections within 1° and costs 0.5% of PSF stars survey-wide (CosmoStat/shapepipe#993). Galaxies already carry the bit as a column. The v2 star catalogue has no
MASK_*columns, so stars take the bit from the map.What changes
maps:in a mask config maps a column name to a boolean healsparse map, True = masked.get_masks_from_configreads a column from the catalogue when it's there and from the map otherwise (MapColumns).mask_v2.0.yamlmapsMASK_8_Manualto the DR6 bit-8 map. Galaxy catalogues have the column, so their selection is unchanged.catalogue_selection(config, cat, cuts=None)is the AND of the config's cuts.scripts/masking.py:apply_masksand the PSF star selection both call it.psfblock names its mask config:mask_config, star selection is unchanged, so v1 entries are unaffected.arc:/vos:URL is fetched once withvcpinto~/.cache/sp_validation/masks/<remote path>($SP_VALIDATION_MASK_CACHEoverrides) and read from there. The canonical bit-8 map isarc:home/mhudson/masks/mask_ugriz_nside131072_n8.hsp(55 MB, 28 Sep 2026).vcpneeds a CADC proxy certificate (~/.ssl/cadcproxy.pem); the image shipsvcp. A map path can also be a plain local file.Checks
catalogue_selection: every point within 0.2° of M33 is masked, against 0.5% in a 1.0–1.5° control ring. The 28 Sep map and the 6 Aug copy inold_masks/differ by 429 pixels (≈10⁻⁴ deg²).mask_v2.0.yaml's selection equals evaluating each cut directly; a remote map is fetched once into the cache.MASK_8_Manualwould now take the bit from the map instead of raising. v2 galaxy catalogues carry the column, and v1 configs name no maps.Refs #452
🤖 Generated with Claude Code
https://claude.ai/code/session_01JK7o9GrF3X5AAqQo1X5UmX