Skip to main content

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

bilab-0.1.5.tar.gz (26.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bilab-0.1.5-py3-none-any.whl (31.1 kB view details)

Uploaded Python 3

File details

Details for the file bilab-0.1.5.tar.gz.

File metadata

  • Download URL: bilab-0.1.5.tar.gz
  • Upload date:
  • Size: 26.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","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

Hashes for bilab-0.1.5.tar.gz
Algorithm Hash digest
SHA256 1e6cceff3453008a8db3d97d0798a3f7db54b19bae61181de6b33a2dbd0d2156
MD5 ac5568de35c197427ae2b2c796e8259e
BLAKE2b-256 552dc2e8bbb65770d57e7daa92e01f48b2685bb7811812513e8a86faccf93aed

See more details on using hashes here.

File details

Details for the file bilab-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: bilab-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 31.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","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

Hashes for bilab-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d7a1692a1161c6ac46d8711565a27fa1bee6af20a76ad54f1afdad91e87c280d
MD5 4a661dbb8067a5e450c540bb66556741
BLAKE2b-256 e23fac3ac6855b720cdaca07563bb19346f7dc837dceeee3bdfe1e9662aa5104

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page