Skip to main content

Nucleus-Kit Processing Toolkit

Desktop application for Nucleus-Kit sessions: offline analytics (ingest session folders on disk, run the bundled processing steps, write outputs under each session's features/ and results/), plus real-time streaming, playback review, and MQTT device control. The offline pipeline can be run from the GUI or from the command line.

Since version 2.0.0 the processing itself (heart dynamics, arousal, cognition, emotions, events, emotion models and the RMS / PPG repair tools) is re-ak-core, RE-AK's open processing core, shared with the re-akcas cloud processor. Nucleus-Kit adds the desktop application and its local steps: POV movie conversion, session video rotation and GPS. Every change in the results compared with Nucleus-Kit 1.1 is listed in re-ak-core's CHANGELOG.

Table of contents

Hardware mapping

Device Signals
Hermes headset EEG and EMG (including features used by the emotion model)
Shimmer wristband PPG and EDA (GSR processing in code maps to the Shimmer EDA channel)

Graphical interface

After python -m nucleuskit_toolkit (or nucleuskit-toolkit), the window shows a sidebar on the left and the selected page on the right. Every page has a title, a one-line description and a Help link to this documentation. A page opened for the first time shows a loading screen while its libraries load (a few seconds on the first launch); they are also loaded in the background right after start-up.

Sidebar item Purpose
Process Run the pipeline on one session folder or on every session of a dataset folder. The selected folder is checked as you type (read only): session name, duration and recorded signals, or for a dataset the number of sessions and how many are incomplete. Run is enabled once the folder is valid; while running it becomes Cancel, which finishes the step in progress and skips the rest. In a dataset, a failing session does not stop the others.
Real-time viewer Connect to a Hermes headset over BLE (devices appear in the list as soon as the scan sees them) and an optional Shimmer over serial: stream, plot EEG / motion / Shimmer signals, and record into a session-style folder.
Playback Review a processed session: optional rawData/video.mp4 plus time-aligned plots from results/*.csv, with editable event annotations when available.
Tools Maintenance utilities for processed sessions (see below).
MQTT Controller Connect to a broker (e.g. Vizia Mobile), discover devices from status traffic, and send recording-related MQTT commands.
Settings Theme (light, dark, or system), persisted under REAK / NucleusKitToolkit via QSettings.
Documentation Opens the technical documentation in the browser.
About Nucleus-Kit and re-ak-core versions, available emotion models, license and links.

Leaving a page is refused while it is busy (a run in progress, a device connected or connecting, unsaved playback annotations are offered for saving first).

Tools submenu

Item Purpose
Channel Fixer Repair a single bad RMS channel in an already-processed session using the bundled channel-fix model.
Channel gain adjustment Adjust per-channel RMS gain and zero offset against a reference distribution; updates working emotion RMS features.
Revert to original Restore working RMS features from the frozen baseline under features/emotions/original/.
PPG Fixer Re-run PPG artifact rejection and HRV computation on an already-processed session (useful when tuning rejection thresholds without reprocessing the full pipeline).
EEG Regression Denoising Remove shared muscle noise from the EEG by regression on the EMG reference channels, then recompute the cognition outputs.
Recording Merger Join up to 5 recordings into one session, with empty CSV rows and black video for the gaps.

Requirements

  • Python 3.10, 3.11 or 3.12 (3.12 recommended). Check with python --version (py --version on Windows). On Windows, install it from python.org and tick Add python.exe to PATH in the installer.
  • ffmpeg (optional): only for POV movie conversion and session video rotation. Point Nucleus-Kit to it with ffmpeg_dir (see Optional POV / ffmpeg configuration).
  • Dependencies are declared in pyproject.toml; requirements.txt pins the exact versions that were tested, GUI extras included.

Install Nucleus-Kit in its own virtual environment: its emotion models need scikit-learn 1.6, which must not be upgraded by another tool installed next to it.

Install

From PyPI

Windows (PowerShell)

python -m venv "$env:USERPROFILE\nucleuskit"
& "$env:USERPROFILE\nucleuskit\Scripts\python.exe" -m pip install --upgrade pip
& "$env:USERPROFILE\nucleuskit\Scripts\python.exe" -m pip install "nucleuskit-toolkit[gui]"
& "$env:USERPROFILE\nucleuskit\Scripts\nucleuskit-toolkit.exe" --help

macOS / Linux

python3 -m venv ~/nucleuskit
~/nucleuskit/bin/python -m pip install --upgrade pip
~/nucleuskit/bin/python -m pip install "nucleuskit-toolkit[gui]"
~/nucleuskit/bin/nucleuskit-toolkit --help

The gui extra installs the desktop interface (PySide6 / Qt 6), Bluetooth and serial streaming and MQTT. Without it only headless processing (--session) is available. re-ak-core, the processing core, is installed automatically.

With pipx, which creates the environment for you and puts the commands on your PATH:

pipx install "nucleuskit-toolkit[gui]"

From source (development)

Clone this repository and re-ak-core side by side, then install both in editable mode (changes in either clone apply without reinstalling). This is also the way to install before a version is published on PyPI.

Windows (PowerShell)

git clone https://github.com/fs-re-ak/re-ak-core.git
git clone https://github.com/fs-re-ak/NucleusKit-ProcessingPipeline.git
cd NucleusKit-ProcessingPipeline
python -m venv .venv
.\.venv\Scripts\python.exe -m pip install --upgrade pip
.\.venv\Scripts\python.exe -m pip install -e ..\re-ak-core
.\.venv\Scripts\python.exe -m pip install -e ".[dev,gui]"
.\.venv\Scripts\python.exe -m pytest

macOS / Linux

git clone https://github.com/fs-re-ak/re-ak-core.git
git clone https://github.com/fs-re-ak/NucleusKit-ProcessingPipeline.git
cd NucleusKit-ProcessingPipeline
python3 -m venv .venv
.venv/bin/python -m pip install --upgrade pip
.venv/bin/python -m pip install -e ../re-ak-core
.venv/bin/python -m pip install -e ".[dev,gui]"
.venv/bin/python -m pytest

The re-ak-core clone satisfies Nucleus-Kit's re-ak-core>=1.0.1,<1.1 requirement, so pip keeps it instead of downloading the published one. To reproduce the tested environment exactly, install requirements.txt instead of the [dev,gui] extras (it needs re-ak-core on PyPI).

Upgrade and uninstall

python -m pip install --upgrade "nucleuskit-toolkit[gui]"
python -m pip uninstall nucleuskit-toolkit re-ak-core

Use the environment's python (for example "$env:USERPROFILE\nucleuskit\Scripts\python.exe"), or delete the environment folder to remove everything. With pipx: pipx upgrade nucleuskit-toolkit / pipx uninstall nucleuskit-toolkit.

Run

Run the commands with the environment's executables (as below), or activate the environment first (.\.venv\Scripts\Activate.ps1 in PowerShell, source .venv/bin/activate on macOS / Linux) and drop the path.

Graphical mode (see Graphical interface; needs the gui extra):

& "$env:USERPROFILE\nucleuskit\Scripts\nucleuskit-toolkit.exe"

The same as python -m nucleuskit_toolkit. From a source checkout, launch_app.bat runs python -m nucleuskit_toolkit with the first python on the PATH: activate the environment before running it.

Headless mode (one session, then exit; for automation and CI):

nucleuskit-toolkit --session "D:\path\to\session_folder"

Options:

Option Effect
--session DIR Process this session folder and exit (no GUI)
--config JSON Optional POV / ffmpeg settings, merged after the config files of the current directory
--emotion-model NAME Emotion model release (default classical-emotion-2.6.0; nucleuskit-toolkit --help lists them)

Outputs are written inside the session folder (see Session layout). Existing outputs are reused: delete a file under results/ to recompute that step.

Replace the packaged logo anytime with your own PNG at nucleuskit_toolkit/ui/resources/branding/logo.png (same path in an installed package).

Desktop shortcut (Windows)

  1. Right-click the desktop, New → Shortcut.
  2. Location: the environment's pythonw.exe followed by -m nucleuskit_toolkit, for example C:\Users\<you>\nucleuskit\Scripts\pythonw.exe -m nucleuskit_toolkit (pythonw opens no console window).
  3. Name it Nucleus-Kit, then in Properties → Start in, choose the folder that holds your nucleuskit_toolkit_config.json, if you use one.

Troubleshooting

Problem Fix
Activate.ps1 cannot be loaded because running scripts is disabled Call the environment's python.exe / nucleuskit-toolkit.exe by its path, as above, instead of activating
No matching distribution found for re-ak-core That version is not on PyPI yet: install from source
pip reports a conflict on scikit-learn Another package needs a newer scikit-learn: install Nucleus-Kit in its own environment
ModuleNotFoundError: No module named 'PySide6' Install the gui extra: pip install "nucleuskit-toolkit[gui]"
python is not recognized (Windows) Use py -3.12 instead of python, or reinstall Python with Add python.exe to PATH

Session layout

The pipeline treats the session root as a single directory (the folder you select on the Process page or pass to --session).

Top-level folders

Folder Role
rawData/ Canonical location for recordings and acquisition-side files. The GUI expects this folder to exist and be non-empty after any automatic layout fix (see below).
features/ Intermediate and traceability outputs: meta summary, per-processor feature exports, processed events, optional playback annotation seed.
results/ Primary analytics tables, logs, and optional playback-side annotation copies.
meta/ Reserved for session-level assets such as preview images (created when needed).
experimentConfigs/ Reserved for experiment or run configuration artifacts.

On startup, if rawData/ is missing, the pipeline may create it and move every other top-level entry into it, except the reserved names above (rawData, features, results, meta, experimentConfigs). That normalizes older layouts where files lived at the session root.

rawData/ — typical inputs

Exact filenames vary by firmware and recording path; common patterns include:

  • Hermes EEG / EMG: rawEEG_0.csv or eeg.tmp
  • Shimmer: shimmer.csv, or legacy rawShimmer_0.csv / gsr.tmp
  • Video: video.mp4 (used for playback and optional one-time 180° rotation during processing)
  • Events: rawEvents.csv (processed into features/events/processedFeatureEvents.csv and related); event.csv (used to seed features/events/playback_annotations.json when that file does not yet exist)
  • Position: GPS CSV as expected by the GPS processor (under rawData/)

features/ — notable outputs

  • features/metainfo.json — session duration and stream presence flags from meta extraction
  • features/ppg/ — PPG intermediate files: ppg_resampled.csv (artifact-cleaned signal), ppg_normalized.csv (rolling z-score used for peak detection), ppg_resample_report.txt, and diagnostic figures ppg_rejected.png, ppg_overview.png, ppg_spectrogram.png
  • features/eda/ — EDA intermediate files: eda_resampled.csv (resistance in kΩ), eda_resample_report.txt, eda_overview.png, and SCR_events.csv (discrete skin conductance response events)
  • features/cognition/ — EEG band powers (powerBands.csv), bilateral temporal averages (temporalBandPowers.csv), epoch-level artefact rejection summary (artefactStats.csv), per-epoch signal metrics (epochMetrics.csv), and artefact waveform plot (eegArtefactPlot.png)
  • features/emotions/ — e.g. rmsSignals.csv, emotionClassifierInputs.csv, plus original/ when using RMS editing tools
  • features/events/playback_annotations.json — point/zone annotations for playback (seeded from rawData/event.csv once, then user-editable in the app)
  • features/events/processedFeatureEvents.csv / features/events/processedWebFeatureEvents.csv — derived from rawData/rawEvents.csv when present

Other steps may still write auxiliary artifacts directly under features/.

results/ — primary toolkit tables

Written by the default offline pipeline (when the corresponding raw inputs exist). Existing outputs are reused: delete them to recompute a step.

  • processingLog.txt — append-only run log
  • Emotions.csv, Cognition.csv, Arousal.csv, HeartDynamics.csv
  • emotion_model.json — emotion model and post-processing used for Emotions.csv
  • processing.json — re-ak-core version, model, status of each step and a signal-quality summary
  • gpsDf.csv (GPS)

Playback mode looks for metric CSVs here and, for synchronized video, uses rawData/video.mp4. Event annotations are loaded from features/events/playback_annotations.json. When you edit annotations in Playback and save, the app writes that file and mirrors the same JSON to results/playback_annotations.json for convenience.

Optional POV / ffmpeg configuration

POV movie conversion uses optional settings from, in order:

  1. hermes_standalone_config.json in the current working directory (legacy name, still supported)
  2. nucleuskit_pipeline_config.json in the current working directory (legacy name, still supported)
  3. nucleuskit_toolkit_config.json in the current working directory (overrides legacy keys if both exist)
  4. An extra JSON path passed with --config (CLI only)
  5. Environment variables: HERMES_POV_DATA_ROOT, HERMES_FFMPEG_DIR, HERMES_POV_SCREEN_ID

A run from the Process page uses the same merge rules from the process working directory and environment; it does not prompt for a config file path.

JSON keys: pov_data_root, ffmpeg_dir, screen_id.

Technical documentation

The doc/ folder contains detailed technical descriptions of each processing toolkit for traceability and scientific reference. The heart, arousal, cognition, emotions and events processing now lives in re-ak-core: those pages describe Nucleus-Kit 1.1 and will move to re-ak-core's documentation; re-ak-core's CHANGELOG lists what changed since.

File Pipeline
doc/overview.md Pipeline orchestration, step order, session layout, shared 2 Hz timebase
doc/pipeline_heart.md Shimmer PPG → Heart Rate Dynamics (SQI + MAD artifact rejection, NeuroKit2, HRV)
doc/pipeline_arousal.md Shimmer EDA → Arousal (cvxEDA tonic/phasic decomposition, SCR detection)
doc/pipeline_cognition.md Hermes EEG → Cognitive Indexes (Welch power bands, epoch-level artefact rejection, Engagement)
doc/pipeline_emotions.md Hermes EMG → Emotion Classification (AVG_RMS artefact gate, two-stage LDA/KNN classifier)
doc/pipeline_events.md Raw Events → Feature / Web Events + Playback Annotations
doc/pipeline_positioning.md GPS Positioning
doc/mqtt_interface.md Vizia Mobile MQTT interface — status, commands, and tags

Trust and bundled models

The emotion models are shipped by re-ak-core as joblib/pickle artifacts, checked against the checksums of their release manifest before loading. Treat them like executable data: only use models shipped with re-ak-core or that you trust.

Tests

pytest

tests/test_open_core_references.py checks that Nucleus-Kit gives exactly re-ak-core's outputs on re-ak-core's synthetic sessions; it needs a re-ak-core checkout next to this repository (or RE_AK_CORE=<path>) and is skipped otherwise.

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. Versions up to 1.1 were released under the MIT License.

Metadata

Release files for nucleuskit-toolkit 2.2.0

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

Source distribution (sdist)

Source distribution for nucleuskit-toolkit 2.2.0
File Size Uploaded Provenance Actions
nucleuskit_toolkit-2.2.0.tar.gz 256.2 kB With provenance Details for nucleuskit_toolkit-2.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nucleuskit-toolkit 2.2.0
File Interpreter ABI Platform Actions
nucleuskit_toolkit-2.2.0-py3-none-any.whl Python 3 none any Details for nucleuskit_toolkit-2.2.0-py3-none-any.whl

Total release size: 517.8 kB

Release files / nucleuskit_toolkit-2.2.0.tar.gz

Download URL nucleuskit_toolkit-2.2.0.tar.gz
Size 256.2 kB
Tags Source
SHA-256 checksum
How to use checksums
2bd1fa09918a2ba1d3b2451144370b83a238dd0556f8a8188b959e231bfc2c21
BLAKE2b-256 checksum
How to use checksums
6daf4a92df404075bef39e9c169a87e1cd40d9e7763851aee26bfdf76c39d8d0
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 22, 2026.

Transparency log

Release files / nucleuskit_toolkit-2.2.0-py3-none-any.whl

Download URL nucleuskit_toolkit-2.2.0-py3-none-any.whl
Size 261.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7f4d3002a5684a21b19eb6c7796af018d1e1709f47d8b9a63ac1d6a2f0a2c25d
BLAKE2b-256 checksum
How to use checksums
9be9f0e989455c6d1b654ee53f0b931b7a9bcfc2657c41b758588582daa7c76d
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 22, 2026.

Transparency log

Security for nucleuskit-toolkit 2.2.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.

Select from 2 files

Attestation for nucleuskit_toolkit-2.2.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 Oct 22, 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