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:
- Open PsychoPy.
- Go to the Tools menu and select Plugin/packages manager.
- Search for
psychopy-bidsin the list. - 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
22d336f7cfc93de518ae760f7a42ebd7d94015f098c9c6622acf7e0f0ca29187
|
|
| MD5 |
108d4e28603fc5260eb0557162b219ba
|
|
| BLAKE2b-256 |
c50e7afa217b4c430ab7db2d8bfa385b9b637adc09891cb45af6fb415429f00e
|
File details
Details for the file psychopy_bids-2026.1.0-py3-none-any.whl.
File metadata
- Download URL: psychopy_bids-2026.1.0-py3-none-any.whl
- Upload date:
- Size: 183.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
917d52273532b070d96718a604769b2fb8a4c3f83fa93b42159b0b4b08d0fa43
|
|
| MD5 |
baa0b4bb8e0ed0d6c3d7b627eec89880
|
|
| BLAKE2b-256 |
819cdfa9238714f2e88caf6cb3906cafc8980128d52b1b13e638db4501f22ccc
|