forked from WagnerLab/ECoG_PPC_RecogMemory
-
Notifications
You must be signed in to change notification settings - Fork 0
/
subCl_tempScript.m
90 lines (70 loc) · 2.39 KB
/
subCl_tempScript.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
90
cd ~/Documents/ECOG/scripts/
dataPath= '../Results/Spectral_Data/group/';
pre = 'allERSPshgamGroup';
post = 'LocksublogPowernonLPCleasL1TvalCh10.mat';
load([dataPath 'clusters/K2Clusters' pre 'stim' post]);
clusterSet1 = out;
load([dataPath 'clusters/K2Clusters' pre 'RT' post]);
clusterSet2 = out;
load([dataPath pre 'stim' post]);
data1 = data;
load([dataPath pre 'RT' post]);
data2 = data;
%%
for jj=1:3
ch = clusterSet1.subCLChans{jj};
X = cell(2,1);
X{1} = data1.BincHits(ch,:);
X{2} = data1.BincCRs (ch,:);
figure();clf; hold on;
set(gcf,'position',[200 200,500,300],'PaperPositionMode','auto');
plotNTraces(X,mean(data1.Bins,2),'oc','loess',0.15)
end
%%
cPath = pwd;
savePath = '/Users/alexg8/Google Drive/Research/ECoG Manuscript/ECoG Manuscript Figures/individualPlotsPDFs/stimHGPcluster/';
for jj=1:2
ch = UsubCl{jj};
X = cell(2,1);
X{1} = data1.BincHits(ch,:);
X{2} = data1.BincCRs (ch,:);
figure();clf; hold on;
set(gcf,'position',[200 200,500,300],'PaperPositionMode','auto');
plotNTraces(X,mean(data1.Bins,2),'oc','loess',0.15)
cd(savePath)
addpath(cPath)
addpath([cPath '/Plotting/'])
filename = ['stimHGP-RTcorrmergedSub-Clusters' num2str(jj)];
plot2svg([filename '.svg'],gcf)
eval(['!' inkscapePath ' -z ' filename '.svg --export-pdf=' filename '.pdf'])
cd(cPath)
end
%%
for jj=1:3
ch = clusterSet2.subCLChans{jj};
X = cell(2,1);
X{1} = data2.BincHits(ch,:);
X{2} = data2.BincCRs (ch,:);
figure();clf; hold on;
set(gcf,'position',[200 200,500,300],'PaperPositionMode','auto');
plotNTraces(X,mean(data2.Bins,2),'oc','loess',0.15)
end
%%
savePath = '/Users/alexg8/Google Drive/Research/ECoG Manuscript/ECoG Manuscript Figures/individualPlotsPDFs/rtHGPcluster/';
for jj=1:2
ch = UsubCl{jj};
X = cell(2,1);
X{1} = data2.BincHits(ch,:);
X{2} = data2.BincCRs (ch,:);
figure();clf; hold on;
set(gcf,'position',[200 200,500,300],'PaperPositionMode','auto');
plotNTraces(X,mean(data2.Bins,2),'oc','loess',0.15)
set(gca,'yaxis','right')
cd(savePath)
addpath(cPath)
addpath([cPath '/Plotting/'])
filename = ['rtHGP-RTmergedSub-Clusters' num2str(jj)];
plot2svg([filename '.svg'],gcf)
eval(['!' inkscapePath ' -z ' filename '.svg --export-pdf=' filename '.pdf'])
cd(cPath)
end