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.15)

  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.3.post2

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

Built distributions (wheels)

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

Total release size: 16.0 MB

Release files / biosig-4.0.3.post2.tar.gz

Download URL biosig-4.0.3.post2.tar.gz
Size 22.9 kB
Tags Source
SHA-256 checksum
How to use checksums
0f472c1d22160ecbc21c5dda15fd45dc96dd4a3d1415a630acb93f6222af3baf
BLAKE2b-256 checksum
How to use checksums
7173073298bee4a59ecaf4b4ee1518e9aca0f115dbdbb86d16f5b17433c9cbd1
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.3.post2-cp315-cp315-win_amd64.whl

Download URL biosig-4.0.3.post2-cp315-cp315-win_amd64.whl
Size 2.3 MB
Tags CPython 3.15 Windows x86-64
SHA-256 checksum
How to use checksums
9b91b2a17eb56a04cb585db4faaa7fcce320cfc496965c8acc3287dd38db540f
BLAKE2b-256 checksum
How to use checksums
68f77505e2a57a709ae5c093fbb60c6836537548315d85944202beb329467ecb
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.3.post2-cp314-cp314-win_amd64.whl

Download URL biosig-4.0.3.post2-cp314-cp314-win_amd64.whl
Size 2.3 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
2404ebe25941dec76bc7ec1f22706bedc0a28f34da732e7c1b11e1c38bc628f9
BLAKE2b-256 checksum
How to use checksums
07c47888020df0f92dcf4e38f2e943352fefdc293416085c4b47f2246ad29cf2
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.3.post2-cp313-cp313-win_amd64.whl

Download URL biosig-4.0.3.post2-cp313-cp313-win_amd64.whl
Size 2.3 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
5c3dc797adce159e7680a661deaaa0aa1d9ee95d40c7cf48e9744b4e2e429180
BLAKE2b-256 checksum
How to use checksums
7af0d12f7b15cc0afdd99f41c5ff9fd86372ecf57aabc4b3d3a8d25749c3c149
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.3.post2-cp312-cp312-win_amd64.whl

Download URL biosig-4.0.3.post2-cp312-cp312-win_amd64.whl
Size 2.3 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
1597c0aae5cb08625e65b0bbae941da426ae47bb7a35de8743d4a082d6a15644
BLAKE2b-256 checksum
How to use checksums
3833e04e23207655d319620700d600ff8d2997c85afcf9dd673cef47c8110432
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.3.post2-cp311-cp311-win_amd64.whl

Download URL biosig-4.0.3.post2-cp311-cp311-win_amd64.whl
Size 2.3 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
5c8dc83b85a4dd150973c510a2fd1587d19430aaf1132c9f1a708af785792904
BLAKE2b-256 checksum
How to use checksums
7415ab98a6e7b279fbbe7d7da4e511b496336610dd3fdeddedc69ba6deda4b7d
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.3.post2-cp310-cp310-win_amd64.whl

Download URL biosig-4.0.3.post2-cp310-cp310-win_amd64.whl
Size 2.3 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
78c0bd43527a3113b8b525034758c4cd0309cf70330406b93f230031f53f0684
BLAKE2b-256 checksum
How to use checksums
160435a598a32569b59a3ccf583314f634974a37101b3ffefc8aeb0aec666b2c
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.3.post2-cp39-cp39-win_amd64.whl

Download URL biosig-4.0.3.post2-cp39-cp39-win_amd64.whl
Size 2.3 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
6de4086f06595339cee6a502d22e5660ba726c70a39371a1cc4a86fe234ab9fa
BLAKE2b-256 checksum
How to use checksums
fb0653928ccc6093fe82922001ff609e214eeb8b99fb327c8e4fc7339328a282
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.3.post2

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