Skip to main content

Biosig Package

Biosig is a toolbox for processing biomedical signals like ECG, EEG etc. It can read about 50 different data formats including EDF, GDF, BDF, CFS, Heka, ABF, HL7aECG, SCP (EN1064), BrainVision, and many more. The heavy lifting is done in "libbbiosig" the biosig library implemented in C/C++. The Python module of Biosig provides an interface between libbiosig and Python. Currently, two functions are provided, one for reading the data samples, and one for extracting the meta information, like event table, scaling factors, sampling rates, etc.

More information is available at

Installation:

GNU/Linux (Debian, Ubuntu, and family)

  sudo apt install python3-biosig

or if you want to install in your own venv

  sudo apt install libbiosig-dev  # make sure that libbiosig and its prerequisites are in place
  pip install biosig

MacOSX/Homebrew

  brew install biosig             # make sure libbiosig is in place.
  pip install biosig

MS-Windows (Python >=3.9,<=3.14)

  pip install biosig

Other *NIX (Linux, Unix) OS

  • install libbiosig from source (configure && make && make install)
  • pip install biosig

Usage

  import biosig
  import json
  import tomllib

read header/metainformation

  HDR=json.loads(biosig.header(FILENAME))

If some text fields are not ASCII/UTF8 encoded, this might not work. If that is the case, use

	CODEX = 'ISO-8859-15'
	HDR = json.loads(biosig.jsonheader(FILENAME,CODEX))

or

	CODEX = 'ISO-8859-15'
	tomlHDR = biosig.tomlheader(FILENAME,CODEX)
	H2 = tomllib.loads(tomlHDR)
	H2['CHANNEL']

read data

  DATA=biosig.data(FILENAME)

A more elaborate example is this demo

showing

  • how to load data
  • displaying the traces with matplotlib
  • splitting the traces into sweeps

History

In the past there were several attempts of providing Python support. A first attempt using pure python should to be very slow and a lot of implementation effort, only some early version of GDF has been supported. Later, Swig was used for providing a python binding. This was reasonable flexible, and the libbiosig implementation could be mostly used. Disadvantages were the effort to maintain swig.i interface file, which is currently most likely broken. Known issues are string support, lack of Python3 support. Also this attempt is considered deprecated.

The third attempt is using "module extensions". Currently, two functions, one for reading the header information (in JSON format) and one for reading the data samples is provided.

Metadata

Release files for Biosig 4.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Biosig 4.0.0
File Size Uploaded Provenance Actions
biosig-4.0.0.tar.gz 22.9 kB Without provenance Details for biosig-4.0.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for Biosig 4.0.0
File Actions
biosig-4.0.0-cp315-cp315-win_amd64.whl CPython 3.15 CPython 3.15 Windows x86-64 Details for biosig-4.0.0-cp315-cp315-win_amd64.whl
biosig-4.0.0-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details for biosig-4.0.0-cp314-cp314-win_amd64.whl
biosig-4.0.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for biosig-4.0.0-cp313-cp313-win_amd64.whl
biosig-4.0.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for biosig-4.0.0-cp312-cp312-win_amd64.whl
biosig-4.0.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for biosig-4.0.0-cp311-cp311-win_amd64.whl
biosig-4.0.0-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details for biosig-4.0.0-cp310-cp310-win_amd64.whl
biosig-4.0.0-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details for biosig-4.0.0-cp39-cp39-win_amd64.whl

Total release size: 16.0 MB

Release files / biosig-4.0.0.tar.gz

Download URL biosig-4.0.0.tar.gz
Size 22.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6ba8c39f97d7a91c7a211695da6c707236d2999896c4adc36e24675530b02e7a
BLAKE2b-256 checksum
How to use checksums
776ad303a9a66e7496455bd4dd92eb24763a6c2a530a7eb51ee8204a89ef69e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / biosig-4.0.0-cp315-cp315-win_amd64.whl

Download URL biosig-4.0.0-cp315-cp315-win_amd64.whl
Size 2.3 MB
Tags CPython 3.15 Windows x86-64
SHA-256 checksum
How to use checksums
71b73451d45b83065ce3b9215fbccb400a80eba187b6ab5e5f243a120b45d6be
BLAKE2b-256 checksum
How to use checksums
763dad88ef095be67f501b7a2f7f49995dd5388da722828cf3458b6edf41910e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / biosig-4.0.0-cp314-cp314-win_amd64.whl

Download URL biosig-4.0.0-cp314-cp314-win_amd64.whl
Size 2.3 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
f1514d2e4adbe97a3ef86093ef8e92a9948b15b3965eea820d1cbddf62058940
BLAKE2b-256 checksum
How to use checksums
eabb717f67a15361f4e0ebd28ab57bac79efff1d3e13ca949d341480553b2b6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / biosig-4.0.0-cp313-cp313-win_amd64.whl

Download URL biosig-4.0.0-cp313-cp313-win_amd64.whl
Size 2.3 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
efed06c3b7946830e71fa3f7c7594d60be39d871cb8292c644e4540bef1b9a9c
BLAKE2b-256 checksum
How to use checksums
d62028131f3659661a54c2aff57950a18604613e18b93f5794686581fef04bbd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / biosig-4.0.0-cp312-cp312-win_amd64.whl

Download URL biosig-4.0.0-cp312-cp312-win_amd64.whl
Size 2.3 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
b9ee3ac5a802d26a09a9d5b8efa09978ad4eb8a9f9496d76a10b2f29b6073402
BLAKE2b-256 checksum
How to use checksums
94e33adbd6c06e9a5427740c63b48df65d8b02ddcab8820c5979922996295fd0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / biosig-4.0.0-cp311-cp311-win_amd64.whl

Download URL biosig-4.0.0-cp311-cp311-win_amd64.whl
Size 2.3 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
49b2be7c061e533e04cee34406605549e74bda9e532bad8c1a248e3fcd16e17d
BLAKE2b-256 checksum
How to use checksums
1dcca655323965607c48817d98b73bccd1decc17a184b12ba177c68ddd419f7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / biosig-4.0.0-cp310-cp310-win_amd64.whl

Download URL biosig-4.0.0-cp310-cp310-win_amd64.whl
Size 2.3 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
e5f6ef6d0f366a5835bab3d9c0182cf46e1d585da0156708a7ff22ee50bc64f9
BLAKE2b-256 checksum
How to use checksums
8e9abdccfa823c6d8fef8402d64cefdedca9fb54878b6fdc7b00cbca38c908ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / biosig-4.0.0-cp39-cp39-win_amd64.whl

Download URL biosig-4.0.0-cp39-cp39-win_amd64.whl
Size 2.3 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
8807cee60c4881793c264c37a00c1d5e2fb1178d879684a342e8842089debf35
BLAKE2b-256 checksum
How to use checksums
05e050c49f588cfc661f6b4694ee21530f44fa99dfc64afa4ec9443895519949
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Security for Biosig 4.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page