verify_params_dictionary: vp_100/mstar check is inverted
还没有人认领这个 Issue。
评估
调研方向
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_100andmstarset: the power law is used silently. The error the message describes is never raised. vp_100set andmstar=None(a pure power-law request): this raises "Cannot specify bothvp_100andmstar", even though only one was specified.vp_100set,mstarleft out:mstardefaults to1.0indefault_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 explicitmstarfrom 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 分钟
- 30 天内合并 PR
- 1
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
PlanetFormationLab/eddy 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
PlanetFormationLab/eddy#36 ·
-
难度 3/5 半天 新手友好度 62/100
PlanetFormationLab/eddy#42 ·
-
难度 3/5 1-2 天 新手友好度 78/100
PlanetFormationLab/eddy#39 ·
-
难度 4/5 3-5 天 新手友好度 48/100
PlanetFormationLab/eddy#35 ·
-
难度 5/5 一周以上 新手友好度 35/100
PlanetFormationLab/eddy#34 ·
查看 PlanetFormationLab/eddy 的全部 Issue
相似的 Issue
-
bug Size: XS
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
oposs/repo-infra#93 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 69/100
Graphify-Labs/graphify#4546 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 65/100
521xueweihan/HelloGitHub#4025 ·