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

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

Built distributions (wheels)

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

Total release size: 16.0 MB

Release files / biosig-4.0.1.tar.gz

Download URL biosig-4.0.1.tar.gz
Size 22.9 kB
Tags Source
SHA-256 checksum
How to use checksums
090bda268c5c160d59e39bf963784ca7e803ba74dba0ea283ff0252722a39974
BLAKE2b-256 checksum
How to use checksums
978a31d33afe33b89df486367f944efa354bf1c5a594a595c1897656a428e203
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.1-cp315-cp315-win_amd64.whl

Download URL biosig-4.0.1-cp315-cp315-win_amd64.whl
Size 2.3 MB
Tags CPython 3.15 Windows x86-64
SHA-256 checksum
How to use checksums
e296e196b6a29c820dfb7e95d70bad26920ef827ab500ed69b487285861e85b2
BLAKE2b-256 checksum
How to use checksums
3d465b08e54cb26e523f6e103766a7bdaf596f3c68801f0a59c3904cd828d3c0
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.1-cp314-cp314-win_amd64.whl

Download URL biosig-4.0.1-cp314-cp314-win_amd64.whl
Size 2.3 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
b360b70ec993e1750a64a4dd15b7d77f05a3e273057b615a93d069334f4bea2f
BLAKE2b-256 checksum
How to use checksums
a60271f523c1a3bacce81832e4e089e5912beca110ae23d1655e603390860f83
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.1-cp313-cp313-win_amd64.whl

Download URL biosig-4.0.1-cp313-cp313-win_amd64.whl
Size 2.3 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
adebd71296bf1e9c113fe95e8daa35ef897ccd5441697d4ec812ebb0377c2f30
BLAKE2b-256 checksum
How to use checksums
19eb126ad14407e7c3ed056bec18f34b38149300ecdc1a047e3b711da3b425d6
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.1-cp312-cp312-win_amd64.whl

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

Download URL biosig-4.0.1-cp311-cp311-win_amd64.whl
Size 2.3 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
e0c12bcdb1e3d6355d604cc13c54fb781d2472f05e0e6dc41535be4663f4b2b5
BLAKE2b-256 checksum
How to use checksums
4f908f41e0b51e4b2b72ae3aa7602ddf33a2b36ee44ad123cb59e4af047dfbfa
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.1-cp310-cp310-win_amd64.whl

Download URL biosig-4.0.1-cp310-cp310-win_amd64.whl
Size 2.3 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
1d4b024dcd7b235a758ad6e42db1749461666f68f008e4ad8bbef0dbec53893e
BLAKE2b-256 checksum
How to use checksums
9250b065bda2061072dca2a540c1b0a229ac545ad39d1ea88ea632cb5cd9333f
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.1-cp39-cp39-win_amd64.whl

Download URL biosig-4.0.1-cp39-cp39-win_amd64.whl
Size 2.3 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
3c36903adf3e50945c0d6e98b5aa3b42df71d228c434b67a6c682d2c9eb6aeaa
BLAKE2b-256 checksum
How to use checksums
3e508870c2b966494732f54ec0f4fd7be1388feb5709dcfda22ad3ab9342ab6e
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.1

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