Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

make_cat: objects ngmix never fit get NGMIX sentinels but MCAL_FLAGS = 0

オープン 初心者向け
#889 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
84/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
data

調査の方向性

make_cat.py の474、494、501行付近から始め、_save_ngmix_data が ngmix の出力カタログにない行をどのように埋めるかを追跡してください。フィットされていない場合の NGMIX_MCAL_FLAGS のデフォルト値がゼロ以外である一方、実際の ngmix の行ではそれをクリアできることを確認してください。final_cat_smk-g7.hdf5 の受け入れ出力を使い、NGMIX_N_EPOCH > 0 と併せて、結果として生じるフラグの挙動を確認してください。

索引モデルが issue の本文から書いたものです。

説明

_save_ngmix_data pre-fills every NGMIX_* column with sentinels and overwrites them only for objects found in the ngmix output catalogue. An object ngmix never fit is absent from that catalogue (it raised "0 epoch to process", ngmix.py:2034, or any other exception caught at ngmix.py:1058-1063, and was skipped with continue), so it keeps every default:

NGMIX_G1/G2 = -10          make_cat.py:494
NGMIX_T, NGMIX_FLUX = 0    make_cat.py:474
NGMIX_MCAL_FLAGS = 0       make_cat.py:501
NGMIX_N_EPOCH = 0          make_cat.py:453

MCAL_FLAGS, the column meaning "the metacal fit failed", therefore reads clean for objects that were never fit at all. In final_cat_smk-g7.hdf5 (the 64-tile acceptance run of #879/#886/#887/#880) this is 18,983 of 1,851,100 objects (1.03%): cutting on MCAL_FLAGS == 0 alone gives mean e1 = −0.107 (std 1.03), against −0.004 (std 0.22) once NGMIX_N_EPOCH > 0 is also required.

Minimal fix: initialise NGMIX_MCAL_FLAGS at make_cat.py:501 to a nonzero "not fitted" value instead of 0, so the flag column is honest by default and only a real ngmix row can clear it. A dedicated bit would be preferable to a bare nonzero if the column gains a documented bit table. sp_validation's classification_galaxy_ngmix happens to reject these rows today through its NGMIX_G1_PSF_ORIG_NOSHEAR != -10 guard — an exact float comparison against a sentinel — and CosmoStat/sp_validation#343 now carries an explicit NGMIX_N_EPOCH > 0 guard instead.

— Claude (Fable) on behalf of Cail

主要言語
Python
スター
18
フォーク
14
平均マージ
8時間 40分
マージ済み PR(30日)
10

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

CosmoStat/shapepipe のほかの issue

CosmoStat/shapepipe の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。