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

Uploaded CPython 3.14Windows x86-64

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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.10Windows x86-64

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

File metadata

  • Download URL: biosig-3.9.7.post2.tar.gz
  • Upload date:
  • Size: 22.9 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.post2.tar.gz
Algorithm Hash digest
SHA256 6c2e7b51a635ac090c3a7a54dacdf02a8e418dbd143fe15c3c2e3b9bebed24c1
MD5 daa8b2f4ee509907cc952a44c12eee55
BLAKE2b-256 b440062a617269e428eeb39b1457d8481904bb615b7c33205050c2edfdbb0cee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for biosig-3.9.7.post2-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 52c808e506c0e299b9baee2f026afa50851d1699d1af304ba1b627bc36260f94
MD5 10bcdffdfe349594e06d6cca4d107a1f
BLAKE2b-256 5e3b59b378a1667ccf24dd944e364b9efb97b35628d8c6a2e2dfb114f5c9f853

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for biosig-3.9.7.post2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 5603c51f8791efbfbc02cffc7acef12b2d2838aa46944f00995422f365cd1f36
MD5 3321ce4d7e87bdad40716c19a586013b
BLAKE2b-256 5363141839a3b67d0666db3ead98dae6b135b2feb76e036b563f81bd481d40d9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for biosig-3.9.7.post2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 2da74426147eb4bb3a1f7f045cfd42ffeef728200d943ee0de5e3a9d7f50435a
MD5 172f997863db66def2be63385da35492
BLAKE2b-256 08d2fc127ce17450f22cb4cbe1216d47161d21c8a5612b5a9811758b74a08937

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for biosig-3.9.7.post2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e09fb1a7f1de45ede111e1c27f3a2cecdcac15b27c1bfed341452ca214e50834
MD5 f4d19db45eaf8dd806f6e479521752d2
BLAKE2b-256 bf94aea09cf9ce76582e0271f87e47474c516461eddd286fdbfe065374fcb145

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for biosig-3.9.7.post2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c6a4d6fa0b845ccd1308bbbe63199b623ae9f9280269321c93bc8dc51901e17c
MD5 9e4a70b23e9170f0a35b1a8826df101c
BLAKE2b-256 c2c1e791bf655a9a3dbf636615485d03ac906d738a5fe6a91a02d954a85e4231

See more details on using hashes here.

File details

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

File metadata

  • Download URL: biosig-3.9.7.post2-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.post2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 41bfc0821e308fb12b633285b0d13aa9edf7f0334053a9d387333920e759a378
MD5 06fb53b7e308d9d1b18ca1f72a79715a
BLAKE2b-256 e915812f9cbcc4e4ad4ce76df55119606d393cd5cdc5961665d490535ef7b035

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

3.9.7.post2 This release

7 files

3.9.7

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