set_filters
Install a stateful online filter chain to apply bandpass and notch filters on a live EEG stream, preventing transients at chunk boundaries and preserving raw signal.
Instructions
Install a stateful online filter chain on a running stream.
The chain filters continuously in the background as samples arrive, carrying filter state across chunk boundaries. This matters: filtering each query window independently would inject a transient at every boundary and corrupt any phase-sensitive measure. Filtered output goes to a second buffer, so raw signal remains available via read_window(filtered=False).
These are causal filters -- there is no zero-phase option, because that needs
future samples. Check group_delay_sec in the response to know how far
behind real time your filtered features are.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| order | No | Butterworth order for the bandpass. 4 is a sensible default. | |
| filters | No | Advanced -- an explicit stage list that overrides the arguments above, e.g. [{"kind": "highpass", "low": 0.5}, {"kind": "notch", "low": 60, "quality": 30}]. Kinds: bandpass, bandstop, highpass, lowpass, notch. | |
| notch_freq | No | Mains frequency to notch out (50 in most of the world, 60 in the Americas). None to skip. | |
| session_id | Yes | The session to filter. | |
| bandpass_low | No | High-pass corner in Hz. None to skip the bandpass. | |
| bandpass_high | No | Low-pass corner in Hz. None to skip the bandpass. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||