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

Consider updating pvlib.tracking.singleaxis() to return zeros (or similar) for nighttime instead of NaNs

Abierto
#2,539 14 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
1-2 días
Aptitud para principiantes
22/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
python
Área
backend

Línea de trabajo

The NaN output comes from the night-time branch of singleaxis in pvlib/tracking.py, around the line the issue links. Read the function and the tests in pvlib/tests/test_tracking.py to see which outputs are NaN after sunset. Done means the maintainers have agreed on zero versus NaN for each output, or an opt-in parameter, with tests and docs updated. The design choice is still open, so settle it in the thread before coding.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Is your feature request related to a problem? Please describe.
pvlib.tracking.singleaxis returns NaNs for intervals where the sun is below the horizon. This can result in NaNs propogating to lots of other pvlib outputs and can cause confusion, other issues, etc. See https://groups.google.com/g/pvlib-python/c/ZeVmTC7eddY as an example.

It appears to happen here:

https://github.com/pvlib/pvlib-python/blob/6dfeaf8ee97db6a7a8f3c8109eed8b5d285c4e41/pvlib/tracking.py#L155

Describe the solution you'd like
Perhaps change the default to be zero for surface_tilt and tracker_theta (and whatever is most appropriate for aoi and surface_azimuth). Or have an optional input for pvlib.tracking.singleaxis to specify whether it returns NaNs or numbers at night.

Describe alternatives you've considered
Applying .fillna(0) (or similar) to the output of pvlib.tracking.singleaxis is what I typically do.

Additional context
It looks like this zero vs nan situation was briefly discussed in https://github.com/pvlib/pvlib-python/issues/569. It seems it would be worth further discussion. Is there a significant reason that NaN is the output at night?

fillna(0) is used in the gallery here and here, but not here.

Tagging @cwhanse.

Lenguaje dominante
Python
Estrellas
1.7k
Forks
1.2k
Merge medio
3 d 18 h
PR fusionados (30 d)
13

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 pvlib/pvlib-python

Todos los issues de pvlib/pvlib-python

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.