You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Zarr converter fails on mixed-sampling-rate EDF/BDF (polysomnography) #737
Surfaced while debugging the nm000111 publish cascade (#736), but it is a distinct bug in the Zarr serving-copy converter, not part of the post-publish robustness work.
Symptom
A forced Zarr conversion of nm000111 (ISRUC-Sleep, polysomnography) on the now-public dataset failed on all 126 recordings:
conversion failed for sub-I001/.../sub-I001_task-sleep_eeg.edf:
Error reading EDF file: Length of values (333375) does not match length of index (5334000)
...
all 126 conversion(s) failed; index left untouched
filesize 91778304 != 10900*13200+5120
Root cause
5334000 / 333375 = 16.0 exactly, across every recording. ISRUC-Sleep mixes per-channel sampling rates (EEG/EOG/EMG ~200 Hz, respiratory/SpO2 ~12.5 Hz; 200 / 12.5 = 16). scripts/zarr/generate_zarr.py builds a single time index at the maximum channel rate, so the slower channels' value arrays don't align with that index and the read raises. This is a real (not corrupt) PSG montage that any standard reader (MNE) handles by reading per-channel; the converter's single-rate assumption is the gap.
Scope
Decide the serving model for heterogeneous-rate recordings: per-channel-rate groups, resample-to-common-rate, or per-rate Zarr arrays.
Apply the same fix to BDF (BioSemi) which has the same multi-rate header model.
Add a mixed-rate fixture to the converter tests so this regressions-guards.
Repo: nemarDatasets/.github (scripts/zarr/generate_zarr.py). Tracked separately from #736 per maintainer.
Maintainer note: likely a biosigIO problem (the EDF/BDF reader used by the converter), not the converter's index logic per se. Investigate biosigIO's handling of heterogeneous per-channel sampling rates first. Handled outside the #736 robustness epic.
Activity
neuromechanist commentedon Jun 11, 2026
Maintainer note: likely a biosigIO problem (the EDF/BDF reader used by the converter), not the converter's index logic per se. Investigate biosigIO's handling of heterogeneous per-channel sampling rates first. Handled outside the #736 robustness epic.
neuromechanist commentedon Jun 18, 2026
Fixed in neuromechanist/biosigio#104