Skip to main content

PsychoPy plugin providing Builder components for NIRx Aurora API integration.

Project description

PsychoPy Aurora Plugin (psychopy-aurora)

A PsychoPy Builder plugin that allows you to control NIRx Aurora data acquisition directly from your PsychoPy experiment — without custom scripting.

The plugin provides Builder components to:

  • Connect to the Aurora Data Acquisition API
  • Run basic setup (device/config selection and signal optimization)
  • Start and stop recordings at routine boundaries
  • Send event triggers (1–255) via Aurora’s REST API or via LSL markers

Features

Builder Components

1. AuroraRecorder

  • Discovers and connects to Aurora via LSL
  • Initializes device and configuration
  • Runs signal optimization
  • Sets subject and experiment metadata
  • Optionally starts/stops recording at routine boundaries

2. AuroraTrigger (REST)

  • Sends triggers to Aurora via:
    POST /api/v1/recording/trigger
    
  • Uses the active global Aurora connection
  • Trigger ID can be a number or PsychoPy variable (e.g., from a conditions file)
  • Supports trigger on routine begin or end

3. AuroraTriggerLSL

  • Creates an LSL marker outlet
  • Uses the trigger_in_stream_name from the selected Aurora configuration
  • Pushes int32 trigger samples at routine begin/end
  • Useful for LSL-based synchronization pipelines

Requirements

  • Python >= 3.8
  • PsychoPy (recent versions recommended)
  • Aurora Data Acquisition API running on the same network
  • LSL installed and working

Runtime dependencies:

  • requests
  • pydantic
  • pylsl
  • rich

Installation

Install from source (recommended for development)

pip install -e .

Build wheel

python -m build
pip install dist/psychopy_aurora-*.whl

How It Works

1. Aurora Discovery

The plugin searches for an LSL stream named:

Aurora_API

It then verifies connectivity using:

GET /api/v1/ping

Once connected, all communication is done via:

http://<ip>:<port>/api/v1

Typical Experiment Workflow

Step 1 – Setup Routine

Add AuroraRecorder:

  • Connect to Aurora
  • Select device and configuration
  • Run signal optimization
  • (Optional) Start recording

Step 2 – Task Routine(s)

Add one of:

  • AuroraTrigger (REST-based triggers)
  • AuroraTriggerLSL (LSL marker triggers)

Place trigger component at stimulus onset routine.

Step 3 – End Routine

Use AuroraRecorder with:

  • “Stop recording” enabled

Example Trigger Usage

If using a conditions file with a column:

trigger

Set Trigger ID to:

trigger

If using a fixed trigger:

9

Troubleshooting

“No Aurora instance found”

  • Ensure Aurora API is running
  • Ensure LSL is active
  • Verify network connectivity

Triggers not appearing

  • REST: Ensure recording is active
  • LSL: Ensure outlet was successfully created

Output directory

Current implementation sets output directory to:

%USERPROFILE%/Documents/AuroraTest

Consider making this configurable in future versions.


Development

Install dev dependencies:

pip install -e .[dev]

Project uses setuptools packaging.


License

GNU General Public License v3.0 © NIRx Medizintechnik GmbH

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

psychopy_aurora-0.1.0.tar.gz (37.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

psychopy_aurora-0.1.0-py3-none-any.whl (150.8 kB view details)

Uploaded Python 3

File details

Details for the file psychopy_aurora-0.1.0.tar.gz.

File metadata

  • Download URL: psychopy_aurora-0.1.0.tar.gz
  • Upload date:
  • Size: 37.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for psychopy_aurora-0.1.0.tar.gz
Algorithm Hash digest
SHA256 dff7c5e07b64afcc958bc4f8ec76251b43e9b86613c7777e495d4eea1f390594
MD5 ff02715e2d8be1599c0e4c65c55ff3a1
BLAKE2b-256 50a01892395ed031cad812cd104a7a5353a77c3e922e79a0e3546c1b5ed2b47a

See more details on using hashes here.

File details

Details for the file psychopy_aurora-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for psychopy_aurora-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 595eeb103fa0b04fcd91694a4d6f9c0d4d98037705fc5d48ff4f7c9bae155622
MD5 d565cdd291621c61329abc84ca1deccd
BLAKE2b-256 d08bb38cdb8f90dd3f1a17dd167df717d38b3f64ce362a6e1676a003e476002d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page