Skip to main content

A PsychoPy plugin for using the Brain Imaging Data Structure (BIDS) to organize and describe data.

Project description

psychopy-bids

A PsychoPy plugin to work with the Brain Imaging Data Structure (BIDS).


Breaking Changes in Non-Patch Versions

Non-patch versions (e.g., v2025.1.0, v2026.0.0) are major or minor releases that can introduce substantial new features or changes, potentially breaking compatibility. For previously written experiments, it is strongly recommended to continue using the specific version of psychopy-bids they were created with. Only upgrade to a newer psychopy-bids version for new experiments.

For more details, see the Changelog.


Installation

Recommended: Install via PsychoPy Plugin Manager

The easiest way to install psychopy-bids is through the PsychoPy Plugin Manager:

  1. Open PsychoPy.
  2. Go to the Tools menu and select Plugin/packages manager.
  3. Search for psychopy-bids in the list.
  4. Click Install.

Alternative: Install via pip

You can install psychopy-bids using pip:

pip install psychopy-bids

Usage

The psychopy bids plugin can be used to create valid BIDS valid datasets by creating behavioral or task events in Psychopy. This can be done directly in python code or using the psychopy builder.

In code, the BIDSHandler can create or extend an existing BIDS dataset, including directory structure and necessary metadata files. Individual BIDS events can be added during the experiment and are passed to the BIDSHandler to write event .tsv files and accompanying .json files.

from psychopy_bids import bids

handler = bids.BIDSHandler(dataset="example_dataset", subject="01", task="A")
handler.createDataset()

events = [
    bids.BIDSTaskEvent(onset=1.0, duration=0.5, event_type="stimulus", response="correct"),
    bids.BIDSTaskEvent(onset=1.0, duration=0, trial_type="trigger")
]

handler.addEvent(events)

participant_info = {"participant_id": handler.subject, "age": 18}

handler.writeEvents(participant_info=participant_info)
handler.addEnvironment()

Contributing

Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.


License

psychopy-bids was created by Christoph Anzengruber, Florian Schöngaßner & Lukas Wiertz. It is licensed under the terms of the GNU General Public License v3.0 license.


Credits

psychopy-bids was created with cookiecutter and the py-pkgs-cookiecutter template.

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_bids-2026.1.0.tar.gz (22.6 MB view details)

Uploaded Source

Built Distribution

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

psychopy_bids-2026.1.0-py3-none-any.whl (183.6 kB view details)

Uploaded Python 3

File details

Details for the file psychopy_bids-2026.1.0.tar.gz.

File metadata

  • Download URL: psychopy_bids-2026.1.0.tar.gz
  • Upload date:
  • Size: 22.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for psychopy_bids-2026.1.0.tar.gz
Algorithm Hash digest
SHA256 22d336f7cfc93de518ae760f7a42ebd7d94015f098c9c6622acf7e0f0ca29187
MD5 108d4e28603fc5260eb0557162b219ba
BLAKE2b-256 c50e7afa217b4c430ab7db2d8bfa385b9b637adc09891cb45af6fb415429f00e

See more details on using hashes here.

File details

Details for the file psychopy_bids-2026.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for psychopy_bids-2026.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 917d52273532b070d96718a604769b2fb8a4c3f83fa93b42159b0b4b08d0fa43
MD5 baa0b4bb8e0ed0d6c3d7b627eec89880
BLAKE2b-256 819cdfa9238714f2e88caf6cb3906cafc8980128d52b1b13e638db4501f22ccc

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