Repository navigation
v2 selection: upper size bound 9, FLAGS cut ignores bit 16 - #448
Merged
Merged
Conversation
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.
ShapePipe v2's upper size cut, T_gal/T_PSF < 3, drops the large galaxies v1 kept. In moment-ratio units it equals a radius-ratio cut of ~1.7. Those large galaxies carry high response at similar PSF coupling, so dropping them raises v2's leakage coefficient β and costs number density. This PR widens the bound to 9 and relaxes the SExtractor FLAGS cut to ignore bit 16 (incomplete aperture data). Bit 16 flags large galaxies preferentially, and with the bound at 9, selecting on it biases m in image sims.
Relation to v1. v1.4's ngmix
Tcolumns are Gaussian half-light radii in arcsec: the old ngmix fork labels its radius parameterT. v1's PSF FWHM, 2·T_PSF, has a median of 0.705″, against 0.700″ from HSM on the stars. v2'sTis the second moment 2σ². So v1'sgal_rel_size_max: 3(commented "hlr / hlr_psf", which is correct for v1) was a radius ratio, and bound 9 in moment ratio is v1's own window (3² = 9). FLAGS is SExtractor's extraction flag in both versions, and bit 16 means the object's aperture data are incomplete or corrupted. No v1 selection ignored it: v1.X.6 (Paper II's v1.4.6.3) requiredFLAGS == 0, v1.X.10<= 2and v1.X.11<= 3, and each of those drops bit 16. So ignoring bit 16 is new here. It is needed because bit 16 is set preferentially on the large galaxies the wider bound admits.Selection (
config/calibration/mask_v2.0.yaml):gal_rel_size_max: 3 → 9FLAGS <= 2→(FLAGS & ~16) <= 2, i.e. keep FLAGS ∈ {0, 1, 2, 16, 17, 18}Evidence (10k-tile snapshot, #425 calibration; image sims on the four #425 grids):
The FLAGS predicate is load-bearing. Bound 9 with plain
FLAGS <= 2fails the image-sim gate (Δm1 = −4.8 × 10⁻³). Dropping FLAGS entirely passes on the grids, but it would admit 5.3M real FLAGS==3 blends that the sims don't represent.Image-sim m against the upper bound for the three FLAGS policies (DES weights on top, unit weights below; shared-tile jackknife). Only m1 under plain FLAGS ≤ 2 moves.
Shear-weighted ⟨z⟩ at bounds 3 and 9 for two photometry choices. The added large galaxies sit lower, at ⟨z⟩ ≈ 0.56.
Before v2 cosmology with this cut:
des_weight_productis configured (Consistent shear response, weights and additive bias (DES case d) #425), it stays the bound-3 table until regenerated.Grammar: a
datcut can now carryignore_bits: <int>, which clears those bits before comparing. It lives inmasks.apply_condition, and every reader ofdatcuts goes through it:Mask,scripts/masking.py, and the dashboard selection histogram, whose private copy of the comparison logic is gone.Mask.get_signhad ≤ and ≥ swapped in its LaTeX labels; that's fixed too.— Claude on behalf of Cail
🤖 Generated with Claude Code
https://claude.ai/code/session_01JK7o9F5Ad2qR25uH6YFZZg