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 3.9.8

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 3.9.8
File Size Uploaded
biosig-3.9.8.tar.gz 22.9 kB Details

Built distributions (wheels)

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

Total release size: 13.8 MB

Release files / biosig-3.9.8.tar.gz

Download URL biosig-3.9.8.tar.gz
Size 22.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7a894a866c197ec1dc2b72320cbee0802927a403065c727ded6700540119377c
BLAKE2b-256 checksum
How to use checksums
2a8eaebb7be3278cd8a458b256352f925c832762bcdc1be15bffe1b62e26eb73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / biosig-3.9.8-cp314-cp314-win_amd64.whl

Download URL biosig-3.9.8-cp314-cp314-win_amd64.whl
Size 2.3 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
f73747e3eed5fde32b49e49e25d167d358c43e29a111875d93d2a566c6e33ce4
BLAKE2b-256 checksum
How to use checksums
6732d3e319373a151711710b52d98af739c8ef62aafedbcecf6b4f85f2bb1581
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / biosig-3.9.8-cp313-cp313-win_amd64.whl

Download URL biosig-3.9.8-cp313-cp313-win_amd64.whl
Size 2.3 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
ad8d1082313a44ce3fa8c1543b08bf985cf2577a0f8ddd39fe6b9746a88a8946
BLAKE2b-256 checksum
How to use checksums
fd532d5a51abf32c0af389f3c889f12092055b5a24792222dd9dd368cef21866
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / biosig-3.9.8-cp312-cp312-win_amd64.whl

Download URL biosig-3.9.8-cp312-cp312-win_amd64.whl
Size 2.3 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
b9cb2da575890306a9214b002251551929313d32ee6bdcd5d2e46ca7bfe3c043
BLAKE2b-256 checksum
How to use checksums
ce0c3057dd83aeee603b86681056675463d0de1cd8f766353fa49f46dfd6a859
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / biosig-3.9.8-cp311-cp311-win_amd64.whl

Download URL biosig-3.9.8-cp311-cp311-win_amd64.whl
Size 2.3 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
d602264458014f97a5e716d0c4957ced560b3e2d9e76bd684f47f3114474c09f
BLAKE2b-256 checksum
How to use checksums
02b54df78056eb8715d00a839fdf5513cd702ccf493c687e75a7b6af58880a03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / biosig-3.9.8-cp310-cp310-win_amd64.whl

Download URL biosig-3.9.8-cp310-cp310-win_amd64.whl
Size 2.3 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
fe7fe3b933f1fa98cdf994a9a43adedd12fd25bebf7b3b5cf58a6b9f46597415
BLAKE2b-256 checksum
How to use checksums
1bbde84ec5d74cb2ef56f84eb5346e749a4d3d5cedc19058a7152dc498a05dbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / biosig-3.9.8-cp39-cp39-win_amd64.whl

Download URL biosig-3.9.8-cp39-cp39-win_amd64.whl
Size 2.3 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
ebc8e21e1bf0d57d275f481c238acd7bcac830acd42345c86a85e809dd272f17
BLAKE2b-256 checksum
How to use checksums
5053b8f5ad89f928fe8519f8e48e1b64be8f4d5e6e82d63ba8d2ddbeb10dc412
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

3.9.8 This release

7 release files

3.9.7

7 release files

3.9.6

7 release files

3.9.5

7 release files

3.9.3

7 release files

3.9.2

6 release files

3.9.1

6 release files

3.9.0

6 release files

2.6.1

5 release files

2.6.0

1 release file

2.1.0

6 release files

2.0.6

3 release files

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