Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 35 additions & 38 deletions astra.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1329,15 +1329,11 @@ analyses:
weights through, so a zero-weight pixel's content spreads into the
weighted pixels within about a PSF width. DES's ngmixer fills for
that reason: "it may be important for codes that take moments or use
FFTs". In the committed default (`BLEND_HANDLING = noisefill`),
masked pixels are replaced with independent noise at the per-pixel
background RMS when supplied, or the stamp's robust noise scale
otherwise. With `BLEND_HANDLING = uberseg`, the image is left
untouched and weights are zeroed on defects and neighbour-side
pixels. [LINT] the prepare_ngmix_weights docstring says noisefill
keeps the weight of filled pixels (the code zeroes it), and the
ngmix_runner comment says noisefill fills neighbour pixels (it fills
flagged pixels and leaves neighbours untouched). The committed fill
FFTs". Under every BLEND_HANDLING, defect pixels are replaced with
independent noise at the per-pixel background RMS when supplied, or
the stamp's robust noise scale otherwise; `BLEND_HANDLING = uberseg`
additionally zeroes the weight of neighbour-side pixels and leaves
their image values untouched. The committed fill
uses the unsymmetrized defect set: DES symmetrized its masks, but
four-fold symmetrization quadruples m and still leaves an additive c1
(symmetrized_4fold_noise). The cost of not symmetrizing, a hole in
Expand Down Expand Up @@ -1377,11 +1373,11 @@ analyses:
with symmetrization against 0.7e-4 without it.
insights: [mask_bad_column_symmetrize, mask_des_defect_practice, mask_fixed_orientation]
raw:
label: "No fill: raw defect values (BLEND_HANDLING = uberseg)"
label: "No fill: raw defect values"
description: >-
With BLEND_HANDLING = uberseg, defect pixels keep weight 0 but
their image values stay untouched in the image that metacal
deconvolves, shears and reconvolves.
Defect pixels keep weight 0 but their image values stay
untouched in the image that metacal deconvolves, shears and
reconvolves.
excluded: true
excluded_reason: >-
Metacal acts on every pixel regardless of weight, so raw defects
Expand All @@ -1391,9 +1387,10 @@ analyses:
blend_handling:
label: Neighbour treatment before metacal
rationale: >-
Covers only pixels shared with a neighbour; defect_fill is coupled to
it through BLEND_HANDLING. noisefill (the default; the committed
config sets no key) leaves neighbours fully weighted and untouched.
Covers only pixels shared with a neighbour; defect_fill does not
depend on it: defects are noise-filled under every BLEND_HANDLING.
none (the default; the committed config
sets no key) leaves neighbours fully weighted and untouched.
uberseg zeroes the weight of pixels nearer a neighbour's coadd
segmentation footprint than the target's (DILATE_NEIGHBOUR, default 1)
and leaves the image untouched, as official uberseg does:
Expand All @@ -1418,7 +1415,7 @@ analyses:
default: none
options:
none:
label: No neighbour treatment (BLEND_HANDLING = noisefill)
label: No neighbour treatment (BLEND_HANDLING = none)
description: >-
Neighbour pixels keep their full weight and image values, so the
fit sees all neighbour light, which biases shapes toward
Expand Down Expand Up @@ -1454,10 +1451,10 @@ analyses:
central_defect_veto:
label: Per-epoch veto on a defect near the stamp centre
rationale: >-
Not on develop; implemented on feat/defect-fill-veto (7777181b).
There an epoch is dropped when a defect pixel lies strictly closer
to the stamp centre than its fill's radius, beside the
masked-fraction cut in the epoch loop. The veto reads only the
An epoch is dropped when a defect pixel lies strictly closer to the
stamp centre than its fill's radius, beside the masked-fraction cut
in the epoch loop; EPOCH_CENTRAL_DEFECT_RADIUS = 0 disables it. The
veto reads only the
defect mask, so it selects on nothing shear-responsive; for the same
reason the radii are fixed rather than scaled by galaxy size: 10 px
for noise-filled pixels (EPOCH_CENTRAL_DEFECT_RADIUS) and 7 px for
Expand All @@ -1469,16 +1466,17 @@ analyses:
wide defects through the elliptical PSF sit at the 1% bound (m11 =
-0.98%; -0.24% at 11 px), and noise fill needs 14 px for 0.7 and 0.9
arcsec galaxies. Measured on feat/defect-fill-veto and
feat/defect-interpolation.
default: disabled
feat/defect-interpolation. The 7 px interpolated radius arrives with
defect_fill's interpolate option (feat/defect-interpolation); until
then every defect is noise-filled and the 10 px radius applies.
Values:
EPOCH_CENTRAL_DEFECT_RADIUS = 10.
default: fixed_radii
options:
disabled:
label: No central veto (committed code)
label: No central veto (EPOCH_CENTRAL_DEFECT_RADIUS = 0)
fixed_radii:
label: Fixed radii, 10 px for noise-filled and 7 px for interpolated defects
description: >-
Implemented on feat/defect-fill-veto and feat/defect-interpolation,
not on develop.
size_scaled_radius:
label: Veto radius scaled by galaxy size
excluded: true
Expand All @@ -1488,14 +1486,13 @@ analyses:
epoch_masked_fraction_cut:
label: Per-epoch masked-fraction cut
rationale: >-
[HARDCODED] on develop, an epoch whose stamp has more than 1/3 of its
pixels flagged (any nonzero flag bit, including the tile-coverage bit
2**10 set where the tile vignet is off-image) is dropped from the
multi-epoch fit; an object with no surviving epoch has no shape.
Zero-weight and invalid-RMS pixels are not counted. On
feat/defect-fill-veto the cut counts the raw, unsymmetrized defect
set (flagged, zero-weight and invalid-RMS pixels) against
EPOCH_MASKED_FRACTION_CUT, default 1/3. Before the cut, an epoch is
An epoch whose stamp has more than EPOCH_MASKED_FRACTION_CUT
(default 1/3) of its pixels in the raw, unsymmetrized defect set is
dropped from the multi-epoch fit: flagged pixels (any nonzero flag
bit, including the tile-coverage bit 2**10 set where the tile vignet
is off-image), zero-weight pixels and invalid-RMS pixels, the set
defect_fill noise-fills. An object with no surviving epoch has no
shape. Before the cut, an epoch is
dropped silently if its galaxy stamp is all zeros or its
background-subtracted sigma_mad is not positive. DES was stricter:
Y1 rejected any epoch with a masked or zero-weight pixel, or with
Expand All @@ -1511,12 +1508,12 @@ analyses:
label: 1/3 of the stamp in the defect set
description: >-
Drop an epoch only if more than 1/3 of the stamp pixels are
defects (on develop, flagged pixels).
defects.
ten_percent:
label: 10% (DES Y3 / Y6)
description: >-
Not a default; EPOCH_MASKED_FRACTION_CUT = 0.1 on
feat/defect-fill-veto. Matches DES Y3 max_zero_weight_frac and
Not a default; EPOCH_MASKED_FRACTION_CUT = 0.1. Matches DES Y3
max_zero_weight_frac and
Y6 max_masked_fraction.
insights: [mask_multi_epoch_drop]
any_masked:
Expand Down
4 changes: 2 additions & 2 deletions src/shapepipe/modules/ngmix_package/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
PIXEL_SCALE : float, optional
Pixel scale in arcsec. Optional override; when omitted (or non-positive)
it is read from the image WCS so it cannot drift from the pixels. Only
sets the centroid-prior width and noise window -- the fit Jacobian is
built per object from the full WCS.
sets the centroid-prior width -- the fit Jacobian is built per object
from the full WCS.
SAVE_BATCH : int, optional
Save the output catalogue in batches of this size; default is ``-1``
(no batch saving)
Expand Down
Loading
Loading