-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_memOrder.m
86 lines (60 loc) · 1.54 KB
/
test_memOrder.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
%% Clear
clear;
clc;
%% Add path
addpath('C:\Users\Kevin_Tyner\Documents\MATLAB\matnwb-2.6.0.2');
%% Set properties
freq = [4;8]; % 4;8 8;12
boundary = ["SB"]; % "SB", "HB", "NB"
region = ["anterior hippocampus"];
hemi = ["L"];
method = ["granger"]; % "granger", "coherence"
lfreq = 1; % 0.5
%hfreq = 250;
%% Test folder
folderDir = 'Z:\Tyner_K_Projects\MEM_ORDER\DataFolder\MW30\'; % 30, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18
%% Construct object
obj = memOrder(folderDir);
%% Load eye data
loadEyeData(obj);
%% Fix channel names
fixChNames(obj);
%% Identify bad channels
identifyBads(obj);
%% Bipolar reference
bipolarReference(obj);
%% Filter
dataFilter(obj,lfreq);
%% Identify TTLs
identifyTTLs(obj);
%% Identify the boundaries for the individual trials
identifyBoundaries(obj);
%% Break the data up into sections and epochs
allocateData(obj);
%% Baseline correction
baselineCorrection(obj);
%% Z-score the epochs
calculateZscore(obj);
%% Notes
% All subsequent functions are optional.
%% Plot LFPs for each task
plotPhases(obj);
%% Average spectrogram
averageSpectrogram(obj);
%% Plot spectrograms
% Only run this function if the averageSpectrogram function was run
plotSpectrograms(obj);
%% Plot frequency bands
plotFrequencyBands(obj);
%% Examine theta phase relation to saccades
thetaSaccade(obj,2,10);
%% Compute power
computePower(obj,freq);
%% Compute statistics
computeStats(obj);
%% Functional connectivity
%functionalConnectivity(obj,method);
%% Analyze significant changes in FC
%analyzeFC(obj,boundary);
%% SPOOOF
SPOOOF(obj,0.5,250);