-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbatch_mkKsFigs.m
58 lines (41 loc) · 1.55 KB
/
batch_mkKsFigs.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
%% batch_mkKsFigs
%
% make a bunch of figures for each kiloSort direcory (ksDir)
% should be done AFTER manula curation stage in Phy
%% add necessary paths to toolboxes:
paths = addPathsForSpikeSorting;
%% list of paths to raw ephys files
ksDirList = {...
% 'Y:\LAB PROJECTS\scInactivateAndRecord\data\ramsey20190920\'...
% 'Y:\LAB PROJECTS\scInactivateAndRecord\data\ramsey20191016\'...
% 'Y:\LAB PROJECTS\scInactivateAndRecord\data\ramsey20191121\'...
'Y:\LAB PROJECTS\scInactivateAndRecord\data\ramsey20200123\'...
};
nFiles = numel(ksDirList);
%% (1) load sp, (2) mkfigs, (3) convert to su, (4) mkfigs
for iF = 1:nFiles
tic
ksDir = fullfile(ksDirList{iF}, 'kiloSorted');
disp('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~')
disp('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~')
disp(['~~~~~ ' ksDir])
disp('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~')
% load sp:
sp = getSp(ksDir);
% make sure there's a figures folder:
if ~exist(fullfile(ksDir, 'figures'), 'dir')
mkdir(fullfile(ksDir, 'figures'));
end
% set options:
opts.saveFigs = 1;
opts.dirFigs = ksDir;
% make dem figures and save:
mkfig.waveform_overChannels(sp, opts);
mkfig.waveformOverChannels_perCluster(sp, opts);
mkfig.waveformAndSpikeCount_overChannels(sp, opts)
su = sp2su(sp, ksDir);
mkfig.unitSummary(su, opts);
close all
timePassed(iF) = toc;
end
%%