Metadata-Version: 2.4
Name: pieeg-core
Version: 0.1.1
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: 3
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: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
License-File: LICENSE
Summary: Native accelerator for PiEEG — drop in, go faster
Keywords: eeg,bci,pieeg,dsp,native,accelerator
Author: PiEEG Community
License: AGPL-3.0-or-later
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Homepage, https://github.com/pieeg-club/PiEEG-core
Project-URL: Issues, https://github.com/pieeg-club/PiEEG-core/issues
Project-URL: Repository, https://github.com/pieeg-club/PiEEG-core

# PiEEG Core

Native accelerator for [PiEEG-server](https://github.com/pieeg-club/PiEEG-server). Compiled Rust replacements for hot paths.

> ⚠️ **Early development · experimental · no warranties.** This project is in early development — APIs, behavior, and packaging may change without notice. Research/hobbyist software provided **as-is**, without warranty of any kind, express or implied. Not a medical device. Not intended for clinical, diagnostic, or safety-critical use. Use at your own risk. See [LICENSE](LICENSE) for full terms.

## What it accelerates

| Component | What | Speedup |
|-----------|------|---------|
| `HampelFilter` | Per-channel spike rejection (median + MAD) | ~20x |
| `MultichannelFilter` | Butterworth IIR bandpass (SOS cascade) | ~15x |
| `decode_channels` | 24-bit ADC → µV conversion | ~30x |

When installed, `pieeg-server` detects it and switches to the compiled implementations automatically. No config needed.

## Install

```
pip install pieeg-core
```

Pre-built wheels are published for Linux (x86_64, aarch64, armv7 — including Raspberry Pi), Windows (x86_64) and macOS (arm64) on CPython 3.10–3.13.

## Build from source

Requires [Rust](https://rustup.rs) and [maturin](https://www.maturin.rs):

```
pip install maturin
cd PiEEG-core
maturin develop --release
```

Build inside the same Python environment where `pieeg-server` is installed.

