using NeuroAnalyzer
= load("files/eeg.hdf"); eeg
[ Info: Loaded: EEG (24 × 308480 × 1; 1204.996 s)
Load data:
using NeuroAnalyzer
= load("files/eeg.hdf"); eeg
[ Info: Loaded: EEG (24 × 308480 × 1; 1204.996 s)
Lateralization index is calculated as log(A / B), where A is average power at given frequency (default is 10 Hz, alpha) for the right hemisphere and B is average power at that frequency for the left hemisphere.
Lateralization index (default for alpha 10 Hz frequency):
= lat_idx(eeg) lidx
1.517379806560375
Lateralization index for the range 8.0-12.5 Hz:
= lat_idx(eeg, frq=(8.0, 12.5)) lidx
1.4688999711396038
Calculate frontal alpha asymmetry index:
# left
= channel_cluster(eeg, cluster=:f1)
ch_left # or
= channel_pick(eeg, p=[:left, :frontal])
ch_left # right
= channel_cluster(eeg, cluster=:f2)
ch_right # or
= channel_pick(eeg, p=[:right, :frontal])
ch_right
# alpha frequency
= band_frq(eeg, band=:alpha)
alpha
# asymmetry index
band_asymmetry(eeg, frq_lim=alpha, ch1=labels(eeg)[ch_left], ch2=labels(eeg)[ch_right])
(ba = -2.6469560812055706,
ba_norm = -0.8676462643674967,)