Reader-first Python tools for BDSP/Sleep YODA HDF5 data.
Project description
BDSP Python Reader
Reader-first Python package for BDSP/Sleep YODA standardized HDF5 data.
import bdsp
record = bdsp.read_h5("/path/to/study.h5")
record.signals["c3-m2"]
record.metadata
record.annotations
record.features
record.channel_info
df = record.to_dataframe(resample_fs=200)
with bdsp.open_h5("/path/to/study.h5") as reader:
x, t = reader.read_signal("c3-m2", start=60, duration=30)
Scope
Version 0.1 reads BDSP/Sleep YODA H5 files. It intentionally does not include EDF conversion, S3 downloading, GUI code, model inference, report generation, or feature computation.
API
bdsp.read(path, **kwargs)dispatches to the H5 reader for.h5and.hdf5.bdsp.read_h5(path, raw_digital=False, include_annotations=True, include_features=True)returns aBDSPRecord.BDSPRecord.to_dataframe(resample_fs=200)returns synchronized signal and annotation columns.bdsp.open_h5(path)returns a lazyBDSPH5Readerfor slice-based reads.bdsp.compat.sleep_yodaexposesload_standardized_h5andPSGReadercompatibility aliases.
Development
python -m pip install -e ".[test]"
pytest
The project metadata requires Python 3.10+. The reader source itself is kept
small and depends only on h5py, numpy, pandas, and scipy.
License
This package is licensed under the Apache License, Version 2.0.
Project details
Release history Release notifications | RSS feed
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 bdsp-0.1.0.tar.gz.
File metadata
- Download URL: bdsp-0.1.0.tar.gz
- Upload date:
- Size: 24.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a47a0e6b20fd454d500ad6c3d1186b62e9875ded238f466f979427e875e72cc1
|
|
| MD5 |
cd78fc2bd8c238e3abc04e0f9afd48f3
|
|
| BLAKE2b-256 |
ed465e8b8060f55272d289eb58fdbafed8c850ea33d0d42f7619949e377fd0c7
|
Provenance
The following attestation bundles were made for bdsp-0.1.0.tar.gz:
Publisher:
publish.yml on bdsp-core/bdsp-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bdsp-0.1.0.tar.gz -
Subject digest:
a47a0e6b20fd454d500ad6c3d1186b62e9875ded238f466f979427e875e72cc1 - Sigstore transparency entry: 1854335216
- Sigstore integration time:
-
Permalink:
bdsp-core/bdsp-python@1a35ad079ba01ed1d03ab05a26a6705d6cee1427 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/bdsp-core
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1a35ad079ba01ed1d03ab05a26a6705d6cee1427 -
Trigger Event:
push
-
Statement type:
File details
Details for the file bdsp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: bdsp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 23.9 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 |
6f471309a64e162cc1db3933677841ad83e2f46f6ab3440799535020aa2a5b0b
|
|
| MD5 |
1297c2e1189ae7669cdaeee3034e8845
|
|
| BLAKE2b-256 |
4f50e367edaf28bd08f17d4aee13c8fc4f2baace8d045dd724a32b650bf716e4
|
Provenance
The following attestation bundles were made for bdsp-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on bdsp-core/bdsp-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bdsp-0.1.0-py3-none-any.whl -
Subject digest:
6f471309a64e162cc1db3933677841ad83e2f46f6ab3440799535020aa2a5b0b - Sigstore transparency entry: 1854335244
- Sigstore integration time:
-
Permalink:
bdsp-core/bdsp-python@1a35ad079ba01ed1d03ab05a26a6705d6cee1427 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/bdsp-core
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1a35ad079ba01ed1d03ab05a26a6705d6cee1427 -
Trigger Event:
push
-
Statement type: