-
Notifications
You must be signed in to change notification settings - Fork 0
/
master_script_betaStim.m
65 lines (44 loc) · 1.38 KB
/
master_script_betaStim.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
%% script to recreate paper analyses
%Dose Dependent Enhancement of Cortically Evoked Potentials During
%Beta-Oscillation Phase Triggered Direct Cortical Stimulation of Human
%Cortex
% David.J.Caldwell
cd(fileparts(which('master_script_betaStim')));
setup_environment
saveIt = 1;
generateIntermediateData = 0;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
if generateIntermediateData
%% build tables with stimulation locations
A_BuildStimTablesFirst6
A_BuildStimTablesSubj7andPlayback
%% extract peak to peak
B_ExtractNeuralData_PP_reref
multipleSubj_GLMM_script_PP
%% extract phase
% this can take a long time
B_phaseCalc_allChans_processed
end
%% generate table for linear mixed model
multipleSubj_GLMM_script_PP
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% plot histograms of phase delivery
burstHistogram_generation
%% plot cortex with peak to peak
C_PlotBrains_PP
%% plot phases
% phase on cortex
plotPhase_distributions_cortex
% phase for each channel, each subject
plotPhase_distributions_looping_allChans
%% plot phases and EPs together
phase_vs_peak
%% supplementary example fits
plot_example_subject_phases
%% supplementary oscilloscope test
examineExampleSigs
examinerandomSubjectDelivery
extractOscope
%% make baseline subject plots
BETA_ExtractNeuralDataCEPScreen