-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsepa_handContraction.m
More file actions
39 lines (31 loc) · 1.04 KB
/
sepa_handContraction.m
File metadata and controls
39 lines (31 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
function AIS = sepa_handContraction(filename)
% AIS = sepa_handContraction(filename)
%
% Version of the calculations for the alpha asymmetry research for SEPA
% 2017 meeting. This is temporary and will be replaced by better, more
% validated code after the meeting.
%
% MDT
% 2017.02.16
lowerBound = 1; % Keep filter bounds outside of the EEG
upperBound = 41; % frequencies of interest (2-40 Hz)
eegChannels = 3:16;
if regexp(filename,'set$')
EEG = pop_loadset(filename);
elseif regexp(filename,'edf$')
EEG = pop_biosig(filename);
else
error('sepa_handContraction: File type unknown');
end
EEG_only = pop_select(EEG, 'channel', eegChannels);
EEG_only = pop_eegfilt(EEG_only, lowerBound, upperBound, [], [0], 0, 0, 'fir1', 0);
for m = 3:5
ss = ge_getSampleBounds(EEG, m);
data{m} = EEG_only.data(:,ss(1):ss(2));
end
blob.Fs = 128;
for ii = 3:5
blob.data = data{ii}';
AIS{ii} = sepa_alphaAsymmetry(blob);
end
end