Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

verify_params_dictionary: vp_100/mstar check is inverted

Abierto
#43 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
Medio día
Aptitud para principiantes
62/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python
Área
data

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_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).

Lenguaje dominante
Python
Estrellas
23
Forks
11
Merge medio
28 min
PR fusionados (30 d)
1

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de PlanetFormationLab/eddy

Todos los issues de PlanetFormationLab/eddy

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.