Skip to main content

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 .h5 and .hdf5.
  • bdsp.read_h5(path, raw_digital=False, include_annotations=True, include_features=True) returns a BDSPRecord.
  • BDSPRecord.to_dataframe(resample_fs=200) returns synchronized signal and annotation columns.
  • bdsp.open_h5(path) returns a lazy BDSPH5Reader for slice-based reads.
  • bdsp.compat.sleep_yoda exposes load_standardized_h5 and PSGReader compatibility 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bdsp-0.1.0.tar.gz (24.6 kB view details)

Uploaded Source

Built Distribution

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

bdsp-0.1.0-py3-none-any.whl (23.9 kB view details)

Uploaded Python 3

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

Hashes for bdsp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a47a0e6b20fd454d500ad6c3d1186b62e9875ded238f466f979427e875e72cc1
MD5 cd78fc2bd8c238e3abc04e0f9afd48f3
BLAKE2b-256 ed465e8b8060f55272d289eb58fdbafed8c850ea33d0d42f7619949e377fd0c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for bdsp-0.1.0.tar.gz:

Publisher: publish.yml on bdsp-core/bdsp-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for bdsp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6f471309a64e162cc1db3933677841ad83e2f46f6ab3440799535020aa2a5b0b
MD5 1297c2e1189ae7669cdaeee3034e8845
BLAKE2b-256 4f50e367edaf28bd08f17d4aee13c8fc4f2baace8d045dd724a32b650bf716e4

See more details on using hashes here.

Provenance

The following attestation bundles were made for bdsp-0.1.0-py3-none-any.whl:

Publisher: publish.yml on bdsp-core/bdsp-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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