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

verify_params_dictionary: vp_100/mstar check is inverted

オープン
#43 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

難易度
3/5
見積もり時間
半日
初心者へのやさしさ
62/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
data

調査の方向性

Start in verify_params_dictionary in eddy/rotationmap.py (around L1236), where the vp_100 and mstar branches are inverted, and check where default_parameters.yml fills in mstar=1.0 before that check runs. Done means that setting both keys raises the ValueError, a power-law request with vp_100 set and mstar None selects _vpow without error, and a default mstar no longer blocks the power-law path. Related issue #36 touches the same block.

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

説明

Summary

The vp_100 / mstar check in verify_params_dictionary has its branches inverted.

# eddy/rotationmap.py, verify_params_dictionary, ~L1236
if params['vp_100'] is not None:
    if params['mstar'] is not None:
        params['vfunc'] = self._vpow
    else:
        raise ValueError("Cannot specify both `vp_100` and `mstar`.")
else:
    params['vfunc'] = self._vkep
  • Both vp_100 and mstar set: the power law is used silently. The error the message describes is never raised.
  • vp_100 set and mstar=None (a pure power-law request): this raises "Cannot specify both vp_100 and mstar", even though only one was specified.
  • vp_100 set, mstar left out: mstar defaults to 1.0 in default_parameters.yml, so this goes through the first branch and works. That is the only reason the power-law path appears to work. It also means the check can never tell an explicit mstar from the default.

Suggested fix

Swap the branches, and record whether mstar was supplied by the user before defaults are filled in, so that a power-law fit isn't rejected because of the default mstar=1.0. For example, check 'mstar' in params before the default-population loop, and raise only if both keys were given explicitly.

Related: #36 (same block; it never selects the pressure-corrected vfunc).

主要言語
Python
スター
23
フォーク
11
平均マージ
28分
マージ済み PR(30日)
1

環境構築

はじめの一歩

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

PlanetFormationLab/eddy のほかの issue

PlanetFormationLab/eddy の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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