Saturated pixels reach ngmix unflagged: survey flag bit 8 marks only the first pixel of each saturated run
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 50/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- python
调研方向
Start in split_exp, tracing how per-CCD flag files are produced and how SExtractor and the vignets consume them. Review default_exp.sex for the SATUR_LEVEL setting, then use the saturation evidence in /n17data/cdaley/scratch/saturation/ to check the proposed clipping, growth, and bleed-tail masks. Done means saturated pixels and their proposed extensions are flagged consistently without masking more good pixels than expected.
由索引模型根据 Issue 内容生成。
描述
Saturated pixels reach ngmix unflagged and at full weight. In the CFIS survey flag map, bit 8 marks only the first (lowest-column) pixel of each horizontal run of saturated pixels. A 1-px bleed trail therefore looks fully flagged, while wider trail sections and star cores are mostly unflagged. Nothing downstream catches the rest:
- The v2 pipeline has no mask rule, and
prepare_ngmix_weightsnever tests image values. - SExtractor's saturation flag is inert, because
SATURATE = 65535in the headers while the int16 images clip at 32760.

Exposure 2086786p, CCD 23. Blue: survey flag bit 8. Red: clipped, unflagged, weight > 0. Right: the trail widens to two columns, and only the left one is flagged. Each red pixel there is about 2,400σ.
Scale (4 exposures × 40 CCDs): 80–88% of clipped pixels are unflagged, 66k–99k per exposure. In horizontal runs of clipped pixels at least 2 px wide, 76% have only the first pixel flagged. The pattern is the same on both amplifiers.
Impact on shapes, so far small:
- Among galaxy-like epoch stamps on tile 202.301, after the neighbour mask, 0.05% contain such a pixel, and 0.02% within 8 px of the centre. Most of those are coadd detections lying on a trail.
- PSF stars (MAG_AUTO > 18) sit below the clipping onset at mag 17.0–17.4 (inferred, not checked star by star).
- Shear impact is not measured.
Proposed fix, in split_exp, ORed into each per-CCD flag file so that SExtractor and the vignets both see it:
- flag
image ≥ 0.9 × 32760, which catches all of them at 0.02% of good pixels; - grow the mask by 1 px (3×3) for the charge spilled into the next column, about +1.5 to 3σ on the side away from the readout amplifier;
- extend it ±20 rows along the column for the bleed tails, which are still +2σ at 20 px. Total cost about 0.06–0.07% of good pixels.
Dilating bit 8 instead catches at most 50%, at 0.9% of the area. Separately, set SATUR_LEVEL ≈ 29000 in default_exp.sex so that exposure FLAGS bit 4 works.
Open: why the upstream flag-map production marks only the first pixel of each run. Someone who knows the CFIS flag pipeline would know.
Evidence on candide: /n17data/cdaley/scratch/saturation/ (scripts, the 4 exposures, figures, including fig_stats.png).
— Claude Opus 5.5, on behalf of Cail
- 主要语言
- Python
- 星标
- 18
- 派生
- 14
- 平均合并
- 2 天 10 小时
- 30 天内合并 PR
- 37
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
CosmoStat/shapepipe 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 85/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 25/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 45/100
维护者通常 1 天内回复
-
Workflow: sp run refreshes the code snapshot before the lock; re-clean erases exposure tombstones; missing run-dir undetected可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 4/5 3-5 天 新手友好度 45/100
维护者通常 1 天内回复
查看 CosmoStat/shapepipe 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
SwiftKickMobile/skai#84 ·
-
难度 1/5 1 小时以内 新手友好度 82/100
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
jxxghp/MoviePilot#7070 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
flop-labs/technocore-chat#997 ·
维护者通常 1 天内回复
-
tunneld on Windows: Wi-Fi devices are not discovered because uvicorn runs on a ProactorEventLoop未关闭
难度 2/5 1-3 小时 新手友好度 76/100
doronz88/pymobiledevice3#2051 ·
维护者通常 1 天内回复