Skip to content

Commit 0afa067

Browse files
authored
Added src files
1 parent e46b8d6 commit 0afa067

60 files changed

Lines changed: 13075 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/CortElecLoc2spreadsheet.m

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
function CortElecLoc2spreadsheet(pt)
2+
3+
4+
5+
%% load patient-specific electrode locations
6+
if cfg.pt == 3019
7+
clear pathtofile
8+
pathtofile = sprintf('/Volumes/Nexus/DBS/DBS%4.0f/Anatomy/FreeSurfer/preop/Electrode_Locations/archive/Dengyu',cfg.pt);
9+
cd(pathtofile)
10+
load('CortElecLocL_SMC_eq.mat')
11+
else
12+
clear pathtofile
13+
pathtofile = sprintf('/Volumes/Nexus/DBS/DBS%4.0f/Anatomy/FreeSurfer/preop/Electrode_Locations',cfg.pt);
14+
cd(pathtofile)
15+
load('CortElecLocL_eq.mat')
16+
end
17+
18+
%only proceed with first 1:63 electrodes for now
19+
for chann = 1:126
20+
CortElecLoc2{chann} = CortElecLoc{chann};
21+
end
22+
clear CortElecLoc
23+
CortElecLoc = CortElecLoc2;
24+
25+
26+
%some patients have "inverted" electrode arrays (eg. LFP 1 would be on LFP 21, and vice versa)
27+
if cfg.pt == 3017
28+
CortElecLoc(1:21) = flip(CortElecLoc(1:21));
29+
CortElecLoc(22:42) = flip(CortElecLoc(22:42));
30+
CortElecLoc(43:63) = flip(CortElecLoc(43:63));
31+
end
32+
33+
%% assign values
34+
35+
for i = 1:63
36+
37+
mat(i,1) = CortElecLoc{i}(1);
38+
mat(i,2) = CortElecLoc{i}(2);
39+
mat(i,3) = CortElecLoc{i}(3);
40+
41+
end
42+
43+
mat(64,1) = NaN;
44+
mat(64,2) = NaN;
45+
mat(64,3) = NaN;
46+
47+
48+
for i = 65:126
49+
50+
mat(i,1) = CortElecLoc{i}(1);
51+
mat(i,2) = CortElecLoc{i}(2);
52+
mat(i,3) = CortElecLoc{i}(3);
53+
54+
end
55+
56+
for i = 127:163
57+
58+
mat(i,1) = NaN;
59+
mat(i,2) = NaN;
60+
mat(i,3) = NaN;
61+
62+
end
63+
64+
65+
66+
% MANUALLY copy "mat" to the spreadsheet result
67+
68+
69+

src/EMG_no_info_DBS3025.mat

29.7 KB
Binary file not shown.
3.38 KB
Binary file not shown.
191 KB
Binary file not shown.

0 commit comments

Comments
 (0)