using NeuroAnalyzer
using IntrinsicTimescales
eeg = load("files/eeg.hdf");
e10 = epoch(eeg, ep_len=10);
keep_epoch!(e10, ep=1:10);[ Info: Loaded: EEG (24 × 282991 × 1; 1105.43 s)
Load data:
using NeuroAnalyzer
using IntrinsicTimescales
eeg = load("files/eeg.hdf");
e10 = epoch(eeg, ep_len=10);
keep_epoch!(e10, ep=1:10);[ Info: Loaded: EEG (24 × 282991 × 1; 1105.43 s)
Convert the channel “Fp1” data into trials × time format:
data = trtm(e10, ch="Fp1")10×2560 Matrix{Float64}:
4.99216 5.66443 4.607 … 15.09 13.7703 15.927
15.5054 13.7505 16.6498 6.78011 5.38644 4.83989
5.81555 4.75825 2.98579 -0.686845 0.960732 1.67043
-1.47861 -2.57435 2.15352 -3.98304 -5.51587 -4.05545
-5.1713 -3.83129 0.867496 -10.276 -9.18332 -8.73307
-5.58014 -7.3797 -6.40437 … 26.113 27.8266 26.9221
24.5591 28.6097 27.7164 2.90509 -0.503701 0.340094
1.93296 -0.12318 0.971441 8.11927 8.36308 9.86866
6.69565 8.56691 8.59847 4.51562 1.44513 0.939821
3.5131 1.93165 2.6241 2.95544 0.173103 -0.967502
Estimate INTs:
fs = sr(e10)
acwresults = acw(data, fs; acwtypes = [:acw0, :acw50, :acweuler, :auc, :tau, :knee], dims=ndims(data))ACWResults(256, [[1.0078125, 0.63671875, 0.81640625, 0.71484375, 0.82421875, 1.15234375, 1.14453125, 0.84375, 0.71484375, 0.70703125], [0.42578125, 0.27734375, 0.421875, 0.32421875, 0.20703125, 0.34375, 0.5625, 0.46484375, 0.35546875, 0.25390625], [0.609375, 0.359375, 0.52734375, 0.41796875, 0.28515625, 0.4765625, 0.6953125, 0.56640625, 0.453125, 0.34765625], [0.4422438218701359, 0.23989426819604392, 0.3898013747049422, 0.287341551523508, 0.24070510843862347, 0.4240027790753934, 0.5579319506311448, 0.4336255123609388, 0.30431067043006105, 0.2566216924156452], [0.4771447152396524, 0.27314320140064585, 0.38825982053955066, 0.3114884306678575, 0.25392973053397555, 0.4672032664371308, 0.6471402848618032, 0.43094849597002227, 0.3237702487649466, 0.28050633020723453], [-0.07285994578414041, 0.26498375775894956, -0.10603664657038489, 0.36375583473052364, 0.459510632508378, 189.70941563293223, 0.249760828112849, 0.07443555093988564, 0.39866758502154176, 0.2201724133809723]], [:acw0, :acw50, :acweuler, :auc, :tau, :knee], 325, (0.1, 128.0), [1.0 0.9639950853662084 … -0.16663115250369423 -0.17209665819931605; 1.0 0.9695960699643527 … -0.22690631373746348 -0.23191929468061462; … ; 1.0 0.9525343144914178 … -0.32081648969194654 -0.33075885958000445; 1.0 0.9179987648569181 … -0.1282871338866007 -0.14850182403365458], [31.072459235228827 142.97598096378488 … 0.00017746731922273099 0.0001202994561091912; 0.9284943210450076 40.33737876504359 … 1.5767981867389372e-5 4.5051351058259715e-6; … ; 15.397489319538476 28.025412083933 … 3.2890514433678653e-6 1.0297023036787421e-5; 3.6122503960972314 17.940156185743742 … 5.19289044091598e-5 1.3610476350575755e-5], [0.1, 0.2, 0.30000000000000004, 0.4, 0.5, 0.6000000000000001, 0.7000000000000001, 0.8, 0.9, 1.0 … 127.10000000000001, 127.2, 127.30000000000001, 127.4, 127.5, 127.60000000000001, 127.7, 127.80000000000001, 127.9, 128.0], 0.0:0.00390625:1.265625, 2)
(!) See https://github.com/duodenum96/IntrinsicTimescales.jl for details.