verify_params_dictionary: vp_100/mstar check is inverted
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- Nửa ngày
- Mức phù hợp với người mới
- 62/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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).
- Ngôn ngữ chính
- Python
- Star
- 23
- Fork
- 11
- Merge trung bình
- 28 phút
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của PlanetFormationLab/eddy
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
PlanetFormationLab/eddy#36 ·
-
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 62/100
PlanetFormationLab/eddy#42 ·
-
StructureFunction2DStack.fit_spiral / calculate_modal_power has no per-annulus fault toleranceĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 78/100
PlanetFormationLab/eddy#39 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
PlanetFormationLab/eddy#35 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
PlanetFormationLab/eddy#34 ·
Tất cả issue của PlanetFormationLab/eddy
Issue tương tự
-
debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
microsoft/vscode-flake8#601 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
nonews refactor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Uninett/nav#4255 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Claiming namespace `codearcade`Đang mởnamespace operations
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 70/100
EclipseFdn/open-vsx.org#14421 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
ubuntu/ubuntu-project-docs#850 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 1 ngày