Skip to main content

library to read/write EDF+/BDF+ files

Project description

https://codecov.io/gh/holgern/pyedflib/branch/master/graph/badge.svg https://travis-ci.org/holgern/pyedflib.svg?branch=master https://ci.appveyor.com/api/projects/status/49wwigslgtj288q1?svg=true https://readthedocs.org/projects/pyedflib/badge/?version=latest https://api.codacy.com/project/badge/Grade/a80bc8bdb6a342be83b9d03138bfd078 https://anaconda.org/conda-forge/pyedflib/badges/installer/conda.svg https://anaconda.org/conda-forge/pyedflib/badges/version.svg https://anaconda.org/conda-forge/pyedflib/badges/downloads.svg

What is pyEDFlib

pyEDFlib is a python library to read/write EDF+/BDF+ files based on EDFlib.

EDF means European Data Format and was firstly published Kemp1992. In 2003, an improved version of the file protokoll named EDF+ has been published and can be found at Kemp2003.

The EDF/EDF+ format saves all data with 16 Bit. A version which saves all data with 24 Bit, was introduces by the compony BioSemi.

The definition of the EDF/EDF+/BDF/BDF+ format can be found under edfplus.info.

This python toolbox is a fork of the toolbox from Christopher Lee-Messer and uses the EDFlib from Teunis van Beelen. The EDFlib is able to read and write EDF/EDF+/BDF/BDF+ files.

Documentation

Documentation is available online at http://pyedflib.readthedocs.org.

Installation

pyEDFlib can be used with Python >=3.5. It depends on the Numpy package. To use the newest source code from git, you have to download the source code. You need a C compiler and a recent version of Cython. Go then to the source directory and type:

python setup.py build
python setup.py install

There are binary wheels which can be installed by (use pip3 when available):

pip install pyEDFlib

Users of the Anaconda Python distribution can directly obtain pre-built Windows, Intel Linux or macOS / OSX binaries from the conda-forge channel. This can be done via:

conda install -c conda-forge pyedflib

The most recent development version can be found on GitHub at https://github.com/holgern/pyedflib.

The latest release, including source and binary packages for Linux, macOS and Windows, is available for download from the Python Package Index. You can find source releases at the Releases Page.

Highlevel interface

pyEDFlib includes an highlevel interface for easy access to read and write edf files. Additionally functionality as anonymizing, dropping or renaming channels can be found there.

from pyedflib import highlevel

# write an edf file
signals = np.random.rand(5, 256*300)*200 # 5 minutes of random signal
channel_names = ['ch1', 'ch2', 'ch3', 'ch4', 'ch5']
signal_headers = highlevel.make_signal_headers(channel_names, sample_rate=256)
header = highlevel.make_header(patientname='patient_x', gender='Female')
highlevel.write_edf('edf_file.edf', signals, signal_headers, header)

# read an edf file
signals, signal_headers, header = highlevel.read_edf('edf_file.edf')
print(signal_headers[0]['sample_rate']) # prints 256

# drop a channel from the file or anonymize edf
highlevel.drop_channels('edf_file.edf', to_drop=['ch2', 'ch4'])
highlevel.anonymize_edf('edf_file.edf', new_file='anonymized.edf'
                             to_remove=['patientname', 'birthdate'],
                             new_values=['anonymized', ''])
    # check if the two files have the same content
    highlevel.compare_edf('edf_file.edf', 'anonymized.edf')

License

pyEDFlib is a free Open Source software released under the BSD 2-clause license.

Releases can be cited via Zenodo.

https://zenodo.org/badge/42585968.svg

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyEDFlib-0.1.19.tar.gz (1.2 MB view details)

Uploaded Source

Built Distributions

pyEDFlib-0.1.19-cp38-cp38-win_amd64.whl (577.6 kB view details)

Uploaded CPython 3.8 Windows x86-64

pyEDFlib-0.1.19-cp38-cp38-win32.whl (556.9 kB view details)

Uploaded CPython 3.8 Windows x86

pyEDFlib-0.1.19-cp37-cp37m-win_amd64.whl (575.9 kB view details)

Uploaded CPython 3.7m Windows x86-64

pyEDFlib-0.1.19-cp37-cp37m-win32.whl (554.8 kB view details)

Uploaded CPython 3.7m Windows x86

pyEDFlib-0.1.19-cp36-cp36m-win_amd64.whl (576.0 kB view details)

Uploaded CPython 3.6m Windows x86-64

pyEDFlib-0.1.19-cp36-cp36m-win32.whl (554.8 kB view details)

Uploaded CPython 3.6m Windows x86

pyEDFlib-0.1.19-cp35-cp35m-win_amd64.whl (575.5 kB view details)

Uploaded CPython 3.5m Windows x86-64

pyEDFlib-0.1.19-cp35-cp35m-win32.whl (554.6 kB view details)

Uploaded CPython 3.5m Windows x86

File details

Details for the file pyEDFlib-0.1.19.tar.gz.

File metadata

  • Download URL: pyEDFlib-0.1.19.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200917 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.3

File hashes

Hashes for pyEDFlib-0.1.19.tar.gz
Algorithm Hash digest
SHA256 c12b7da09088cbef286a5284d40eae450c4c65673d7444a40da2144d3f2e322c
MD5 44d874eba1a557a4d7039c8a5651c371
BLAKE2b-256 681df10ea5017a47398fda885c3c313973cf032c19fd6eb773d8e5b816ac3efc

See more details on using hashes here.

File details

Details for the file pyEDFlib-0.1.19-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: pyEDFlib-0.1.19-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 577.6 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200917 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.3

File hashes

Hashes for pyEDFlib-0.1.19-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 82845745743903912017bc1a5bc166d12210b995f4c9217483aa4eeaae13bf53
MD5 86b129c717bada2ea2c782bcc6d24f3a
BLAKE2b-256 0d8e8c84f929e8a1044573ae7acb67ad508e38fea69549458545fe89d9b74eeb

See more details on using hashes here.

File details

Details for the file pyEDFlib-0.1.19-cp38-cp38-win32.whl.

File metadata

  • Download URL: pyEDFlib-0.1.19-cp38-cp38-win32.whl
  • Upload date:
  • Size: 556.9 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200917 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.3

File hashes

Hashes for pyEDFlib-0.1.19-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 60eaf098e6bdfdabb082df0f6a9a1e7fb416ffcc996b5d3bd213c1ff344f75fd
MD5 0f3fe9b6ec1120f90fec9d8ef669e498
BLAKE2b-256 d4e11195c9bc63f6cebd4624651e118a6db94dc945b0a850e8e34363f242cff2

See more details on using hashes here.

File details

Details for the file pyEDFlib-0.1.19-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: pyEDFlib-0.1.19-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 575.9 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200917 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.3

File hashes

Hashes for pyEDFlib-0.1.19-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 ed77774a92644805811a786ce101097f446691d5247bcdada830e1192a803560
MD5 9377b814c53d1f998c1d7da440807862
BLAKE2b-256 7808bb85d7c1a6da64c68d8aaa115155cc0be24caa44ea5a455866b4846c1a23

See more details on using hashes here.

File details

Details for the file pyEDFlib-0.1.19-cp37-cp37m-win32.whl.

File metadata

  • Download URL: pyEDFlib-0.1.19-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 554.8 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200917 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.3

File hashes

Hashes for pyEDFlib-0.1.19-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 ed48a08c473e3730255108092e2065f5c797b679c0e542c6f8c1e0d01cd77c29
MD5 91aa5c9032cb282b354cfb0872405db9
BLAKE2b-256 6e9d5b3f03239d952e414b908f6e24b0637f5a7595501d0c7293446b5cb460a8

See more details on using hashes here.

File details

Details for the file pyEDFlib-0.1.19-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: pyEDFlib-0.1.19-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 576.0 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200917 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.3

File hashes

Hashes for pyEDFlib-0.1.19-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 856dac26fba93e32057a64b5a5c837fad2ee1e65a57eb9f92fff11bbfdcc728a
MD5 9f33af0480331c5cba5ec15b4bed1484
BLAKE2b-256 4a860ac8c71a30ec4a36318e8a6cb24203fc9ac5d5c19186704bafff2e451993

See more details on using hashes here.

File details

Details for the file pyEDFlib-0.1.19-cp36-cp36m-win32.whl.

File metadata

  • Download URL: pyEDFlib-0.1.19-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 554.8 kB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200917 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.3

File hashes

Hashes for pyEDFlib-0.1.19-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 d1e7fd094903347b22fc95c36eb9e5bcf33a5623602b838992428aa3573f4154
MD5 c4dd1e49ae1d90a3b4e5068fe047c0ca
BLAKE2b-256 517b668b65a660194528c76bb86a2337bcd018c7849fbeb149977ff251ab5e47

See more details on using hashes here.

File details

Details for the file pyEDFlib-0.1.19-cp35-cp35m-win_amd64.whl.

File metadata

  • Download URL: pyEDFlib-0.1.19-cp35-cp35m-win_amd64.whl
  • Upload date:
  • Size: 575.5 kB
  • Tags: CPython 3.5m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200917 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.3

File hashes

Hashes for pyEDFlib-0.1.19-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 6f1f6a5cbec7f0e5cc68360f33763fcc84986b539898d21869106f7201d8a047
MD5 3a1944db799cacb0046b56ab113ed4b8
BLAKE2b-256 250d630d87046116a9d9eb25ab79fdb2cc1b653d6739c758a2cc74217515c9c4

See more details on using hashes here.

File details

Details for the file pyEDFlib-0.1.19-cp35-cp35m-win32.whl.

File metadata

  • Download URL: pyEDFlib-0.1.19-cp35-cp35m-win32.whl
  • Upload date:
  • Size: 554.6 kB
  • Tags: CPython 3.5m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200917 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.3

File hashes

Hashes for pyEDFlib-0.1.19-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 919df81aed2c908f896dbc719a88acea114a3584250768ca483987adc72c160f
MD5 5e1e106c2e972b2fef3afa1ec5c5b2d8
BLAKE2b-256 f7ee3e3192e6ac5909ba16fa1626cb75690eb2fc261519ba3ecea9c12848dd73

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page