File size: 2,666 Bytes
5782785
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
license: unknown
tags:
  - eeg
  - sleep-staging
  - in-ear-eeg
---

# EESM23-Processed

Preprocessed HDF5 export of the **EESM23** (Aarhus in-ear EEG sleep) BIDS
dataset — 10 subjects, 2 nights each (`ses-001`, `ses-002`), one 30-second
AASM scoring epoch per row (`Wake` / `N1` / `N2` / `N3` / `REM`; `Artefact`
epochs dropped). `sub-006/ses-002` PSG is skipped — the source `.set` file is
truncated on disk.

## Preprocessing

**Only** a 0.1–100 Hz band-pass + 50 Hz notch filter is applied, on the full
continuous recording before slicing into 30 s epochs (to avoid per-epoch
filter edge effects). Nothing else: **no re-referencing, no resampling, no
channel renaming**. Channel names are kept exactly as in the source BIDS
`channels.tsv`.

Device data-loss gaps (NaN samples) are linearly interpolated before
filtering (a long FIR kernel otherwise smears each NaN across a wide window)
and the true NaN positions are restored afterward, so `nan_fraction` still
reflects genuine data quality rather than a filtering artifact.

Generated by `dataset/preprocess_eesm23.py` in the EEGFM repo.

## Files

| file | channels | epochs (N) | sfreq | epoch length |
|---|---|---|---|---|
| `eesm23-in-ear-eeg.h5` | 4: RB, RT, LB, LT (acq=earEEG, original names) | 16553 | 250 Hz | 30.0 s (7500 samples) |
| `eesm23-scalp-eeg.h5` | 8: M1, F3, C3, O1, M2, F4, C4, O2 (acq=PSG) | 15526 | 250 Hz | 30.0 s (7500 samples) |

Label distribution:

| | Wake | N1 | N2 | N3 | REM |
|---|---|---|---|---|---|
| in-ear | 1501 | 1369 | 7792 | 2667 | 3224 |
| scalp | 1375 | 1293 | 7329 | 2494 | 3035 |

## HDF5 schema (v0.2)

```
/data          (N, C, T)   float32   signal, µV
/durations     (N,)        int64     valid samples per epoch (== T here, fixed-length)
/nan_fraction  (N,)        float32   fraction of non-finite samples in the epoch
/labels        (N,)        int64     index into attrs['class_names']
/subject       (N,)        str       'sub-001' ...
/session       (N,)        str       'ses-001' / 'ses-002'
/task          (N,)        str       'sleep'
/run           (N,)        str       '' (unused, sessions are not run-qualified)
/trial_id      (N,)        int64     row index in the source scoring events.tsv
/ch_names      (C,)        str       channel names, as in source BIDS channels.tsv

attrs: sfreq, n_class, class_names, unit ('uV'), eegfm_version,
       source_bids_path, bids_dataset_name, preprocess_config_json, created_at
```

`preprocess_config_json` (per file) records the exact filter settings, e.g.:
```json
{"acq": "earEEG", "sessions": ["001", "002"], "epoch_sec": 30.0, "filter_low": 0.1, "filter_high": 100.0, "notch": 50.0}
```