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.6.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.6-py3-none-any.whl (31.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bilab-0.1.6.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.6.tar.gz
Algorithm Hash digest
SHA256 7dbba1fece68a5ba7947a24ea8f8d0ddaa533e12a7a047e98cbc1446591ab8cc
MD5 e92973d3f3bcb48cdd68a7cb4f490d8a
BLAKE2b-256 fe80549a71c7bf972f23432a538eb77f06afff4eb74b4e49a4ec73d59f10ec1d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bilab-0.1.6-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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 d3d94bcef967f640306b61ceadf58a4dc2b137733de435b643efcce6f595d7bb
MD5 ef5b7fe3706f4c5c4ed01cb154ce1311
BLAKE2b-256 3e105870ca1aee26511bc7e715a84c4f5883c40bb17e65f477f966140893ab1e

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