edf tools for evismo

Michael Kistler f57f10b8ca correct start time func 2 weeks ago
.idea intial commit 1 month ago
edfapp include edfrd with correct header 2 weeks ago
resources script and resouces folder added 1 month ago
scripts script and resouces folder added 1 month ago
.gitignore exclude scripts directory 3 weeks ago
README.md update for pyedflib section 1 month ago
browse-edf.py updates 2 weeks ago
installer.cfg replaces sip with pyqt5-sip 1 month ago
installer.py initial commit 1 month ago
merge-edf.py first successful windows build 1 month ago
split-edf.py correct start time func 2 weeks ago
split-edf2.py updates 2 weeks ago
trim_edf.py initial commit 1 month ago



edf-tools repository https://gitea.kzacom.ch/klm1/edf-tools.git

Python 3

download link

splitting with pyEDFLib

you can splitt an EDF file into parts of a given length in days. Fractions of a day as input is also possible. The last part will be

  • shorter if the rest is smaller than half of normal part (is a )
  • shorter if the rest is equal or larger than half of a normal part

Part = length of the slices you want to create

duration = lenght of the measurement

div(duration,part) = nr of slices
mod(duration,part) = rest
if part/rest > 2 then slice_n = slice+rest
if part/rest <= 2 then slice_n = rest


  • runs in a GUI
  • split a file into slices
  • header infos correct
  • annotations are kept


  • very limited exceptions are handled, be precise with your input


  • trim function
  • merge function
  • better gui

use win Installer

download the edftools.exe from the release tab

start from the command line

  • python, make sure you check the box "include Python in PATH"
  • msvc build tools: MSVC 2015 download link or from python wiki
  • virtualenv (not needed but recommended)
  • git: from here or download manually fromhttps://gitea.kzacom.ch/klm1/edf-tools
  • pyQt5
  • numpy
  • pyedflib

install python packages

pip install virtualenv numpy pyedflib pyQt5

clone repository

mkdir ~/workspace
cd ~/workspace
git clone https://gitea.kzacom.ch/klm1/edf-tools
cd edf-tools/edfapp
python main.py


  1. Select file to split
  2. specify how many days a size should be (eg 14)
  3. press start: progress can be monitored in the console output


EDF Splitting with edfrd

limitations no header adoption (start date) no annotations (markers from faros) fixed slice size only cmd

Installation pre-requisits

You need

  • Python 3
  • Virtualenv pip install virtualenv
  • edfrd
  • edf-tools repository https://gitea.kzacom.ch/klm1/edf-tools.git

windows: install and create virtualenv

Use pip-Win


to run edf-tools in a isolated environment python -m pip install --upgrade pip

pip install virtualenv

create virtualenv

python C:\Python37\Scripts\virtualenv.exe edf-tools

move into newly create virtualenv Scripts folder:

cd C:\Python37\Scripts\edf-tools\Scripts\

activate virtual env


install edfrd

pip install edfrd

get the edf-tools repo and use it

download / clone edf-tools from here: edf-tools repository cd to where you want to install the edf-tools then

git clone https://gitea.kzacom.ch/klm1/edf-tools

run the script

python split-edf -i 'C:\full\path\to\edf-file'

deactivate the edf-tools virtualenv


Windows scripts

  • install.bat: executes the above steps to install and create the virtualenv
  • activate.bat: activate the edf-tools virutalenv
  • run.bat: activate, run python script and deactivate
  • deactivate.bat: deactivate the edf-tools virtualenv