A data API for the Brain Interfacing Laboratory
Project description
BIL Data Python API
This is a Python API for accessing and analyzing neural data from the Brain Interfacing Laboratory. The public deposition is at the Stanford Digital Repository (SDR).
Installation
pip install bilab
Data Availability
The bilab package is an API for interacting with publicly deposited data. In that directory, each recording session has its own identifier under the data directory. For instance, "U201130_01" is the first session by subject U on 2020-11-30.
This is a public distribution of an internal API, and not all data types are publicly available for all sessions. Public datasets are deposited incrementally. The API contains methods for signals that will raise a FileNotFoundError if those signals have not been published. The deposition is growing incrementally to permit reproduction and extension upon published results.
Quickstart
See demo/md/quickstart.md.
from bil.api import get
# Initialize a study using a session ID
# Data will be fetched over HTTPS from the Stanford Digital Repository
study = get("U201130_01", download_dir="my_data")
# Access trial metadata
print(f"Number of trials: {len(study)}")
df = study.df
# Get a span of data for the first trial
# This is an accessor for a continuous segment of time
span = study.spans[0]
# Retrieve LFP data from that period of time from the Utah array in motor cortex
# This well get deposited in my_data/U201130_01
lfp = span.lfp(region="m1") # (96, T) ndarray
Contributing
This is a public distribution of an internal API; at this time, development is proceeding internally.
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 bilab-0.1.4.tar.gz.
File metadata
- Download URL: bilab-0.1.4.tar.gz
- Upload date:
- Size: 27.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b346c0b66173aea8faf8da547d2f5a94a69afe30838fdc2e3a175d40963bd2c3
|
|
| MD5 |
04dda4579f8697649681fe196847dd40
|
|
| BLAKE2b-256 |
7e789f1de9bc5e0ae6fcf2472d45d01549a34c420365551cbf96bb062f8cae87
|
File details
Details for the file bilab-0.1.4-py3-none-any.whl.
File metadata
- Download URL: bilab-0.1.4-py3-none-any.whl
- Upload date:
- Size: 33.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5909948342e0a7f40ddd3c60906f73530974ee413e52b1e225e485179248ea65
|
|
| MD5 |
39b01031a97b144f7cd5d238abca54b8
|
|
| BLAKE2b-256 |
e4e8e2387644d6a1df9a6f4cc573f70dfc6c7527a4d9c354df3f3ade0d68fa9d
|