verify_params_dictionary: vp_100/mstar check is inverted
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- Mezza giornata
- Idoneità per principianti
- 62/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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).
- Lingua principale
- Python
- Stelle
- 23
- Fork
- 11
- Merge medio
- 28m
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di PlanetFormationLab/eddy
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
PlanetFormationLab/eddy#36 ·
-
Difficoltà 3/5 Mezza giornata Idoneità per principianti 62/100
PlanetFormationLab/eddy#42 ·
-
StructureFunction2DStack.fit_spiral / calculate_modal_power has no per-annulus fault toleranceAperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 78/100
PlanetFormationLab/eddy#39 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
PlanetFormationLab/eddy#35 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
PlanetFormationLab/eddy#34 ·
Tutte le issue di PlanetFormationLab/eddy
Issue simili
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ianktoo/project-monitor#14 ·
-
A wrong descriptor checksum is refused with the right one, also for an xprv or WIF descriptorApertasecurity
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
btclib-org/btclib-wallet#478 ·
I maintainer di solito rispondono entro 1 giorno
-
security
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
btclib-org/btclib#2727 ·
I maintainer di solito rispondono entro 1 giorno
-
good first issue lead variant:container
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
radialmonster/orf-cleanroom#10 ·
I maintainer di solito rispondono entro 1 giorno
-
gdsa opencode: keep-alive cleanup trap fails with 'keepalive_pid: unbound variable'Forse già presa @darribas l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100