lambda_rdw_all raises a bare ValueError on an antiresonant fibre's default range
Los mantenedores suelen responder en 1 día
Ya se ha fusionado un pull request relacionado.
- #484 de @jtravs — fusionado
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 65/100
Línea de trabajo
Read tools.lambda_rdw_all and _zdw_near, which the issue cites as related behavior. Reproduce the failure with the antiresonant_fibre example and inspect how non-finite samples are handled while bracketing roots. Done when the default range either skips those samples or raises a solprop error that identifies the range, and the reported case no longer produces a bare SciPy ValueError.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What happens
tools.lambda_rdw_all on a VincettiMode raises a bare ValueError from scipy.optimize.brentq with its default search range:
from solprop.recipe import Recipe
from solprop import tools
recipe = Recipe.example("antiresonant_fibre")
k = recipe.keywords()
mode = recipe.build().modes[0]
p = tools.soliton_params(mode, k["gas"], k["pressure"], energy=k["energy"], fwhm=k["fwhm"],
wavelength=k["wavelength"], shape="gauss")
tools.lambda_rdw_all(mode, k["wavelength"], peak_power=p.peak_power, gamma=p.gamma,
fwhm=p.fwhm, shape=p.shape)
# ValueError: The function value at x=1.7659346048877808e+16 is NaN; solver cannot continue.
The mismatch is NaN near 107 nm, inside the default range. Passing wavelength_limits=(300e-9, 720e-9) avoids it and returns ().
Expected
A range that holds non-finite values either skips them or raises solprop's own error naming the range, as _zdw_near does by treating a non-finite sample as unable to bracket anything.
Why it matters
The front end works around it by searching only within the run's own wavelength window. summarise swallows the ValueError and reports it as a design error.
- Lenguaje dominante
- Python
- Estrellas
- 3
- Forks
- 3
- Merge medio
- 8 h 28 min
- PR fusionados (30 d)
- 176
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 LupoLab/solprop
-
bug
Dificultad 1/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 1 día
-
documentation priority: medium
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100
Los mantenedores suelen responder en 1 día
-
documentation priority: low
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
Los mantenedores suelen responder en 1 día
-
documentation priority: high
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
documentation good first issue priority: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
Todos los issues de LupoLab/solprop
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
django-cms/djangocms-frontend#413 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
NanmiCoder/MediaCrawler#1004 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
facebookresearch/xformers#1417 ·
-
question
Dificultad 1/5 Menos de una hora Aptitud para principiantes 68/100
vllm-project/vime#524 ·
Los mantenedores suelen responder en 7 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
FinanceFlash/unvibecode#675 ·
Los mantenedores suelen responder en 1 día