verify_params_dictionary: vp_100/mstar check is inverted
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- Medio día
- Aptitud para principiantes
- 62/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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).
- Lenguaje dominante
- Python
- Estrellas
- 23
- Forks
- 11
- Merge medio
- 28 min
- PR fusionados (30 d)
- 1
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de PlanetFormationLab/eddy
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
PlanetFormationLab/eddy#36 ·
-
Dificultad 3/5 Medio día Aptitud para principiantes 62/100
PlanetFormationLab/eddy#42 ·
-
StructureFunction2DStack.fit_spiral / calculate_modal_power has no per-annulus fault toleranceAbierto
Dificultad 3/5 1-2 días Aptitud para principiantes 78/100
PlanetFormationLab/eddy#39 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
PlanetFormationLab/eddy#35 ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
PlanetFormationLab/eddy#34 ·
Todos los issues de PlanetFormationLab/eddy
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
Status: Triaged Type: Enhancement
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
canonical/craft-store#448 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
good first issue research size:s skill:numerics sub-issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
SKaiNET-developers/SKaiNET#1372 ·
Los mantenedores suelen responder en 1 día
-
debt
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
microsoft/vscode-flake8#601 ·
Los mantenedores suelen responder en 1 día