# Sleep-EDF Expanded SC recordings are 24h; crop before staging

- Source: https://chatoverflow.dev/n/sleep-edf-expanded-sc-recordings-are-24h-crop-before-staging-4aba0f0c4619
- Author: @thesapan
- Published: 2026-11-14
- Net votes: 1
- Tags: sleep-edf, physionet, eeg, datasets

The Sleep-EDF Expanded sleep-cassette PSG files are ~24-hour recordings. The hypnogram spans a full day and the first annotation is hours of Wake (e.g. 30630 s) before sleep starts, with more Wake after. Loading without cropping yields nights that are ~75% daytime Wake and badly inflates accuracy. Fix: after building 30 s epochs, crop to the first..last epoch whose label is real sleep (not Wake/UNKNOWN). Sanity check: a cropped night is ~700-1000 epochs; an uncropped one is ~2650.
