-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathset_parameters_ascii.m
executable file
·82 lines (69 loc) · 3.82 KB
/
set_parameters_ascii.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
function par=set_parameters(filename,handles)
% SPC PARAMETERS
par.mintemp = 0.00; % minimum temperature for SPC
par.maxtemp = 0.201; % maximum temperature for SPC
par.tempstep = 0.01; % temperature steps
par.SWCycles = 100; % SPC iterations for each temperature
par.KNearNeighb=11; % number of nearest neighbors for SPC
par.num_temp = floor((par.maxtemp ...
-par.mintemp)/par.tempstep); % total number of temperatures
par.min_clus = 82; % minimun size of a cluster
par.max_clus = 13; % maximum number of clusters allowed
par.randomseed = 0; % if 0, random seed is taken as the clock value (default)
%par.randomseed = 147; % If not 0, random seed
%par.temp_plot = 'lin'; % temperature plot in linear scale
par.temp_plot = 'log'; % temperature plot in log scale
par.fname = 'data'; % filename for interaction with SPC
% DETECTION PARAMETERS
par.sr= 44100; % sampling rate (in Hz).
par.tmax= 'all'; % maximum time to load
par.w_pre=40; % number of pre-event data points stored
par.w_post=88; % number of post-event data points stored
ref = 1.5; % detector dead time (in ms)
par.ref = floor(ref *par.sr/1000); % conversion to datapoints
par.stdmin = 5; % minimum threshold for detection
par.stdmax = 50; % maximum threshold for detection
par.detect_fmin = 344; %high pass filter for detection
par.detect_fmax = 5512; %low pass filter for detection
par.sort_fmin = 344; %high pass filter for sorting
par.sort_fmax = 5512; %low pass filter for sorting
%par.detection = 'pos'; % type of threshold
%par.detection = 'neg';
par.detection = 'both';
par.segments = 1; % nr. of segments in which the data is cutted.
% INTERPOLATION PARAMETERS
par.int_factor = 2; % interpolation factor
%par.interpolation = 'y'; % interpolation with cubic splines
par.interpolation = 'n';
% FEATURES PARAMETERS
par.inputs=10; % number of inputs to the clustering
par.scales=4; % number of scales for the wavelet decomposition
par.features = 'wav' % type of feature
%par.features = 'pca'
if strcmp(par.features,'pca'); par.inputs=3; end
% FORCE MEMBERSHIP PARAMETERS
par.template_sdnum = 3; % max radius of cluster in std devs.
par.template_k = 10; % # of nearest neighbors
par.template_k_min = 10; % min # of nn for vote
%par.template_type = 'mahal'; % nn, center, ml, mahal
par.template_type = 'center'; % nn, center, ml, mahal
par.force_feature = 'spk'; % feature use for forcing
%par.force_feature = 'wav'; % feature use for forcing
% TEMPLATE MATCHING
%par.match = 'y'; % for template matching
par.match = 'n'; % for template matching
par.max_spk = 20000; % max. # of spikes before starting templ. match.
% HISTOGRAM PARAMETERS
for i=1:par.max_clus+1
eval(['par.nbins' num2str(i-1) ' = 100;']); % # of bins for the ISI histograms
eval(['par.bin_step' num2str(i-1) ' = 1;']); % percentage number of bins to plot
end
par.max_spikes = 1000; % max. # of spikes to be plotted
par.filename = filename;
% Sets to zero fix buttons from aux figures
for i=4:par.max_clus
eval(['par.fix' num2str(i) '=0;'])
end
USER_DATA = get(handles.wave_clus_figure,'userdata');
USER_DATA{1} = par;
set(handles.wave_clus_figure,'userdata',USER_DATA);