Initialize NeuroAnalyzer
using NeuroAnalyzer
eeg = load("files/eeg.hdf")using NeuroAnalyzer
eeg = load("files/eeg.hdf")The Lateralization Index (LI) quantifies the difference in power between the right and left hemispheres at a specific frequency or frequency range. It is calculated as:
\[ LI = \log\left(\frac{A}{B}\right) \]
where:
\(A\) is the average power at a given frequency (e.g., 10 Hz alpha) for the right hemisphere,
\(B\) is the average power at the same frequency for the left hemisphere.
Interpretation:
Lateralization index for the range 8.0-12.5 Hz:
lat_idx(eeg,
frq=(8.0, 12.5))0.1229164837346802
The Asymmetry Index quantifies the difference in power between the right and left hemispheres at a specific frequency or frequency range.
asy_idx() computes the log-ratio and normalized difference of mean band power between two sets of channels (typically left vs right hemisphere):
asi = log(mean_power(ch1)) - log(mean_power(ch2)): positive when ch1 has more power than ch2nasi = (mean_power(ch1) - mean_power(ch2)) / (mean_power(ch1) + mean_power(ch2)): bounded on (-1, 1), analogous to a contrast ratioInterpretation:
Calculating frontal alpha (8.0 to 13.0 Hz) asymmetry index:
# left
ch_left = channel_cluster(eeg,
cluster = :f1)
# or
ch_left = channel_pick(eeg,
pick=[:left, :frontal])
# right
ch_right = channel_cluster(eeg,
cluster=:f2)
# or
ch_right = channel_pick(eeg,
pick=[:right, :frontal])
# alpha frequency
alpha = band_frq(eeg,
band=:alpha)
# asymmetry index
asy_idx(eeg,
flim=alpha,
ch1=ch_left,
ch2=ch_right)(asi = 1.0887768827817115, nasi = 0.4963026613913089)
Channel Symmetry Index measures the balance between positive and negative amplitudes in the EEG signal between two channels. A symmetry value of 1.0 indicates a perfectly balanced signal.
Interpretation:
Calculating channel symmetry index between F3 and F4 channels:
sym_idx(eeg,
ch=["F3", "F4"])2×1 Matrix{Float64}:
0.9878786466947764
1.0676924319521848