Metadata-Version: 2.1
Name: river_bci
Version: 0.1.0
Summary: Last-mile preprocessing for neural data to ML-ready tensors
License: MIT
Keywords: neuroscience,BCI,neural-data,preprocessing,machine-learning
Author: Your Name
Author-email: you@example.com
Requires-Python: >=3.9,<4.0
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Provides-Extra: all
Provides-Extra: mne
Provides-Extra: nwb
Provides-Extra: spikeinterface
Requires-Dist: h5py (>=3.0,<4.0)
Requires-Dist: mne (>=1.0,<2.0) ; extra == "mne" or extra == "all"
Requires-Dist: numpy (>=1.21,<2.0)
Requires-Dist: pynwb (>=2.0,<3.0) ; extra == "nwb" or extra == "all"
Requires-Dist: scipy (>=1.7,<2.0)
Requires-Dist: spikeinterface (>=0.100,<0.101) ; extra == "spikeinterface" or extra == "all"
Description-Content-Type: text/markdown

# river_bci

Last-mile preprocessing for neural data to ML-ready tensors.

```python
from river import bridge

# One-liner spike preprocessing (Willett 2023 style)
X = bridge.presets.willett_speech(raw_signal, fs=30000)

# ECoG high-gamma extraction
hg = bridge.ecog.high_gamma(ecog_data, fs=1000)

# Composable pipeline
features = (
    bridge.Pipeline()
    .car()
    .notch(60)
    .high_gamma()
    .downsample(200)
    .sliding_zscore(30)
    .fit_transform(ecog_data, fs=1000)
)
```

## Installation

```bash
pip install river_bci
```

## Modules

- **spikes**: Spike train processing (binning, smoothing, threshold crossings)
- **ecog**: ECoG/LFP processing (filtering, high-gamma extraction)
- **normalize**: Normalization methods (z-score, sliding z-score, robust)
- **epoch**: Trial epoching and windowing
- **splits**: Train/val/test splitting with temporal awareness
- **pipeline**: Composable preprocessing pipelines
- **presets**: Published paper preprocessing presets (Willett, Chang lab, NLB)
- **streaming**: Real-time streaming processors
- **io**: Data loading for NWB, MAT, SpikeInterface, MNE

