Skip to main content

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.0.2. 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.6.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).

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) and the shared toolkit used by the non-regression tests of both systems (refkit.py)
requirements-reference.txt Pinned environment the references were recorded with

No real participant data is stored in this repository.

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.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for re-ak-core 1.0.2
File Size Uploaded Provenance Actions
re_ak_core-1.0.2.tar.gz 161.4 kB With provenance Details for re_ak_core-1.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for re-ak-core 1.0.2
File Interpreter ABI Platform Actions
re_ak_core-1.0.2-py3-none-any.whl Python 3 none any Details for re_ak_core-1.0.2-py3-none-any.whl

Total release size: 366.6 kB

Release files / re_ak_core-1.0.2.tar.gz

Download URL re_ak_core-1.0.2.tar.gz
Size 161.4 kB
Tags Source
SHA-256 checksum
How to use checksums
0f780887824e90b0cda3d2c064b7f57513efd7596b5c761b88a1dd875ce569aa
BLAKE2b-256 checksum
How to use checksums
af26718b5eb21f334e9572dca987eb1527b3a2933cef47bfc1154127da6f0ac0
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 Oct 29, 2026.

Transparency log

Release files / re_ak_core-1.0.2-py3-none-any.whl

Download URL re_ak_core-1.0.2-py3-none-any.whl
Size 205.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e5f14fa71d64372c7d39eed304cd2031ac0b681dc2062ab11f36ab53d05abed3
BLAKE2b-256 checksum
How to use checksums
320b442f4cd9571969e8c3df6f4a90c55335a1682bea6197c5f4132371edb21b
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 Oct 29, 2026.

Transparency log

Security for re-ak-core 1.0.2

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.

Select from 2 files

Attestation for re_ak_core-1.0.2.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 Oct 29, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page