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

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

Built distributions (wheels)

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

Total release size: 16.0 MB

Release files / biosig-4.0.2.tar.gz

Download URL biosig-4.0.2.tar.gz
Size 22.9 kB
Tags Source
SHA-256 checksum
How to use checksums
abb002fb91d2dfdb33a819b01bec451ca854bf971c17fffd614d1e06c7cfaf3b
BLAKE2b-256 checksum
How to use checksums
b229cedcd652d01043548c79c698541534e9635caa4bc7aea71abcd460705a2b
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.2-cp315-cp315-win_amd64.whl

Download URL biosig-4.0.2-cp315-cp315-win_amd64.whl
Size 2.3 MB
Tags CPython 3.15 Windows x86-64
SHA-256 checksum
How to use checksums
6a2c2c3b443fc79da2413e0c759bf2e4ab30c928744d144700d73a8810dd1a26
BLAKE2b-256 checksum
How to use checksums
f348ac5c3e7bf356c494f1c19fd89a0928d0ceb817cbbe3381ebacf5f316dfbe
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.2-cp314-cp314-win_amd64.whl

Download URL biosig-4.0.2-cp314-cp314-win_amd64.whl
Size 2.3 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
0b6296c3a272be5b955b7b5e8a0559e00cc737d3056e84d036d15da480a7a7d4
BLAKE2b-256 checksum
How to use checksums
56dd3d6e08d19e07c7e2c305ed9366e9d22383c26d47d9454eb90c519836e0c6
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.2-cp313-cp313-win_amd64.whl

Download URL biosig-4.0.2-cp313-cp313-win_amd64.whl
Size 2.3 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
3a844dcb7a431cc95a47ba74a1078516e014857ba60de21f39e9ea370ae75828
BLAKE2b-256 checksum
How to use checksums
ff8af8a6f945febdb781990074a6c991247f197a313c4b1ac6274e03d0811b44
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.2-cp312-cp312-win_amd64.whl

Download URL biosig-4.0.2-cp312-cp312-win_amd64.whl
Size 2.3 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
8b520bb100f4c29a994da0784dbb0835b62f147e77235a8949d074fca6370aed
BLAKE2b-256 checksum
How to use checksums
2be662465b000970e68b7439b308765f0b697392a03811ba941b6b6e4f613eda
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.2-cp311-cp311-win_amd64.whl

Download URL biosig-4.0.2-cp311-cp311-win_amd64.whl
Size 2.3 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
ace8c2d5b26a3d8a75a1fee77b1ae68398a6082aa7efa9909e551e6fd76b961f
BLAKE2b-256 checksum
How to use checksums
cf2706b0162de60a06cb462a979625d7274546523a9bc829c2d75a384ce4f4f3
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.2-cp310-cp310-win_amd64.whl

Download URL biosig-4.0.2-cp310-cp310-win_amd64.whl
Size 2.3 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
eec36dd5f8dbe668ea64d2a30f79e21a8ea6b7e4c81c9beaac702cc757d7f31d
BLAKE2b-256 checksum
How to use checksums
bbd5df5c2c6f7aae4cb53c8e7360a701dc2bc9d67a29a802704d23a5f43f539c
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.2-cp39-cp39-win_amd64.whl

Download URL biosig-4.0.2-cp39-cp39-win_amd64.whl
Size 2.3 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
0508634dc7e0920674c09a9befdf18052b12856fa12ee35d9b000d3b0cd4c4cd
BLAKE2b-256 checksum
How to use checksums
96ee7859fb872f9ac3080b025cf45603a7ab796be7e9c8f54162a5bac2ff1862
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.2

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