edf tools for evismo

Michael Kistler 4fab87909f end time input fixed 4 days ago
.idea intial commit 2 weeks ago
edfapp end time input fixed 4 days ago
resources script and resouces folder added 4 days ago
scripts script and resouces folder added 4 days ago
.gitignore intial commit 2 weeks ago
README.md update for pyedflib section 4 days ago
browse-edf.py first successful windows build 6 days ago
installer.cfg replaces sip with pyqt5-sip 4 days ago
installer.py initial commit 4 days ago
merge-edf.py first successful windows build 6 days ago
split-edf.py first successful windows build 6 days ago
split-edf2.py started function split 4 days ago
trim_edf.py initial commit 4 days ago

README.md

edf-tools

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

features

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

limitations

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

Todo:

  • 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

Usage

  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

Gui1

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

Or

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

.\activate.bat

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

C:\Python37\Scripts\edf-tools\Scripts\deactivate.bat

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