forked from MouseLand/Kilosort
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcreateChannelMapFile.m
46 lines (35 loc) · 1.56 KB
/
createChannelMapFile.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
% create a channel map file
Nchannels = 32;
connected = true(Nchannels, 1);
chanMap = 1:Nchannels;
chanMap0ind = chanMap - 1;
xcoords = ones(Nchannels,1);
ycoords = [1:Nchannels]';
kcoords = ones(Nchannels,1); % grouping of channels (i.e. tetrode groups)
fs = 25000; % sampling frequency
save('C:\DATA\Spikes\20150601_chan32_4_900s\chanMap.mat', ...
'chanMap','connected', 'xcoords', 'ycoords', 'kcoords', 'chanMap0ind', 'fs')
%%
Nchannels = 32;
connected = true(Nchannels, 1);
chanMap = 1:Nchannels;
chanMap0ind = chanMap - 1;
xcoords = repmat([1 2 3 4]', 1, Nchannels/4);
xcoords = xcoords(:);
ycoords = repmat(1:Nchannels/4, 4, 1);
ycoords = ycoords(:);
kcoords = ones(Nchannels,1); % grouping of channels (i.e. tetrode groups)
fs = 25000; % sampling frequency
save('C:\DATA\Spikes\Piroska\chanMap.mat', ...
'chanMap','connected', 'xcoords', 'ycoords', 'kcoords', 'chanMap0ind', 'fs')
%%
% kcoords is used to forcefully restrict templates to channels in the same
% channel group. An option can be set in the master_file to allow a fraction
% of all templates to span more channel groups, so that they can capture shared
% noise across all channels. This option is
% ops.criterionNoiseChannels = 0.2;
% if this number is less than 1, it will be treated as a fraction of the total number of clusters
% if this number is larger than 1, it will be treated as the "effective
% number" of channel groups at which to set the threshold. So if a template
% occupies more than this many channel groups, it will not be restricted to
% a single channel group.