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.

Download files

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

Source Distribution

biosig-3.9.6.post3.tar.gz (22.7 kB view details)

Uploaded Source

Built Distributions

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

biosig-3.9.6.post3-cp314-cp314-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.14Windows x86-64

biosig-3.9.6.post3-cp313-cp313-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.13Windows x86-64

biosig-3.9.6.post3-cp312-cp312-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.12Windows x86-64

biosig-3.9.6.post3-cp311-cp311-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.11Windows x86-64

biosig-3.9.6.post3-cp310-cp310-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.10Windows x86-64

biosig-3.9.6.post3-cp39-cp39-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.9Windows x86-64

File details

Details for the file biosig-3.9.6.post3.tar.gz.

File metadata

  • Download URL: biosig-3.9.6.post3.tar.gz
  • Upload date:
  • Size: 22.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for biosig-3.9.6.post3.tar.gz
Algorithm Hash digest
SHA256 6874d1f13911745b840bbeed1beb4c44bfeba9b56e5efc40bd22839fe86a0557
MD5 96c2985ba20ab7026a69f5cb71854f67
BLAKE2b-256 df173ac9531b60c4d9a87955bf660743e56d955f4888eae5eb6c03e7d2860897

See more details on using hashes here.

File details

Details for the file biosig-3.9.6.post3-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for biosig-3.9.6.post3-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 fc5be44038ff7e9d223bc8b133271d0475cf9378048fcf731e5a101ae30a9416
MD5 08c53614947751445c7a38c3090c61da
BLAKE2b-256 fcec4345accb32e574cefdf9070a383b1521b493c23372605952b0bbe5162eb1

See more details on using hashes here.

File details

Details for the file biosig-3.9.6.post3-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for biosig-3.9.6.post3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 f63c3438e257611ad36c2cfdb622fe6f7f9e77b6a5e1604c84083546944b4eb3
MD5 e4372168516be1cb997183aaa327649e
BLAKE2b-256 2da13bf7505da64382590f55f22772170a65a72cb2be477ede8de0cb24672fed

See more details on using hashes here.

File details

Details for the file biosig-3.9.6.post3-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for biosig-3.9.6.post3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 44713b78245ab0d94455e59cb24103f9ab8af433336f757a5df75227af5903ee
MD5 77620275906a74074182676b8d892629
BLAKE2b-256 dd1db64dbe4aabca27a44a05b88a66d83bae8d652de5e41f4ff92b6bfe3ddcf6

See more details on using hashes here.

File details

Details for the file biosig-3.9.6.post3-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for biosig-3.9.6.post3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 1c0995a2306f3a7ad65d7317c3cee0b58c68146808e1b5cc37f93d093b347722
MD5 0f066c4a39679754d4731d6228acbebf
BLAKE2b-256 32a8844b1a1ae7b047e24c6abf9a94d3bc7eb3508490d17810714166c04a1922

See more details on using hashes here.

File details

Details for the file biosig-3.9.6.post3-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for biosig-3.9.6.post3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 cff16cb9561d0b1a5ae910f9e28eb5363342ed7dd9e7cb2335977c7dfa0a56c2
MD5 424628e72bff821745475f4dc67f2efe
BLAKE2b-256 529ecffea78e599b755853e9c34ef0a7c31328eb2c343fdff61ec30518f3151d

See more details on using hashes here.

File details

Details for the file biosig-3.9.6.post3-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: biosig-3.9.6.post3-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for biosig-3.9.6.post3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 814d2367261370c760b51e5aebee8d98f672439af4982d9ca1adddefb70662fb
MD5 58857af1fdc25cd880fc16c3c271fdee
BLAKE2b-256 0a4379276fac270a04c8eb10619ceda7a44fb8b0b68f8a25e9a870d89b1199b3

See more details on using hashes here.

Release history Release notifications | RSS feed

3.9.7.post2

7 files

3.9.7

7 files

This release

3.9.6.post3 This release

7 files

3.9.6.post2

7 files

3.9.6

7 files

3.9.5

7 files

3.9.3

7 files

3.9.2

6 files

3.9.1

6 files

3.9.0

6 files

2.6.1

5 files

2.6.0

1 file

2.1.0

6 files

2.0.6

3 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page