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).
- Website
- Documentation
- Source Code
- Report Issues
- Contributing Guidelines
- Code of Conduct
- PyPI Package
⚠️ Breaking Changes in v2025 ⚠️
This release introduces breaking changes that may affect your existing workflows. It is highly recommended to always use the same version of psychopy-bids
for experiments that have already been written. If an experiment was created with a specific version of psychopy-bids
(e.g., vX.X.X
), you should continue using that version to ensure compatibility and reproducibility. Only upgrade to a newer version for new experiments.
Please review the following resources for detailed information:
Installation
We recommend installation in a virtual environment.
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. 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
File details
Details for the file psychopy_bids-2025.1.2.tar.gz
.
File metadata
- Download URL: psychopy_bids-2025.1.2.tar.gz
- Upload date:
- Size: 23.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
55ad26226e6cdea189c8a86c83f248e1013df34ea9113fd7d4e66f9b3306f666
|
|
MD5 |
55da56e043a2c3b8ffb098fefe9a8d33
|
|
BLAKE2b-256 |
6379a78233f5c6618e462fcffb83b61eedee6ce4a50d6631851a5ee7e6a47d58
|
File details
Details for the file psychopy_bids-2025.1.2-py3-none-any.whl
.
File metadata
- Download URL: psychopy_bids-2025.1.2-py3-none-any.whl
- Upload date:
- Size: 233.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
6512e08986be1b684ee6b13f856112a86e6128ede1e3b9eaae44421675d0863f
|
|
MD5 |
e57d1b57cd8c5a9168311ead94a12f4e
|
|
BLAKE2b-256 |
2f152016f9f338b030e281a3fac2eee039b912c03bd76e84cdc2e5b39a506f12
|