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.15)

  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.3

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.3
File Size Uploaded Provenance Actions
biosig-4.0.3.tar.gz 22.9 kB Without provenance Details for biosig-4.0.3.tar.gz

Built distributions (wheels)

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

Total release size: 16.0 MB

Release files / biosig-4.0.3.tar.gz

Download URL biosig-4.0.3.tar.gz
Size 22.9 kB
Tags Source
SHA-256 checksum
How to use checksums
518780d793cd5ba6eefe2a6d9694289b1d8be68acac29d7bf785b815141c5da0
BLAKE2b-256 checksum
How to use checksums
5a2f4c3da206f739d64c7c0ca828389293ab34a0f67b7576fc08f1d854662e91
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.3-cp315-cp315-win_amd64.whl

Download URL biosig-4.0.3-cp315-cp315-win_amd64.whl
Size 2.3 MB
Tags CPython 3.15 Windows x86-64
SHA-256 checksum
How to use checksums
10694436a5480b16974254be41cd119daeeeb51b03fe8920fa96538ee2ef1940
BLAKE2b-256 checksum
How to use checksums
4bf461cbcf8fd87ae2ad97d0a7542eed8c3cf0094b1829b6d16cfd1ba3a68dd7
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.3-cp314-cp314-win_amd64.whl

Download URL biosig-4.0.3-cp314-cp314-win_amd64.whl
Size 2.3 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
073bece9858d6d28ef9bdeb7e8561e3b3d299d90581932b4910ca04bdf54bec7
BLAKE2b-256 checksum
How to use checksums
944d25da072bddaedac5d98e2fb437cea9905459f51a282bfa9d1984059b6a49
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.3-cp313-cp313-win_amd64.whl

Download URL biosig-4.0.3-cp313-cp313-win_amd64.whl
Size 2.3 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
f24a28fb560b48c6f1b5fa37626d0c12a30333f2d68f5a122e16ff9901c0cb3b
BLAKE2b-256 checksum
How to use checksums
0294383642ea3e946a05c800072f7e5297434d1896edf176c59cece6b331cb42
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.3-cp312-cp312-win_amd64.whl

Download URL biosig-4.0.3-cp312-cp312-win_amd64.whl
Size 2.3 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
f6b48ca7579316ab197902959be40b89d55624c6337b6755b16a4290cb8df9c8
BLAKE2b-256 checksum
How to use checksums
062b2541bc67159d07b0d38c723ac3d1115b5caaa0ac5b1c2c91830857ff819c
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.3-cp311-cp311-win_amd64.whl

Download URL biosig-4.0.3-cp311-cp311-win_amd64.whl
Size 2.3 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
bb1b1e0fe9779dd6b6b8d329e23f640204073ca2167ec8716a325a8f5bda3cfd
BLAKE2b-256 checksum
How to use checksums
fb71afdc776679d4c3912bcaa036fbf1e5a3d161191c69ad68376e094ed2db4c
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.3-cp310-cp310-win_amd64.whl

Download URL biosig-4.0.3-cp310-cp310-win_amd64.whl
Size 2.3 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
c87f47b50e05f30d9934365f770b96686206046165ecb28756317348315a86ac
BLAKE2b-256 checksum
How to use checksums
fe08c9aea4e2f4f3a43e75577ee3e56ef0c8aa06b5abe7a5937104acdad38523
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.3-cp39-cp39-win_amd64.whl

Download URL biosig-4.0.3-cp39-cp39-win_amd64.whl
Size 2.3 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
0069bb02991f160d29f4aeea2c7c677a10ba75ed134f51ac2524639079c17a29
BLAKE2b-256 checksum
How to use checksums
24a2bd7f6a1be0b40f42d138859b7855b083e6a2c46bb8d65f3716cb86f7a3f8
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.3

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