Load EEG object:
= import_edf("test/eeg-test-edf.edf")
eeg = 1
channel = 1 epoch
Calculate PSD data using Welch periodogram:
= psd(eeg, db=true) p, f
Draw scatter plot of PSD data:
scatter(f, p[channel, :], ms=1, legend=false)
Calculate and plot PSD slope:
= psd_slope(eeg, db=true)
f, ps, frq plot!(frq, f[channel, :, epoch], title="slope = $(round(ps[channel, epoch], digits=2))")
Calculate PSD slope of the alpha band:
= psd_slope(eeg, frq_lim=(8, 14), db=true) f, ps, frq