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

Allow overwriting incorrect units in EDF header with mne.io.read_raw_edf

Abierto
#14,427 2 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
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
58/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python
Área
api, data

Línea de trabajo

Start with the units handling in mne/io/edf/edf.py, especially the check near line 494 that rejects replacing units already specified in the EDF header. Trace the existing mne.io.read_raw_edf tests for unit overrides and add coverage for replacing a specified unit; done means an incorrect header unit can be overridden and the resulting data can be exported to EDF.

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

Descripción

ENH
Describe the new feature or enhancement

An EDF file I have has some channels that are in arbitrary units (i.e. misc channels) but the header incorrectly specifies uV. There appears to be no easy way to fix this in MNE directly: I'll need to correct the header externally.

This causes downstream issues when exporting to EDF because the range now has too many characters to fit in an EDF header field (edfio gives up).

Describe your proposed implementation

Would it be possible to update the units parameter of mne.io.read_raw_edf to allow over-writing an existing unit? Currently, this raises an error: only units that are unspecified in the EDF header are allowed to be modified on opening them.

Describe possible alternatives

Using an external tool to fix the header. This is annoying because I expected this to be possible with just MNE.

Additional context

No response

Lenguaje dominante
Python
Estrellas
3.6k
Forks
1.6k
Merge medio
1 d 11 h
PR fusionados (30 d)
82

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 mne-tools/mne-python

Todos los issues de mne-tools/mne-python

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.