re-ak-core
Open core shared by both the NucleusKit toolkit and online processor
reak_core processes recordings of the Hermès headset (EEG and facial EMG) and of the Shimmer wristband (EDA and
PPG): engagement, emotions, arousal and heart dynamics on a shared 2 Hz timebase. It is the single implementation
used by the free Nucleus-Kit toolkit (local processing) and by the re-akcas cloud processor.
Status: 1.4.0. See CHANGELOG.md for every behaviour change compared with the previous NucleusKit and Prime pipelines, measured on synthetic data.
Install
Python 3.10, 3.11 or 3.12 (3.12 recommended). scikit-learn is pinned to the 1.6 series: the emotion models were
saved with 1.6.1, so re-ak-core cannot share an environment with a newer scikit-learn. scipy is kept below 1.18,
whose filtfilt changes the reference outputs at the last rounded decimal. Use a dedicated virtual environment.
From PyPI
Windows (PowerShell)
python -m venv .venv
.\.venv\Scripts\python.exe -m pip install --upgrade pip
.\.venv\Scripts\python.exe -m pip install re-ak-core
.\.venv\Scripts\reak-core.exe --version
macOS / Linux
python3 -m venv .venv
.venv/bin/python -m pip install --upgrade pip
.venv/bin/python -m pip install re-ak-core
.venv/bin/reak-core --version
Nucleus-Kit users do not need this step: pip install "nucleuskit-toolkit[gui]" installs re-ak-core.
From source (development)
git clone https://github.com/fs-re-ak/re-ak-core.git
cd re-ak-core
python -m venv .venv
.venv/Scripts/python -m pip install -e ".[dev]" # macOS / Linux: .venv/bin/python
.venv/Scripts/python -m pytest
.venv/Scripts/ruff check
The full test suite takes several minutes: it runs the pipeline on the synthetic sessions of tests/synthetic and
compares every output with the references. To reproduce the environment the references were recorded with, install
requirements-reference.txt first.
Upgrade and uninstall
python -m pip install --upgrade re-ak-core
python -m pip uninstall re-ak-core
Use
With the environment activated (.\.venv\Scripts\Activate.ps1 in PowerShell, source .venv/bin/activate on
macOS / Linux), or by calling .venv/Scripts/reak-core / .venv/bin/reak-core directly:
reak-core --session path/to/session # default pipeline, model classical-emotion-2.12.0
reak-core --session path/to/session --model classical-emotion-2.5.0 --force
reak-core --list-models
from reak_core.pipeline import Pipeline
result = Pipeline.default(emotion_model="standard-latest").run("path/to/session")
print([(step.name, step.status) for step in result.steps])
A session folder holds rawData/ (Vizia Mobile or Nucleus-Kit files: eeg.csv, shimmer.csv, event.csv, …). The
pipeline writes results/ (Emotions.csv, Cognition.csv, Arousal.csv, HeartDynamics.csv, emotion_model.json,
processing.json), diagnostic files and figures under features/, and reuses existing outputs unless force=True.
results/processing.json records the core version, the model, each step's status and a signal-quality summary.
The modules can also be used one by one: reak_core.io (loading, invalid samples), reak_core.femg
(compute_emotions), reak_core.eeg (compute_cognition), reak_core.eda (compute_arousal), reak_core.ppg
(compute_heart_dynamics), reak_core.models (load_model), reak_core.tools (channel fixer, PPG fixer).
Documentation
The current processing description is in doc/: session layout, the 2 Hz timebase, invalid EXG
samples, and one page each for heart, arousal, cognition, emotions and events. Behaviour changes compared with
Nucleus-Kit 1.1 and Prime 3.1.0 are measured in CHANGELOG.md.
Extend
Other packages add behaviour without modifying the core:
| Entry point group | Provides | Example |
|---|---|---|
reak_core.steps |
a callable returning a reak_core.pipeline.Step |
an extra analysis written to features/ |
reak_core.exporters |
a callable returning a reak_core.pipeline.Exporter |
a report or an upload after the steps |
reak_core.models |
a callable factory(key) -> EmotionModel |
another emotion model, selectable by key |
Pipeline.default().with_installed_extensions() (or reak-core --extensions) adds installed steps and exporters;
with_step(step, after="emotions") adds one explicitly.
Repository content
| Path | Content |
|---|---|
src/reak_core/ |
The package; model releases in models/releases/ (checksummed, see each manifest.json) |
tests/core/ |
Unit tests and the comparison of the core with the references, output by output (expectations.py) |
tests/synthetic/ |
Deterministic synthetic session generator (Hermès EXG, Shimmer PPG / GSR, events) and the catalogue of cases |
tests/references/ |
Reference outputs of NucleusKit 1.1 and Prime 3.1.0 on those cases, and the measured differences between them (README) |
tools/ |
Recording (record_references.py), comparison (report_divergences.py), CHANGELOG measurement (write_changelog.py) the shared toolkit used by the non-regression tests of both systems (refkit.py) and the release script (release_pip.py) |
requirements-reference.txt |
Pinned environment the references were recorded with |
No real participant data is stored in this repository.
Releasing (maintainers)
Run this at the repository root, on an up-to-date main:
.\deploy_pip_package.bat
When the current version is already on PyPI, the script first shows the latest tag and asks for the new version, then opens the release notes in an editor (a draft of the commit subjects since that tag). It runs ruff and pytest, opens the pull request with the version files and the CHANGELOG section, and merges it, only if it changes nothing else. Then it continues with the release, so one run goes from the new version to PyPI.
For the release itself, the script checks versions, CHANGELOG and dependencies, pushes the tag that uploads to TestPyPI, tests that package in a throwaway venv, then asks for confirmation before creating the GitHub release that uploads to PyPI. When a run needs an approval on GitHub, it prints the link and waits. Run it again after any failure or Ctrl+C: it continues from what is already done. .\deploy_pip_package.bat --dry-run only runs the checks.
It needs git, an authenticated gh, Python 3.11 or newer and the dev extra. The upload itself is done by .github/workflows/publish.yml with Trusted Publishing, so no token is stored.
License
Copyright (C) 2026 RE-AK Technologies Inc.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. See LICENSE for the full text.
SPDX-License-Identifier: GPL-3.0-or-later. Every source file carries this identifier in its header; vendored
third-party files keep their original header and license (src/reak_core/eda/cvxEDA.py: Luca Citi and Alberto
Greco, GPL-3.0-or-later).
Metadata
Release files for re-ak-core 1.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| re_ak_core-1.4.0.tar.gz | 490.8 kB | With provenance | Details for re_ak_core-1.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| re_ak_core-1.4.0-py3-none-any.whl | Python 3 | none | any | Details for re_ak_core-1.4.0-py3-none-any.whl |
Total release size: 1.1 MB
Release files / re_ak_core-1.4.0.tar.gz
| Download URL | re_ak_core-1.4.0.tar.gz |
|---|---|
| Size | 490.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3b363e9c901cc17489cba3e0e527f5211df7bedc7dbf3606bf3f88571515b0da
|
|
BLAKE2b-256 checksum How to use checksums |
d200faafcb0a3ac4691b249034bbc956ff242a70015be8fef04fa61314093d45
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Transparency logRelease files / re_ak_core-1.4.0-py3-none-any.whl
| Download URL | re_ak_core-1.4.0-py3-none-any.whl |
|---|---|
| Size | 603.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c6ee4287e5b6450e6dde157ec0a2f7813faa3fa0ff983ba6189d69773487a2ba
|
|
BLAKE2b-256 checksum How to use checksums |
3f87ebdd2defc157faedc8719edeabc2b55f775f0c8346e7525cfb79f7989cf8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Transparency logSecurity for re-ak-core 1.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for re_ak_core-1.4.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.