Repository navigation
Description
EEGEventsTUEV.__call__ builds its 16 bipolar channels from EEG XX-REF channel names. When a name is missing, it catches the error and skips the whole recording without logging anything (except (ValueError, KeyError): continue in pyhealth/tasks/temple_university_EEG_tasks.py). EEGAbnormalTUAB skips unreadable files the same way.
The public AAREADME.txt of TUEV v2.0.1 says the corpus has two types of EEGs: averaged reference (AR) and linked ears reference (LE):
https://isip.piconepress.com/projects/nedc/data/tuh_eeg/tuh_eeg_events/v2.0.1/AAREADME.txt
If the LE files use -LE channel names (Braindecode's TUH loader strips both -REF and -LE), every LE recording is dropped and the user is never told. With synthetic data I reproduced it: a recording with -LE names gives 0 samples and 0 log records. The BIOT preprocessing this task follows (datasets/TUEV/process.py) skips the same files, but it prints a message.
What I can and cannot check. I am not affiliated with an institution, so I can't get TUH access (the NEDC form needs an institutional address and email). This means I can't measure how many recordings are dropped, or confirm the exact LE channel names. Could someone with access run this? It only reads EDF headers:
from pathlib import Path
import mne
root = Path("/path/to/tuh_eeg_events/v2.0.1/edf") # holds train/ and eval/
wanted = ["FP1", "F7", "T3", "T5", "O1", "FP2", "F8", "T4",
"T6", "O2", "F3", "C3", "P3", "F4", "C4", "P4"]
counts = {}
for split in ("train", "eval"):
kept = dropped = 0
suffixes = set()
for edf in sorted((root / split).rglob("*.edf")):
names = mne.io.read_raw_edf(edf, preload=False, verbose="error").ch_names
if all(f"EEG {c}-REF" in names for c in wanted):
kept += 1
else:
dropped += 1
suffixes.update(n.rsplit("-", 1)[-1] for n in names if n.startswith("EEG "))
counts[split] = (kept, dropped, sorted(suffixes))
print(counts)Plan.
- A first PR (linked below) keeps the current behaviour, so results stay comparable with BIOT. It logs a warning with the file and the reason for every skipped recording, and documents it. It also fixes two small issues in the same file:
EEGAbnormalTUABraisesTypeErrorwith a floatresample_rate;- several docstrings are wrong (256 Hz instead of the 200 Hz default,
np.ndarrayinstead of tensors, and the meaning ofoffending_channel).
- If the counts show that many recordings are dropped, I can follow up with opt-in support for LE recordings (same bipolar montage,
-LEsuffix). It would be off by default, because it changes the sample set. Would you want that?
Activity
solarsys commentedon Nov 27, 2026
Update: the silent part is fixed on master by #1474. Skipped recordings now log
Skipping <file>: channel ... not found(temple_university_EEG_tasks.py:229, covered intest_tuev.py), and the docstring says linked-ear recordings are skipped. Supporting the LE recordings still needs someone with TUH access to confirm their channel names with your header script, so leaving this open for that.