Scripts for acoustic stimulus presentation with open-ephys
Project description
This project contains scripts and python libraries used by the Meliza Lab to run auditory neurophysiology experiments on the open-ephys GUI. The functionality was later expanded to support other data acquisition systems, but the name was kept the same.
Stimuli are read from monaural sound files (e.g. wave format) and played through a sound card on the first (typically left) channel. A synchronization click is added at the start of the stimulus on the second channel. Before starting playback, the script notifies open-ephys over its ZMQ channel to begin recording, and tells it to stop after playback has ended. A single long recording is generated, but can be split up later based on the synchronization clicks.
If the sound card has more than two output channels, pulses can also be emitted on the third channel a user-defined amount of time before the stimulus onset.
Note that the synchronization clicks will be audio line-level, and that many sound cards have a highpass filter that will cause a square pulse to slowly decay back to baseline. If necessary, a Schmitt trigger can be used to transform the sync and trigger signals into TTL-level square pulses.
Installation
The recommended way to install open-ephys-audio is using pipx, which will create a dedicated virtual environment for the script and expose the oeaudio-present command on your path. Run pipx install open-ephys-audio and you should be good to go.
Example
oeaudio-present --buffer-size=100 -a tcp://localhost:5556 -d /home/melizalab/open-ephys/ -k animal=P168 -k experimenter=smm3rc -k experiment=chorus -k hemisphere=R -k pen=2 -k site=2 -k x=-1175 -k y=-861 -k z=-2400 -S 1022 stimuli/msyn-noise-v2/*.wav
This command will play all the wave files in the stimuli/msyn-noise-v2 directory. All of the -k arguments will be stored in the open-ephys recording as metadata. If you don’t want to record (e.g., while searching for units), you can run something like this:
oeaudio-present --loop --gap 5 ../songs/*.wav
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
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 open_ephys_audio-0.1.9.tar.gz.
File metadata
- Download URL: open_ephys_audio-0.1.9.tar.gz
- Upload date:
- Size: 50.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97603aaa978ef66d9c26113dcd1bc59bb2bac965ef791b93aa7ea9fc217ba2e6
|
|
| MD5 |
a551fdeaa485df02b9c93ab3e7f30543
|
|
| BLAKE2b-256 |
d26544a1e33c2608378f8e5d35bcc2f9fb34b32aa96e7a1ff3a02952bbc0c499
|
Provenance
The following attestation bundles were made for open_ephys_audio-0.1.9.tar.gz:
Publisher:
publish-to-pypi.yml on melizalab/open-ephys-audio
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
open_ephys_audio-0.1.9.tar.gz -
Subject digest:
97603aaa978ef66d9c26113dcd1bc59bb2bac965ef791b93aa7ea9fc217ba2e6 - Sigstore transparency entry: 1968157038
- Sigstore integration time:
-
Permalink:
melizalab/open-ephys-audio@27cc0e3c3b023ff059ca3d7006d7692679144597 -
Branch / Tag:
refs/tags/v0.1.9 - Owner: https://github.com/melizalab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@27cc0e3c3b023ff059ca3d7006d7692679144597 -
Trigger Event:
push
-
Statement type:
File details
Details for the file open_ephys_audio-0.1.9-py3-none-any.whl.
File metadata
- Download URL: open_ephys_audio-0.1.9-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58b5c197ad2f693533e4c4cde608aab1b0d533ec4edd7adc37774ae34d7fc7b5
|
|
| MD5 |
c1ee78d1b38d3ba4b03c65d2d51bd51b
|
|
| BLAKE2b-256 |
f7c45de6fbc5fefa113790ce843912f1a443bd7627508d91eb5adad02274040d
|
Provenance
The following attestation bundles were made for open_ephys_audio-0.1.9-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on melizalab/open-ephys-audio
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
open_ephys_audio-0.1.9-py3-none-any.whl -
Subject digest:
58b5c197ad2f693533e4c4cde608aab1b0d533ec4edd7adc37774ae34d7fc7b5 - Sigstore transparency entry: 1968157124
- Sigstore integration time:
-
Permalink:
melizalab/open-ephys-audio@27cc0e3c3b023ff059ca3d7006d7692679144597 -
Branch / Tag:
refs/tags/v0.1.9 - Owner: https://github.com/melizalab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@27cc0e3c3b023ff059ca3d7006d7692679144597 -
Trigger Event:
push
-
Statement type: