---
name: zscore-allowed
description: "Official lookahead exemptions (filtfilt same order, removeBadChannel, repairBadSegment, full-trial z-score, each once per pipeline) and external data allowed; envelope method differs per dataset"
metadata:
  node_type: memory
  type: project
  originSessionId: d4dac82a-f3e4-4196-a274-a5c105cb0541
  modified: 2026-09-30T17:40:51.196Z
---

Official rule, pasted by the user on 2026-09-30. Only these methods are exempt from the 1-s lookahead, and each only ONCE per preprocessing pipeline:
- `filtfilt`, with the same filter order as the provided scripts (Butterworth order 2, band-pass 1–9 Hz, in `preprocessCND.m`);
- `removeBadChannel` (each dataset's own folder);
- `repairBadSegment` (each dataset's own scripts);
- z-score across a complete trial.

Everything else must be causal within the 1-s budget.

Consequences:
- **Compliant:** the `mat` prep (supplied `pre_` files + CAR + one full-trial z-score).
- **Not compliant:** the FFT preps (`fft`, `fft15`). They are marked NON-COMPLIANT in config and CATALOG.
- **Targets:** onset and sub-band targets must not get a second full-trial z-score. It was removed on 2026-09-30; Pearson per window is invariant to that rescaling, so no result changed.

External datasets are allowed (user, 2026-09-30).

The envelope method was not documented and differs per dataset:
- KU Leuven uses gammatone + |·|^0.6;
- DTU uses a filterbank + |·|^0.3;
- the supplied AVGC envelope is already band-passed.
It is being reverse-engineered in `experiments/envelope_reverse`.

**How to apply:** preprocess external data with the same filtfilt order and one z-score.

See [[decoder-lodo-findings]].
