-
Notifications
You must be signed in to change notification settings - Fork 0
/
ctf_jtfa_topo.m
78 lines (60 loc) · 2.24 KB
/
ctf_jtfa_topo.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
% ctftopo
% EEGLAB script for plotting topo maps of CTF data
% Thomas Ferree @ UCSF
% Revised 2/17/2004
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear;
% toggle saving eeglab .set, 0 = no, 1 = yes
saveSet = 0;
% set machine: 1 = TiBoard, 2 = Glutamate/Acetylcholine/Brainmap
machine = 2;
% set input and output paths
if machine == 1
pathdata = '/Users/tferree/Documents/Data/Attention/HighN/';
pathersp = '/Users/tferree/Documents/Research/Attention/HighN/Numerical/';
pathtemp = '/Users/tferree/Documents/Research/Attention/HighN/Temp/';
else
addpath /home/tferree/EEGLAB42/;
addpath /home/tferree/Attention/HighN/ctf2eeglab/;
pathdata = '/home/cdale/HighN/';
pathersp = '/home/tferree/Attention/HighN/Numerical/';
pathtemp = '/home/tferree/Attention/HighN/Temp/';
end
% set subject and conditions
%subject = 'HM'
%date = '20040126';
%subject = 'GN'
%date = '20040109';
subject = 'CJ'
date = '20040116';
cue = 'CueL'
% load ERSP results
load([pathersp 'ERSP_' subject '_' cue '.mat']);
% call Darren's scripts
%ctffolder = [pathdata subject '_DNL_' date '_HiN_' cue 'InvNT' '-fEOG.ds'];
ctffolder = [pathdata subject '_epoch' filesep 'processed' filesep subject '_DNL_' date '_HiN_' cue 'InvNT' '-fEOG.ds'];
ctfchannels = 'meg';
ctftime = 'all';
ctftrials = [1];
ctf = ctf_read(ctffolder,ctfchannels,ctftime,ctftrials);
ctf2eeglab;
% make topo maps
freqs = allfreqs(1,:,1);
times = alltimes(1,:,1);
maxcolor = 5;
for plottime = 0:100:1800
if plottime <= 9
timestring = ['000' num2str(plottime)];
elseif plottime >= 10 & plottime <= 99
timestring = ['00' num2str(plottime)];
elseif plottime >= 100 & plottime < 1000
timestring = ['0' num2str(plottime)];
else
timestring = num2str(plottime);
end
timefreqlist = [plottime 5; plottime 7; plottime 9; plottime 11; plottime 13; plottime 15; plottime 17];
h3 = figure;
tftopo(allersp,times,freqs,'mode','ave','signifs', allerspboot,'limits',[min(times) max(times) 1 20 -maxcolor, maxcolor],'vert',[0 1000],'chanlocs',EEG.chanlocs,'timefreqs',timefreqlist,'electrodes','off','maplimits',[-maxcolor,maxcolor]);
saveas(h3,[pathtemp 'Topo_' subject '_' cue '_' timestring 'msec.jpg'],'jpg');
close(h3);
end