fit_map: unknown/misspelled keys in params are silently ignored (e.g. m_disk vs mdisk)
まだ誰も着手していません。
評価
調査の方向性
Start in eddy/rotationmap.py at verify_params_dictionary (around line 1231), where the loop over default_parameters pops known keys and leaves everything else in params untouched. Reproduce with a misspelled key such as m_disk in a fit_map call and confirm that no warning is raised. Done when unknown keys produce a warning or error, internal flags like vfunc and vortex still pass, and a close-match hint such as mdisk appears where practical. Settle warn-versus-raise with the maintainer first.
索引モデルが issue の本文から書いたものです。
説明
Summary
verify_params_dictionary fills in defaults for the keys listed in default_parameters.yml and silently keeps any other key in params. A misspelled parameter name is therefore ignored rather than flagged. If that key is also mapped to a p0 index, the sampler walks a dimension the likelihood never sees.
Example
Writing m_disk where eddy expects mdisk:
params['r_in'] = 4
params['r_out'] = 4.0
params['m_disk'] = 5 # typo: should be 'mdisk'
params['gamma'] = 6
p0 += [1.0, 0.0, 1.0]
samples = cube.fit_map(p0=p0, params=params, ...)
mdiskgets its default (None), so_calc_mdiskreturns 0 and the model is purely Keplerian.m_disktakes slot 5 ofp0but never reaches the model, so it random-walks inside the walker spread.r_inandgammaare also unconstrained, because they are only used in_calc_mdisk.- The only output is the
Assuming: p0 = [x0, y0, mstar, vlsr, r_in, m_disk, gamma]echo, which reads as if the fit is correct. The optimizer returns these three parameters unchanged from their starting values.
Nothing errors, and the fitted map looks plausible.
Where
eddy/rotationmap.py, verify_params_dictionary (~L1231):
for p in self.default_parameters.keys():
params[p] = params.pop(p, self.default_parameters[p]['default'])
Suggested fix
After populating the defaults, warn (or raise) on any key that is not in default_parameters and is not an internal flag (vfunc, vortex, beam, ...). Raising is probably right whenever an unknown key is mapped to a p0 index, since that dimension can never be constrained. A difflib close-match suggestion ("did you mean mdisk?") would make the message more useful.
- 主要言語
- Python
- スター
- 23
- フォーク
- 11
- 平均マージ
- 28分
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
PlanetFormationLab/eddy のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
PlanetFormationLab/eddy#36 ·
-
難易度 3/5 半日 初心者へのやさしさ 62/100
PlanetFormationLab/eddy#43 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 78/100
PlanetFormationLab/eddy#39 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
PlanetFormationLab/eddy#35 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
PlanetFormationLab/eddy#34 ·
PlanetFormationLab/eddy の issue をすべて見る
似ている issue
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ianktoo/project-monitor#14 ·
-
security
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
btclib-org/btclib-wallet#478 ·
メンテナーはふだん 1 日以内に返信
-
security
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
btclib-org/btclib#2727 ·
メンテナーはふだん 1 日以内に返信
-
good first issue lead variant:container
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
radialmonster/orf-cleanroom#10 ·
メンテナーはふだん 1 日以内に返信
-
gdsa opencode: keep-alive cleanup trap fails with 'keepalive_pid: unbound variable'対応中かも @darribas が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100