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

Uploaded Source

Built Distributions

pyEDFlib-0.1.20-cp39-cp39-win_amd64.whl (589.2 kB view details)

Uploaded CPython 3.9 Windows x86-64

pyEDFlib-0.1.20-cp39-cp39-win32.whl (567.2 kB view details)

Uploaded CPython 3.9 Windows x86

pyEDFlib-0.1.20-cp38-cp38-win_amd64.whl (578.6 kB view details)

Uploaded CPython 3.8 Windows x86-64

pyEDFlib-0.1.20-cp38-cp38-win32.whl (557.9 kB view details)

Uploaded CPython 3.8 Windows x86

pyEDFlib-0.1.20-cp37-cp37m-win_amd64.whl (576.8 kB view details)

Uploaded CPython 3.7m Windows x86-64

pyEDFlib-0.1.20-cp37-cp37m-win32.whl (555.8 kB view details)

Uploaded CPython 3.7m Windows x86

pyEDFlib-0.1.20-cp36-cp36m-win_amd64.whl (576.8 kB view details)

Uploaded CPython 3.6m Windows x86-64

pyEDFlib-0.1.20-cp36-cp36m-win32.whl (555.7 kB view details)

Uploaded CPython 3.6m Windows x86

pyEDFlib-0.1.20-cp35-cp35m-win_amd64.whl (576.5 kB view details)

Uploaded CPython 3.5m Windows x86-64

pyEDFlib-0.1.20-cp35-cp35m-win32.whl (555.5 kB view details)

Uploaded CPython 3.5m Windows x86

File details

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

File metadata

  • Download URL: pyEDFlib-0.1.20.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.20.tar.gz
Algorithm Hash digest
SHA256 ab6db552e4ec07f0c667504f395dd665ff753937b2d6b288b3214dd2d98fd56b
MD5 18addb03e9a371be9baaddf3a2b8ee2a
BLAKE2b-256 4eef3222490aea1003256150d2a5b3daebdc3e7e53d3766ade4640d182093b26

See more details on using hashes here.

File details

Details for the file pyEDFlib-0.1.20-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: pyEDFlib-0.1.20-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 589.2 kB
  • Tags: CPython 3.9, 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.20-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 93c9d01f424fba79c4363d63981a749c57f623ac823953dbc47d136f6d17a819
MD5 ec58d06c47c30112eb57d83513c8ca66
BLAKE2b-256 2a29424e09c2e8b18750ef26a173956c3e8c2728dae32c937ebdc67b601ef2fe

See more details on using hashes here.

File details

Details for the file pyEDFlib-0.1.20-cp39-cp39-win32.whl.

File metadata

  • Download URL: pyEDFlib-0.1.20-cp39-cp39-win32.whl
  • Upload date:
  • Size: 567.2 kB
  • Tags: CPython 3.9, 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.20-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 c95e1b2b9c12fd7b5409da78a8c4aae5b7bf7a23914d4466ccff07b8ccb90232
MD5 46999250be32a1674c8d0d8f0ee199dd
BLAKE2b-256 c239885b0fbccdca399f8954405c447292b3b1e4dfcf2c6cefa08a7ea436bc48

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyEDFlib-0.1.20-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 578.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.20-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 1a44a32d12f20a68316c08eb9ca203930eca0e05dd871a8e1bba54a2cc479876
MD5 f2bbc2cefa6a155cb3c4edfd8d4d97d3
BLAKE2b-256 1385af9feb32ea21c1624f7ec7e97906c629a2c2544bde65a2e736e99983f6d6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyEDFlib-0.1.20-cp38-cp38-win32.whl
  • Upload date:
  • Size: 557.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.20-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 38da0f4d1269f80efb6a05ca000f058a15d40b2f13292a530f5441987723c278
MD5 0b4aa9b5ff060d34df5a7bdeb8474e9f
BLAKE2b-256 9f11771af24c2f900dee82ac4ba24fed34ab97d6831fd07876bf415c6fdad63c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyEDFlib-0.1.20-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 576.8 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.20-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 4abea1a358a1c8c723c43c0a533034fc61be62fea5131a65f6a349d7591c1a4e
MD5 61b0c43bbb666e18fd808cfd3da72bd0
BLAKE2b-256 8640cf1742cce3b4721d267d4ff278453a8528613c2bd4b666d89c3f0d6a8422

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyEDFlib-0.1.20-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 555.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.20-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 a1bec2c0af688c4ef50291b1f37cc466710a63b13c9b438b500c036262cd368d
MD5 d7f09c5045bb7878e357b55833d2ad9c
BLAKE2b-256 03163f425ec1708a8d955cf8ef1d34ed38a8715d38494f937eac42062786b681

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyEDFlib-0.1.20-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 576.8 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.20-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 d6cfff52fba25354c18a53fa6a449024373f38126e1fd6608b5247d415f233f0
MD5 3bf614d5254a77c7fd89592c1c327e77
BLAKE2b-256 75316b57a6f110e4be2b4e681d06762ac92869bbb41659044c9168c61d013319

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyEDFlib-0.1.20-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 555.7 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.20-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 6b2d1a689089796aed337b7394a91e432fe99201d80b331f2451cf521a434b09
MD5 36a8fb020b63e5a0ffd5facf5d3b94d3
BLAKE2b-256 d99faedb97c60eb95b6f05d190a1c4313fa706a820e9d5721d5c49c2b52b3f83

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyEDFlib-0.1.20-cp35-cp35m-win_amd64.whl
  • Upload date:
  • Size: 576.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.20-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 35e74ffa9c98c7441f192a314261ca35cbc21ac761dee40b8454ff7c00ea3aab
MD5 fb74ba00fc4a29d0f9fbada8be0b4b1c
BLAKE2b-256 e45ccd7a085f545620140c5727ed3cc985770490f26cc7a66d2db68e5487836a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyEDFlib-0.1.20-cp35-cp35m-win32.whl
  • Upload date:
  • Size: 555.5 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.20-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 8c2ed2e3b9a21abd418f07825b197f61619ba4ad8b853e2ca2a9df5f27acb834
MD5 57928b52127304009eb0d6c8fe7952bc
BLAKE2b-256 816c1f20d60fc4119693ff95e80a2b9a9d54e45691e0f6bcc905620a1f5848a6

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