pbl-exp
Useful helper functions for running experiments at the Predictive Brain Lab (Bochum).
Overall, the philosophy is to provide simple and convenient tools for running experiments while logging events and experimental information. This includes the use of PsychoPy GUI dialogs for user input and configuration.
This repository also provides examples for how to use these helper functions.
Installation
pip install pbl-exp
Usage
Conveniently connect to a Pupil Labs device and send events
from PBL.exp import get_pupil_labs_device
device, median_offset_ns = get_pupil_labs_device()
This will open a dialog asking you:
- Whether you want to connect to a Pupil Labs device.
- Which device to connect to if multiple devices are available.
If a device is selected, the function will return the device object and estimate the median clock offset in nanoseconds. If no device is selected, it will return None for both.
The clock offset can then be used to send events to the Pupil Labs device with corrected timestamps. For example:
from PBL.exp import send_event_to_pupil_labs
send_event_to_pupil_labs(device, "event_name", median_offset_ns)
This event can also be called with device is None, which simplifies testing and debugging. In this case, the function will not attempt to send the event to any device but will still log the event with the provided timestamp.
Metadata
Release files for pbl-exp 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pbl_exp-0.2.tar.gz | 8.3 kB | With provenance | Details for pbl_exp-0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pbl_exp-0.2-py3-none-any.whl | Python 3 | none | any | Details for pbl_exp-0.2-py3-none-any.whl |
Total release size: 13.0 kB
Release files / pbl_exp-0.2.tar.gz
| Download URL | pbl_exp-0.2.tar.gz |
|---|---|
| Size | 8.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
581460a5d742d450efddb07aa9cdd2ba34651f6bf712600cfe50e76e4768457a
|
|
BLAKE2b-256 checksum How to use checksums |
76c764c31770a6ddc3b7de48231725042b2fcb94263436e4f64386e41bb623bb
|
| 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 Nov 1, 2026.
Transparency logRelease files / pbl_exp-0.2-py3-none-any.whl
| Download URL | pbl_exp-0.2-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
748598714d88f785b2eaf8d09c57ddad4c5f33b43a372f9fcab7ca256b6b2ab3
|
|
BLAKE2b-256 checksum How to use checksums |
eda0e20cf424296d2b13952b2b871ed7b6d5f100f770d872989ab5584f88001a
|
| 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 Nov 1, 2026.
Transparency logSecurity for pbl-exp 0.2
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.
Attestation for pbl_exp-0.2.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 Nov 1, 2026.
Transparency logA 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.