-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmartin_pipeline.m
58 lines (41 loc) · 1.2 KB
/
martin_pipeline.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
% Put this file pipeline.m in the same location as the MOHAWK software .m
% files
%%
% Change this to the location where the MOHAWK software data files are
% stored
filepath = '/Volumes/bigdisk/Data/MOHAWK/';
% Change this to the path where EEGLAB is installed
eeglabpath = '/Users/chennu/MATLAB/eeglab/';
%%
filename = '1_pre.fif';
basename = strtok(filename, '.');
%%
EEG = pop_fileio([filepath filename]);
%%
for i = 1:length(EEG.chanlocs)
EEG.chanlocs(i).labels = EEG.chanlocs(i).labels(5:end);
end
%%
EEG.data = EEG.data * 10^6;
%%
EEG=pop_chanedit(EEG, 'lookup',[eeglabpath 'plugins/dipfit2.3/standard_BESA/standard-10-5-cap385.elp']);
%%
EEG = pop_reref( EEG, []);
%%
EEG.setname = basename;
%%
pop_saveset(EEG, 'filename', [basename '.set'], 'filepath', filepath);
%%
% Before running this step, change this line in calcftspec.m from cfg.tapsmofrq = 0.3 to cfg.tapsmofrq = 0.4
calcftspec(basename);
%%
plotftspec(basename);
%%
% Before running this step, change this line in ftcoherence.m from cfg.tapsmofrq = 0.3 to cfg.tapsmofrq = 0.4
ftcoherence(basename);
%%
calcgraph(basename);
%%
% Before running this step, change erange to [0 0.35] and vrange to [0 0.25]
% in plothead.m
plothead(basename, 3);