-
Notifications
You must be signed in to change notification settings - Fork 1
/
Artist009.m
89 lines (83 loc) · 3.79 KB
/
Artist009.m
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
%%
% x = '456'
% addpath(genpath('/home/raquib/Documents/MATLAB'))
% y='458'
%%
paths = [
% "data/original/sub02/exp01/eeg/SP 110RMT r1",
% "data/original/sub02/exp01/eeg/SP 110RMT r2",
% "data/original/sub02/exp01/eeg/SP 110RMT r3",
% "data/original/sub03/exp03/eeg/SP 110RMT r1",
% "data/original/sub03/exp03/eeg/SP 110RMT r2",
% "data/original/sub03/exp03/eeg/SP 110RMT r3",
% "data/original/sub04/exp02/eeg/SP 110RMT r1",
% "data/original/sub04/exp02/eeg/SP 110RMT r2",
% "data/original/sub04/exp02/eeg/SP 110RMT r3",
% "data/original/sub05/exp02/eeg/SP 110RMT r1",
"data/original/sub05/exp02/eeg/SP 110RMT r2",
"data/original/sub05/exp02/eeg/SP 110RMT r3",
"data/original/sub06/exp01/eeg/SP 110RMT r1",
"data/original/sub06/exp01/eeg/SP 110RMT r2",
"data/original/sub06/exp01/eeg/SP 110RMT r3",
"data/original/sub07/exp01/eeg/SP 110RMT r1",
"data/original/sub07/exp01/eeg/SP 110RMT r2",
"data/original/sub07/exp01/eeg/SP 110RMT r3",
"data/original/sub08/exp03/eeg/SP 110RMT r1",
"data/original/sub08/exp03/eeg/SP 110RMT r2",
"data/original/sub08/exp03/eeg/SP 110RMT r3",
"data/original/sub10/exp02/eeg/SP 110RMT r1",
"data/original/sub10/exp02/eeg/SP 110RMT r2",
"data/original/sub10/exp02/eeg/SP 110RMT r3",
"data/original/sub12/exp03/eeg/SP 110RMT r1",
"data/original/sub12/exp03/eeg/SP 110RMT r2",
"data/original/sub12/exp03/eeg/SP 110RMT r3",
"data/original/sub13/exp02/eeg/SP 110RMT r1",
"data/original/sub13/exp02/eeg/SP 110RMT r2",
"data/original/sub13/exp02/eeg/SP 110RMT r3",
"data/original/sub15/exp01/eeg/SP 110RMT r1",
"data/original/sub15/exp01/eeg/SP 110RMT r2",
"data/original/sub15/exp01/eeg/SP 110RMT r3",
"data/original/sub16/exp01/eeg/SP 110RMT r1",
"data/original/sub16/exp01/eeg/SP 110RMT r2",
"data/original/sub16/exp01/eeg/SP 110RMT r3",
"data/original/sub17/exp01/eeg/SP 110RMT r1",
"data/original/sub17/exp01/eeg/SP 110RMT r2",
"data/original/sub17/exp01/eeg/SP 110RMT r3",
"data/original/sub18/exp01/eeg/SP 110RMT r1",
"data/original/sub18/exp01/eeg/SP 110RMT r2",
"data/original/sub18/exp01/eeg/SP 110RMT r3",
"data/original/sub19/exp01/eeg/SP 110RMT r1",
"data/original/sub19/exp01/eeg/SP 110RMT r2",
"data/original/sub19/exp01/eeg/SP 110RMT r3",
"data/original/sub20/exp01/eeg/SP 110RMT r1",
"data/original/sub20/exp01/eeg/SP 110RMT r2",
"data/original/sub20/exp01/eeg/SP 110RMT r3",
"data/original/sub21/exp01/eeg/SP 110RMT r1",
"data/original/sub21/exp01/eeg/SP 110RMT r2",
"data/original/sub21/exp01/eeg/SP 110RMT r3",
"data/original/sub22/exp01/eeg/SP 110RMT r1",
"data/original/sub22/exp01/eeg/SP 110RMT r2",
"data/original/sub22/exp01/eeg/SP 110RMT r3"];
%%
for k = 1:length(paths)
try
disp(paths(k))
filelist = dir(strcat('/home/raquib/Desktop/workspaces/mep-classification/', paths(k), '/*.cnt'));
file = filelist(1);
[EEG] = pop_loadeep_v4([file.folder '/' file.name]);
EEG = pop_chanedit(EEG, 'load', {'/home/raquib/Dropbox (Sydney Uni)/Sydney Research/TMS EEG/TESA/VoltageMaps/newlocation2.ced' 'filetype' 'autodetect'},'changefield',{64 'datachan' 0},'changefield',{64 'datachan' 1});
cfg = [];
cfg.EventCode = '1';
cfg.TMSEEGrootFolder = '/home/raquib/Desktop/workspaces/tmseeg-tesa-script/artist-results';
cfg.plottimes = [15,25,40,60,75,100,150,200,300];
cfg.TrialEnd = 1000;
[EEG2, badtrials] = ARTISTMain(EEG, cfg);
EEG = pop_saveset(EEG2, 'filename', '009-artist-noresample.set', 'filepath', file.folder);
dlmwrite(strcat(file.folder, '/009-artist-bad-trials-noresample.txt'), badtrials)
catch
warning(strcat('Error in ', paths(k)))
disp('Error')
end
end
%%
finish = 'fff'