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:

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.18.tar.gz (1.1 MB view details)

Uploaded Source

Built Distributions

pyEDFlib-0.1.18-cp38-cp38-win_amd64.whl (574.9 kB view details)

Uploaded CPython 3.8 Windows x86-64

pyEDFlib-0.1.18-cp38-cp38-win32.whl (554.6 kB view details)

Uploaded CPython 3.8 Windows x86

pyEDFlib-0.1.18-cp37-cp37m-win_amd64.whl (573.0 kB view details)

Uploaded CPython 3.7m Windows x86-64

pyEDFlib-0.1.18-cp37-cp37m-win32.whl (552.4 kB view details)

Uploaded CPython 3.7m Windows x86

pyEDFlib-0.1.18-cp36-cp36m-win_amd64.whl (573.0 kB view details)

Uploaded CPython 3.6m Windows x86-64

pyEDFlib-0.1.18-cp36-cp36m-win32.whl (552.3 kB view details)

Uploaded CPython 3.6m Windows x86

pyEDFlib-0.1.18-cp35-cp35m-win_amd64.whl (572.3 kB view details)

Uploaded CPython 3.5m Windows x86-64

pyEDFlib-0.1.18-cp35-cp35m-win32.whl (551.9 kB view details)

Uploaded CPython 3.5m Windows x86

pyEDFlib-0.1.18-cp27-cp27m-win_amd64.whl (576.2 kB view details)

Uploaded CPython 2.7m Windows x86-64

pyEDFlib-0.1.18-cp27-cp27m-win32.whl (557.8 kB view details)

Uploaded CPython 2.7m Windows x86

File details

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

File metadata

  • Download URL: pyEDFlib-0.1.18.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1.post20200529 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.6

File hashes

Hashes for pyEDFlib-0.1.18.tar.gz
Algorithm Hash digest
SHA256 63a14d025ccf2296891ffe8e64d74021bd9d4443392395e7961be549df467a57
MD5 c0ce96df404a256f13cfe42827437451
BLAKE2b-256 ed002ab3e04b03651a82df063beb16f5cf077751d7045432067b04b265ab8760

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyEDFlib-0.1.18-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 574.9 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1.post20200529 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.6

File hashes

Hashes for pyEDFlib-0.1.18-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 7f9d4dba64dec2758b0c415c2bc4e39d37e33e3143df0e3558fe9c2deb9defea
MD5 b025089c3b87042191cd6c7923b61050
BLAKE2b-256 b7723dac982bac494003945f28bda92b27e82208af95bec5e12f359c462f132a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyEDFlib-0.1.18-cp38-cp38-win32.whl
  • Upload date:
  • Size: 554.6 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1.post20200529 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.6

File hashes

Hashes for pyEDFlib-0.1.18-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 1a805a4eba94a3fe9fdd938afa0f72eeb4f78f86b8d60b21a21ddeace0a40bf7
MD5 41788bb179b84f538c36c1f8ebbb8fdb
BLAKE2b-256 4c6ea3417793031e8cecf8a534be68a3a47765098b6112831b94dc2091e33190

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyEDFlib-0.1.18-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 573.0 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1.post20200529 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.6

File hashes

Hashes for pyEDFlib-0.1.18-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 065be8c17b96eae236487206ba888a3518dab7854fe11adbdaad267b000936f0
MD5 ab5666d6c020518c6e093420cc5e1f28
BLAKE2b-256 54e6b938300a49b3e60fd2579047af35b326c7e76187d0f1f37264f7773746de

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyEDFlib-0.1.18-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 552.4 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1.post20200529 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.6

File hashes

Hashes for pyEDFlib-0.1.18-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 74e2621e7b13cf85478d401a2b6cf3986b3bf9ed5880c4a1020c2668c1f726e4
MD5 a4cc3945fb7a3c01191edd149dce308a
BLAKE2b-256 3ba5197ec6b1f9d754de1ad05778b5695457908da1a8939a0a8f956cc8683719

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyEDFlib-0.1.18-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 573.0 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1.post20200529 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.6

File hashes

Hashes for pyEDFlib-0.1.18-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 9fa0c5999c4a056c0348839066dbd0cdfbe9de4e261008806afc45f5a9e8273d
MD5 e931221c245eb7cc13cd26bd049607fa
BLAKE2b-256 10d0781ff0d075a98544f402bf68e768e86f5c37829398326b5ab3059f0fad83

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyEDFlib-0.1.18-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 552.3 kB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1.post20200529 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.6

File hashes

Hashes for pyEDFlib-0.1.18-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 aa7c86434b35952eaf4296532ee363a8987151c4edd8190b449f977f6c2d298f
MD5 aea83ed8b24a0a0bed3721bdfb854d3f
BLAKE2b-256 204d0700b33c77f7868afd03205aa7abfa6cca2e6d756c22f31caf91ea01f9e2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyEDFlib-0.1.18-cp35-cp35m-win_amd64.whl
  • Upload date:
  • Size: 572.3 kB
  • Tags: CPython 3.5m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1.post20200529 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.6

File hashes

Hashes for pyEDFlib-0.1.18-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 d218dfa971ea30331772998032cf7710aa35e028245a33cd5c41922406792093
MD5 5072b3b06c48d7499517f75e0560809b
BLAKE2b-256 32c54291835da4e7ed11b6035cf462fe72e7a8b85ee795ad98041639833c6b5a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyEDFlib-0.1.18-cp35-cp35m-win32.whl
  • Upload date:
  • Size: 551.9 kB
  • Tags: CPython 3.5m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1.post20200529 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.6

File hashes

Hashes for pyEDFlib-0.1.18-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 d8d1c19b5d9acb440e7e97a8d142f69c9ffd4c401ad22d467c45716a9b7af111
MD5 734669408d570d1f3f93cc879ed50d77
BLAKE2b-256 8924ada42a85e3daebe4819fbd100cbe40ab9cfac34031a44deead2294e83ddd

See more details on using hashes here.

File details

Details for the file pyEDFlib-0.1.18-cp27-cp27m-win_amd64.whl.

File metadata

  • Download URL: pyEDFlib-0.1.18-cp27-cp27m-win_amd64.whl
  • Upload date:
  • Size: 576.2 kB
  • Tags: CPython 2.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1.post20200529 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.6

File hashes

Hashes for pyEDFlib-0.1.18-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 1f186b8837d8b604918b38cf602d27e121cfe958e1abf61c6c0d240bf2c1a8a6
MD5 a54c88b3867ee7c34d826edb18cd7c5a
BLAKE2b-256 813e2e8d267403c0c3e01cb6a827c17789fa86984705e936ee0cbb9998986911

See more details on using hashes here.

File details

Details for the file pyEDFlib-0.1.18-cp27-cp27m-win32.whl.

File metadata

  • Download URL: pyEDFlib-0.1.18-cp27-cp27m-win32.whl
  • Upload date:
  • Size: 557.8 kB
  • Tags: CPython 2.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1.post20200529 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.6

File hashes

Hashes for pyEDFlib-0.1.18-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 e9ed3bbdca3898e179ee9facec3feefcf4bb3a5acef5c99caf08333f1df4087f
MD5 8936729b5137c0a2c2341a8808298199
BLAKE2b-256 66d9aee3bf4b7c2bf0171c4db52be986dd5b4a68f5ed93b3f19cc816895e450a

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