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.7.tar.gz (22.6 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.7-cp314-cp314-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.14Windows x86-64

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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.10Windows x86-64

biosig-3.9.7-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.7.tar.gz.

File metadata

  • Download URL: biosig-3.9.7.tar.gz
  • Upload date:
  • Size: 22.6 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.7.tar.gz
Algorithm Hash digest
SHA256 d1a0c57e9bb2fd6d9e2653d16f343e0e73d7422809ea2e99db4f846d8a50debd
MD5 814f128e72dc97028e99f4831b6c0b0e
BLAKE2b-256 c229c405dfb372f3a3d01762e447e9044f5d360bd0662cfed6974545c78ec2dd

See more details on using hashes here.

File details

Details for the file biosig-3.9.7-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: biosig-3.9.7-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: CPython 3.14, 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.7-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 cdbdfdb7d3ac9a37e70c74300a4a99bd2191bea2bf695fe44183fa46ad9824ed
MD5 c1a4dbce6f9c295ec30cc113c26a813b
BLAKE2b-256 2c10f1729d8d3da810cc4a1406faf5464950a1690435a6f5d0e9ad261cc7ce64

See more details on using hashes here.

File details

Details for the file biosig-3.9.7-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: biosig-3.9.7-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: CPython 3.13, 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.7-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 1bef1980b220796de578a1423140c344a56aa2e3469d05c50aa33ac3d8b369ba
MD5 b74444591902fcf497f78220e6f1085a
BLAKE2b-256 9332689779676930cc0cc4f9eed74cd7d15dfe00813b763063edfbb7cce98a66

See more details on using hashes here.

File details

Details for the file biosig-3.9.7-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: biosig-3.9.7-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: CPython 3.12, 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.7-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 49278a4b1014f144f26c8be91d5c49d2d1b16c9af1481ebf4b6acb5c30454e2d
MD5 7ecb1a3556df9893fa9cd976c5b9ab2e
BLAKE2b-256 67a7ca762781cd041894523284e00a40acf563fdf903991fdfa49c55039c0a76

See more details on using hashes here.

File details

Details for the file biosig-3.9.7-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: biosig-3.9.7-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: CPython 3.11, 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.7-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 59d555fb97848e63aaab41d01b0de6859a2e972ce2820cd807c18a0172b8ea98
MD5 7d4ec2d5e3d7da2871731c45795693a8
BLAKE2b-256 544533a41c65627f09e840ccfc54734bf40c8693e862e87c81cd8e86534b2fd1

See more details on using hashes here.

File details

Details for the file biosig-3.9.7-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: biosig-3.9.7-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: CPython 3.10, 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.7-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 53bddb15ef9586749e15eebcbf56b7bbdb672ce35d6fd5b0397064614dbcf430
MD5 7f29e9952ac8bc91b10ead4d712a67e0
BLAKE2b-256 98698ed2e6332588f0b8592eced606a8a142eab50469a3726daef07f29c61be0

See more details on using hashes here.

File details

Details for the file biosig-3.9.7-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: biosig-3.9.7-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.7-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 b51e8497e1d27dc47dc7a444263e4cf6f42eb018c86222714c0b53382c4f86a5
MD5 9cb7d2484c781c07ccdcf5f54123fcaa
BLAKE2b-256 15707e51bb89b41073bd23520fadf3669ffa037da79dc44260bc9829b76a0726

See more details on using hashes here.

Release history Release notifications | RSS feed

3.9.7.post2

7 files

This release

3.9.7 This release

7 files

3.9.6.post3

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