About
Model of Ictal and Interictal discharges during epilepsy. Please see this article for details.
Dictionary
Epileptiform - The term is used to connote EEG patterns believed to be associated with a relatively high risk for having seizures.
Ictal event - Event during seizure.
Interictal event - Event between seizures.
Focal event -
Tonic seizure -
Clonic seizure -
Run
Install
You need Python of version 3.6 or higher. Also I highly recommend to use environments for work. Anaconda is a good choice. The required dependencies are:
- matplotlib, scipy, numpy, numba, pyyaml
2D case
- Adjust params as you need in
params_0d.py
and params_2d.py
.
- Execute
python epileptor/model_2d_full.py
. It gives 3 files as the result in results
dir. These files have names: <YYYY-mm-dd_HH.MM>_plain.npz
, <YYYY-mm-dd_HH.MM>_points.npz
, <YYYY-mm-dd_HH.MM>_params.yml
correspondingly, where <YYYY-mm-dd_HH.MM>
is the date/time when your execution ended.
- To display results execute
python -d results/<YYYY-mm-dd_HH.MM> epileptor/display_2D.py
.
- Look up the display results in
media
directory. They all have <YYYY-mm-dd_HH.MM>
part in common.
Example
Your execution successfully ended. You have 3 results: 2019-01-27_17.14_plain.npz
, 2019-01-27_17.14_points.npz
, 2019-01-27_17.14_params.yml
. <YYYY-mm-dd_HH.MM>
is represented as 2019-01-27_17.14
.
Velocity
Default params: gKleak=1, gE=5, gE_normal=1, dK_reset=0.04, roK_roNa=20, lamb=0.1, tau_K=100, gL=1, ro_pump=0.0002, Gain=20, tau_Na=20000, NoiseAmpl=25
Var name |
diffusion, uninoise |
diffusion, rndnoise |
synaptic, uninoise |
synaptic, rndnoise |
base velocity |
Mean: 0.029387, STD: 0.000997 |
Mean: 0.027642, STD: 0.002180 |
Mean: 0.049463, STD: 0.001814 |
|
gKleak=0.5 |
No wave |
|
|
|
gKleak=2 |
Up, Mean: 0.105585, STD: 0.033166 |
|
Up, 0.464241, STD: 0.104938, wave length > yh |
|
gE=10 |
No UP. Wave more often |
|
|
|
gE_normal=2 |
No UP. Baseline gets up the same as the peak |
|
|
|
dK_reset=0.08 |
Invalid results, NaN |
|
|
|
roK_roNa=10 |
Up, Mean: 0.043350, STD: 0.008512 |
|
|
|
lamb=0.2 |
|
|
Up significantly, wave length > yh |
|
tau_K=150 |
|
Down |
|
|
gKLeak=2, roK_roNa=5 |
|
Wave is minor. Everything goes up pretty fast. |
|
|
gL=0.5;0.8 |
|
No wave. Many noise mini waves going up everywhere. |
|
|
gL=2 |
|
No wave |
|
|
ro_pump=0.0001 |
|
UP. Mean: 0.030930, STD: 0.001174. Increases wave amplitude. |
|
|
ro_pump=0.0004 |
|
Down. Decreases wave amplitude. |
|
|
Gain=10 |
|
Up. Noisy wave ends. Decreases wave amplitude. Mean: 0.042021, STD: 0.000897. |
|
|
tau_Na=10000 |
|
No UP. Amplitude is higher. MEAN: 0.025406, STD: 0.000305 |
|
|
tau_Na=40000 |
|
No UP. Amplitude is lower. MEAN: 0.024776, STD: 0.000714 |
|
|
NoiseAmpl=40 |
|
UP. Noisy wave ends. Mean: 0.048747, STD: 0.001611 |
|
|
- assuming gKLeak = 2 increase of tau_Na with any of params that increase velocity (like NoiseAmpl to 40, Gain to 10)
gE
or gE_normal
do not affect velocity. They rather affect amplitude only.
- Increase of roK_roNa leads to a smaller wave peak and narrow wave length. Example: roK_roNa = 40 => peak about 13.
- Velocity is about 0.5 with NoiseAmpl = 40, Gain = 10, gKleak = 2, roK_roNa = 40. But the wave is noisy