IndexError when plotting annotations out of range
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Jupyter Notebook
- Estrellas
- 853
- Forks
- 322
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
If you pass annotations to plot_items or plot_wfdb that are before the start or after the end of the supplied signals, it will give an error
Exception: IndexError: try setting shift_samps=True in the "rdann" function?
The error message has a valid point, in that if you load a subset using sampfrom then the default behavior of rdrecord and rdann is different, which can be confusing.
Still, it's quite possible to load annotations that are outside the time range of the signals you're plotting. In such a case it's often desirable to either:
-
hide all annotations that occur before/after the signal time range
-
plot the annotations anyway (with a y-value of zero), and extend the horizontal range of the plot (or maybe not)
So it'd be nice to have one or both of these behaviors as an option at least. Not sure what the default for plot_wfdb should be.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
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.
Línea de trabajo
Comienza con los puntos de entrada plot_items y plot_wfdb y reproduce el IndexError usando anotaciones fuera del rango de la señal proporcionada. Compara el comportamiento solicitado de ocultar frente a representar y decide cómo debe funcionar el valor predeterminado para plot_wfdb. Se considera terminado cuando el comportamiento elegido está expuesto como una opción y las anotaciones fuera de rango ya no provocan el error indicado.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- data-visualization
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 38/100