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

Uploaded CPython 3.14Windows x86-64

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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.10Windows x86-64

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

File metadata

  • Download URL: biosig-3.9.6.post2.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.post2.tar.gz
Algorithm Hash digest
SHA256 8a848b5701a412b5f60a01efe7d50cbea3420e0b94efc4f1611bdc74470907c2
MD5 8e188e48f47ab8e131641df4491a06c1
BLAKE2b-256 ecd30bbcd9daec246dd2a3fe9cdf1ef7b943629933de12bafcd0870c677576bb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for biosig-3.9.6.post2-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 bf4349601439348aabecc43f1ba062baca10cb1e7b694b4d31db41c5815af4c4
MD5 906e3a69914a601316ce4077cf9de4ba
BLAKE2b-256 e8d03f9d9d4c6cc84113e1e11e0337be4b7e93f59a72027ec12eae7f7ccb38f6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for biosig-3.9.6.post2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 5652b8ef7af21f25da6082e6919caae5ac9d86cd11cddc297b647594c0caa2ab
MD5 927d04e5731793b5e1f6636a671db089
BLAKE2b-256 bd28abe8f5f3a3691124394dc92c6c6f89f0b920da0921d6d462534611391610

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for biosig-3.9.6.post2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 be46c6222d73e0ff61ff955b6d39f7dd6c1242842fba0673eea54c1fc6b2f8cd
MD5 a666679fc73f79e47138304b542faecc
BLAKE2b-256 57e7df95264a06554da886ace92235c69be97f5e5894de81a4d32e50cd9822ab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for biosig-3.9.6.post2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a99f7760655124ddf5d037b845bd555d97dbc491ce9065a2c4432b21d305d43e
MD5 e1b6c1840ff6c862c33086a393372609
BLAKE2b-256 c98e59a7baa3dc5a63555bc136a89a0ac56e8975f80f2a62105c2d42ea417ff1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for biosig-3.9.6.post2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 acd187c7bc740ba4b9ab91221f51cb67256eb2007c8e9326116aba005df9b9b1
MD5 38220317f00557706364eb9a0920f1b1
BLAKE2b-256 5823155e8047f0df3c96649929038af80ec365982167a1d11416c43bf973e89f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for biosig-3.9.6.post2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 c9b7dc84f0904f980ed9813a1104d1a4682fc3f94b6254302b86e4ea640e60d0
MD5 3557326879bb0e4d59367400509622d0
BLAKE2b-256 477f1e235f06fd6c0932eca17b41e97fc6556c980946a2820be4f9fcabf157a9

See more details on using hashes here.

Release history Release notifications | RSS feed

3.9.7.post2

7 files

3.9.7

7 files

3.9.6.post3

7 files

This release

3.9.6.post2 This release

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