Resampling and normalization
Panel: Tools ▸ Preprocess
Requires: (no feature flag)
Applies to: all channel kinds
These two steps are grouped because they share a purpose: making a recording match what something downstream expects — an export target, or a model that requires a fixed sample rate and amplitude scale.
Both are applied to the whole recording at export, after the montage and filters.
Resampling
Changes the sample rate of the recording.
Phasic uses rational polyphase resampling with a Kaiser-windowed sinc filter, mirroring
scipy.signal.resample_poly — the reference implementation in the Python EEG stack — so
results are comparable with tools built on it.
The target rate is reduced to an integer ratio, the signal is upsampled by the numerator, low-pass filtered to prevent aliasing, then decimated by the denominator.
Downsampling is band-limited. The low-pass stage removes content above the new Nyquist frequency before decimation, so no aliasing is introduced. Content above that frequency is gone — resampling is not reversible.
Resampling applies to every channel. On a heterogeneous recording, remember that BDF and EDF have already placed every channel on a common master grid before this point.
Normalization
Rescales each channel’s amplitude. Used primarily to meet the input expectations of a model, which typically expects standardised values rather than microvolts.
| Mode | Definition | Notes |
|---|---|---|
| Off | No change | The default |
| Z-score | (x − mean) / standard deviation, clamped |
Per channel. Safe on a zero-variance channel |
| Robust | (x − median) / IQR, clamped |
Per channel. Equivalent to scikit-learn’s RobustScaler |
Choose robust when artifacts are present. A single large transient inflates the standard deviation and shrinks everything else; the median and interquartile range are barely affected by it.
Choose z-score when a model requires it. Model contracts generally name the normalization they were trained with, and matching it matters more than which is theoretically better — feeding a model a differently-scaled input is a silent accuracy loss rather than an error.
Both modes clamp their output, so an extreme sample cannot produce an extreme normalised value.
Normalization destroys physical units. A normalised channel is no longer in microvolts or any other unit; the values are dimensionless. This is why it is applied at export rather than to the display, where the amplitude scale needs to stay meaningful.