Revision 10:4ef8e0e63866

View differences:

parameterStore/MAPparamsEndo.m
1
function method=MAPparamsEndo ...
2
    (BFlist, sampleRate, showParams)
3
% MAPparams<> establishes a complete set of MAP parameters
4
% Parameter file names must be of the form <MAPparams> <name>
5
%
6
% input arguments
7
%  BFlist     (optional) specifies the desired list of channel BFs
8
%    otherwise defaults set below
9
%  sampleRate (optional), default is 50000.
10
%  showParams (optional) =1 prints out the complete set of parameters
11
% output argument
12
%  method passes a miscelleny of values
13

  
14
global inputStimulusParams OMEParams DRNLParams
15
global IHC_VResp_VivoParams IHCpreSynapseParams  AN_IHCsynapseParams
16
global MacGregorParams MacGregorMultiParams  filteredSACFParams
17
global experiment % used by calls from multiThreshold only
18
global IHC_cilia_RPParams
19

  
20
currentFile=mfilename;                      % i.e. the name of this mfile
21
method.parameterSource=currentFile(10:end); % for the record
22

  
23
switchOffEfferent=0;
24
efferentDelay=0.010;
25
method.segmentDuration=efferentDelay;
26

  
27
if nargin<3, showParams=0; end
28
if nargin<2, sampleRate=50000; end
29
if nargin<1 || BFlist(1)<0 % if BFlist= -1, set BFlist to default
30
    lowestBF=250; 	highestBF= 8000; 	numChannels=21;
31
    % 21 chs (250-8k)includes BFs at 250 500 1000 2000 4000 8000
32
    BFlist=round(logspace(log10(lowestBF),log10(highestBF),numChannels));
33
end
34
% BFlist=1000;
35

  
36
% preserve for backward campatibility
37
method.nonlinCF=BFlist; 
38
method.dt=1/sampleRate; 
39

  
40
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
41
% set  model parameters
42
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
43

  
44
%%  #1 inputStimulus
45
inputStimulusParams=[];
46
inputStimulusParams.sampleRate= sampleRate; 
47

  
48
%%  #2 outerMiddleEar
49
OMEParams=[];  % clear the structure first
50
% outer ear resonances band pass filter  [gain lp order  hp]
51
OMEParams.externalResonanceFilters=      [ 10 1 1000 4000];
52
                                       
53
% highpass stapes filter  
54
%  Huber gives 2e-9 m at 80 dB and 1 kHz (2e-13 at 0 dB SPL)
55
OMEParams.OMEstapesLPcutoff= 1000;
56
OMEParams.stapesScalar=	     45e-9;
57

  
58
% Acoustic reflex: maximum attenuation should be around 25 dB Price (1966)
59
% i.e. a minimum ratio of 0.056.
60
if ~switchOffEfferent
61
    % 'spikes' model: AR based on brainstem spiking activity (LSR)
62
    OMEParams.rateToAttenuationFactor=0.003;   % * N(all ICspikes)
63
%     OMEParams.rateToAttenuationFactor=0;   % * N(all ICspikes)
64
    % 'probability model': Ar based on An firing probabilities (LSR)
65
    OMEParams.rateToAttenuationFactorProb=0.005;% * N(all ANrates)
66
%     OMEParams.rateToAttenuationFactorProb=0;% * N(all ANrates)
67
else
68
    OMEParams.rateToAttenuationFactor=0;        % 0= off
69
    OMEParams.rateToAttenuationFactorProb=0;    % 0= off
70
end
71
% asymptote should be around 100-200 ms
72
OMEParams.ARtau=.05; % AR smoothing function
73
% delay must be longer than the segment length
74
OMEParams.ARdelay=efferentDelay;  %Moss gives 8.5 ms latency
75
OMEParams.ARrateThreshold=0;
76

  
77
%%  #3 DRNL
78
DRNLParams=[];  % clear the structure first
79
DRNLParams.BFlist=BFlist;
80

  
81
% DRNL nonlinear path
82
DRNLParams.a=3e4;     % nonlinear path gain (below compression threshold)
83
% DRNLParams.a=3e2;     % DRNL.a=0 means no OHCs (no nonlinear path)
84

  
85
DRNLParams.b=8e-6;    % *compression threshold raised compression
86
% DRNLParams.b=1;    % b=1 means no compression
87

  
88
DRNLParams.c=0.2;     % compression exponent
89
% nonlinear filters
90
DRNLParams.nonlinCFs=BFlist;
91
DRNLParams.nonlinOrder=	3;           % order of nonlinear gammatone filters
92
p=0.2895;   q=170;  % human  (% p=0.14;   q=366;  % cat)
93
DRNLParams.nlBWs=  p * BFlist + q;
94
DRNLParams.p=p;   DRNLParams.q=q;   % save p and q for printing only
95

  
96
% DRNL linear path:
97
DRNLParams.g=100;     % linear path gain factor
98
% linCF is not necessarily the same as nonlinCF
99
minLinCF=153.13; coeffLinCF=0.7341;   % linCF>nonlinBF for BF < 1 kHz
100
DRNLParams.linCFs=minLinCF+coeffLinCF*BFlist;
101
DRNLParams.linOrder=	3;           % order of linear gammatone filters
102
minLinBW=100; coeffLinBW=0.6531;
103
DRNLParams.linBWs=minLinBW + coeffLinBW*BFlist; % bandwidths of linear  filters
104

  
105
% DRNL MOC efferents
106
DRNLParams.MOCdelay = efferentDelay;            % must be < segment length!
107
if ~switchOffEfferent
108
    % 'spikes' model: MOC based on brainstem spiking activity (HSR)
109
    DRNLParams.rateToAttenuationFactor = .009;  % strength of MOC
110
    DRNLParams.rateToAttenuationFactor = .009;  % strength of MOC
111
%      DRNLParams.rateToAttenuationFactor = 0;  % strength of MOC
112

  
113
    % 'spikes' model: MOC based on brainstem spiking activity (HSR)
114
    DRNLParams.rateToAttenuationFactorProb = .002;  % strength of MOC
115
else
116
    DRNLParams.rateToAttenuationFactor = 0;     % 0 = MOC off (probability)
117
    DRNLParams.rateToAttenuationFactorProb = 0; % 0 = MOC off (spikes)
118
end
119
DRNLParams.MOCtau =.03;                         % smoothing for MOC
120
DRNLParams.MOCrateThreshold =50;                % set to AN rate threshold
121

  
122

  
123
%% #4 IHC_cilia_RPParams
124

  
125
IHC_cilia_RPParams.tc=	0.0003;   % 0.0003 filter time simulates viscocity
126
% IHC_cilia_RPParams.tc=	0.0005;   % 0.0003 filter time simulates viscocity
127
IHC_cilia_RPParams.C=	0.05;      % 0.1 scalar (C_cilia ) 
128
IHC_cilia_RPParams.u0=	5e-9;       
129
IHC_cilia_RPParams.s0=	30e-9;
130
IHC_cilia_RPParams.u1=	1e-9;
131
IHC_cilia_RPParams.s1=	1e-9;
132

  
133
IHC_cilia_RPParams.Gmax= 5e-9;    % 2.5e-9 maximum conductance (Siemens)
134
IHC_cilia_RPParams.Ga=	1e-9;  % 4.3e-9 fixed apical membrane conductance
135

  
136
%  #5 IHC_RP
137
IHC_cilia_RPParams.Cab=	4e-012;         % IHC capacitance (F)
138
IHC_cilia_RPParams.Cab=	1e-012;         % IHC capacitance (F)
139
% IHC_cilia_RPParams.Et=	0.100;          % endocochlear potential (V)
140
IHC_cilia_RPParams.Et=	0.07;          % endocochlear potential (V)
141

  
142
IHC_cilia_RPParams.Gk=	2e-008;         % 1e-8 potassium conductance (S)
143
IHC_cilia_RPParams.Ek=	-0.08;          % -0.084 K equilibrium potential
144
IHC_cilia_RPParams.Rpc=	0.04;           % combined resistances
145

  
146

  
147
%%  #5 IHCpreSynapse
148
IHCpreSynapseParams=[];
149
IHCpreSynapseParams.GmaxCa=	14e-9;% maximum calcium conductance
150
IHCpreSynapseParams.GmaxCa=	12e-9;% maximum calcium conductance
151
IHCpreSynapseParams.ECa=	0.066;  % calcium equilibrium potential
152
IHCpreSynapseParams.beta=	400;	% determine Ca channel opening
153
IHCpreSynapseParams.gamma=	100;	% determine Ca channel opening
154
IHCpreSynapseParams.tauM=	0.00005;	% membrane time constant ?0.1ms
155
IHCpreSynapseParams.power=	3;
156
% reminder: changing z has a strong effect on HF thresholds (like Et)
157
IHCpreSynapseParams.z=	    2e42;   % scalar Ca -> vesicle release rate
158

  
159
LSRtauCa=50e-6;            HSRtauCa=85e-6;            % seconds
160
% LSRtauCa=35e-6;            HSRtauCa=70e-6;            % seconds
161
IHCpreSynapseParams.tauCa= [LSRtauCa HSRtauCa]; %LSR and HSR fiber
162

  
163
%%  #6 AN_IHCsynapse
164
% c=kym/(y(l+r)+kl)	(spontaneous rate)
165
% c=(approx)  ym/l  (saturated rate)
166
AN_IHCsynapseParams=[];             % clear the structure first
167
AN_IHCsynapseParams.M=	12;         % maximum vesicles at synapse
168
AN_IHCsynapseParams.y=	4;          % depleted vesicle replacement rate
169
AN_IHCsynapseParams.y=	6;          % depleted vesicle replacement rate
170

  
171
AN_IHCsynapseParams.x=	30;         % replenishment from re-uptake store
172
AN_IHCsynapseParams.x=	60;         % replenishment from re-uptake store
173

  
174
% reduce l to increase saturated rate
175
AN_IHCsynapseParams.l=	100; % *loss rate of vesicles from the cleft
176
AN_IHCsynapseParams.l=	250; % *loss rate of vesicles from the cleft
177

  
178
AN_IHCsynapseParams.r=	500; % *reuptake rate from cleft into cell
179
% AN_IHCsynapseParams.r=	300; % *reuptake rate from cleft into cell
180

  
181
AN_IHCsynapseParams.refractory_period=	0.00075;
182
% number of AN fibers at each BF (used only for spike generation)
183
AN_IHCsynapseParams.numFibers=	100; 
184
AN_IHCsynapseParams.TWdelay=0.004;  % ?delay before stimulus first spike
185

  
186
%%  #7 MacGregorMulti (first order brainstem neurons)
187
MacGregorMultiParams=[];
188
MacGregorMultiType='chopper'; % MacGregorMultiType='primary-like'; %choose
189
switch MacGregorMultiType
190
    case 'primary-like'
191
        MacGregorMultiParams.nNeuronsPerBF=	10;   % N neurons per BF
192
        MacGregorMultiParams.type = 'primary-like cell';
193
        MacGregorMultiParams.fibersPerNeuron=4;   % N input fibers
194
        MacGregorMultiParams.dendriteLPfreq=200;  % dendritic filter
195
        MacGregorMultiParams.currentPerSpike=0.11e-6; % (A) per spike
196
        MacGregorMultiParams.Cap=4.55e-9;   % cell capacitance (Siemens)
197
        MacGregorMultiParams.tauM=5e-4;     % membrane time constant (s)
198
        MacGregorMultiParams.Ek=-0.01;      % K+ eq. potential (V)
199
        MacGregorMultiParams.dGkSpike=3.64e-5; % K+ cond.shift on spike,S
200
        MacGregorMultiParams.tauGk=	0.0012; % K+ conductance tau (s)
201
        MacGregorMultiParams.Th0=	0.01;   % equilibrium threshold (V)
202
        MacGregorMultiParams.c=	0.01;       % threshold shift on spike, (V)
203
        MacGregorMultiParams.tauTh=	0.015;  % variable threshold tau
204
        MacGregorMultiParams.Er=-0.06;      % resting potential (V)
205
        MacGregorMultiParams.Eb=0.06;       % spike height (V)
206

  
207
    case 'chopper'
208
        MacGregorMultiParams.nNeuronsPerBF=	10;   % N neurons per BF
209
        MacGregorMultiParams.type = 'chopper cell';
210
        MacGregorMultiParams.fibersPerNeuron=10;  % N input fibers
211
%         MacGregorMultiParams.fibersPerNeuron=6;  % N input fibers
212

  
213
        MacGregorMultiParams.dendriteLPfreq=50;   % dendritic filter
214
        MacGregorMultiParams.currentPerSpike=35e-9; % *per spike
215
%         MacGregorMultiParams.currentPerSpike=45e-9; % *per spike
216
        
217
        MacGregorMultiParams.Cap=1.67e-8; % ??cell capacitance (Siemens)
218
        MacGregorMultiParams.tauM=0.002;  % membrane time constant (s)
219
        MacGregorMultiParams.Ek=-0.01;    % K+ eq. potential (V)
220
        MacGregorMultiParams.dGkSpike=1.33e-4; % K+ cond.shift on spike,S
221
        MacGregorMultiParams.tauGk=	0.0001;% K+ conductance tau (s)
222
        MacGregorMultiParams.Th0=	0.01; % equilibrium threshold (V)
223
        MacGregorMultiParams.c=	0;        % threshold shift on spike, (V)
224
        MacGregorMultiParams.tauTh=	0.02; % variable threshold tau
225
        MacGregorMultiParams.Er=-0.06;    % resting potential (V)
226
        MacGregorMultiParams.Eb=0.06;     % spike height (V)
227
        MacGregorMultiParams.PSTHbinWidth=	1e-4;
228
end
229

  
230
%%  #8 MacGregor (second-order neuron). Only one per channel
231
MacGregorParams=[];                 % clear the structure first
232
MacGregorParams.type = 'chopper cell';
233
MacGregorParams.fibersPerNeuron=10; % N input fibers
234
MacGregorParams.dendriteLPfreq=100; % dendritic filter
235
MacGregorParams.currentPerSpike=120e-9;% *(A) per spike
236

  
237
MacGregorParams.Cap=16.7e-9;        % cell capacitance (Siemens)
238
MacGregorParams.tauM=0.002;         % membrane time constant (s)
239
MacGregorParams.Ek=-0.01;           % K+ eq. potential (V)
240
MacGregorParams.dGkSpike=1.33e-4;   % K+ cond.shift on spike,S
241
MacGregorParams.tauGk=	0.0003;     % K+ conductance tau (s)
242
MacGregorParams.Th0=	0.01;       % equilibrium threshold (V)
243
MacGregorParams.c=	0;              % threshold shift on spike, (V)
244
MacGregorParams.tauTh=	0.02;       % variable threshold tau
245
MacGregorParams.Er=-0.06;           % resting potential (V)
246
MacGregorParams.Eb=0.06;            % spike height (V)
247
MacGregorParams.debugging=0;        % (special)
248
% wideband accepts input from all channels (of same fiber type)
249
% use wideband to create inhibitory units
250
MacGregorParams.wideband=0;         % special for wideband units
251
% MacGregorParams.saveAllData=0;
252

  
253
%%  #9 filteredSACF
254
minPitch=	300; maxPitch=	3000; numPitches=60;    % specify lags
255
pitches=100*log10(logspace(minPitch/100, maxPitch/100, numPitches));
256
filteredSACFParams.lags=1./pitches;     % autocorrelation lags vector
257
filteredSACFParams.acfTau=	.003;       % time constant of running ACF
258
filteredSACFParams.lambda=	0.12;       % slower filter to smooth ACF
259
filteredSACFParams.plotFilteredSACF=1;  % 0 plots unfiltered ACFs
260
filteredSACFParams.plotACFs=0;          % special plot (see code)
261
%  filteredSACFParams.usePressnitzer=0; % attenuates ACF at  long lags
262
filteredSACFParams.lagsProcedure=  'useAllLags';
263
% filteredSACFParams.lagsProcedure=  'useBernsteinLagWeights';
264
% filteredSACFParams.lagsProcedure=  'omitShortLags';
265
filteredSACFParams.criterionForOmittingLags=3;
266

  
267
% checks
268
if AN_IHCsynapseParams.numFibers<MacGregorMultiParams.fibersPerNeuron
269
    error('MacGregorMulti: too few input fibers for input to MacG unit')
270
end
271

  
272

  
273
%% write all parameters to the command window
274
% showParams is currently set at the top of htis function
275
if showParams
276
    fprintf('\n %%%%%%%%\n')
277
    fprintf('\n%s\n', method.parameterSource)
278
    fprintf('\n')
279
    nm=UTIL_paramsList(whos);
280
    for i=1:length(nm)
281
        %         eval(['UTIL_showStruct(' nm{i} ', ''' nm{i} ''')'])
282
        if ~strcmp(nm(i), 'method')
283
            eval(['UTIL_showStructureSummary(' nm{i} ', ''' nm{i} ''', 10)'])
284
        end
285
    end
286
end
287

  
288

  
289

  
290
% **********************************************************************  comparison data
291
% store individual data here for display on the multiThreshold GUI (if used)
292
% the final value in each vector is an identifier (BF or duration))
293
if isstruct(experiment)
294
    switch experiment.paradigm
295
        case {'IFMC','IFMC_8ms'}
296
            % based on MPa
297
            comparisonData=[
298
                66	51	49	48	46	45	54	250;
299
                60	54	46	42	39	49	65	500;
300
                64	51	38	32	33	59	75	1000;
301
                59	51	36	30	41	81	93	2000;
302
                71	63	53	44	36	76	95	4000;
303
                70	64	43	35	35	66	88	6000;
304
                110	110	110	110	110	110	110	8000;
305
                ];
306
            if length(BFlist)==1 && ~isempty(comparisonData)
307
                availableFrequencies=comparisonData(:,end)';
308
                findRow= find(BFlist==availableFrequencies);
309
                if ~isempty (findRow)
310
                    experiment.comparisonData=comparisonData(findRow,:);
311
                end
312
            end
313

  
314
        case {'TMC','TMC_8ms'}
315
            % based on MPa
316
            comparisonData=[
317
                48	58	63	68	75	80	85	92	99	250;
318
                33	39	40	49	52	61	64	77	79	500;
319
                39	42	50	81	83	92	96	97	110	1000;
320
                24	26	32	37	46	51	59	71	78	2000;
321
                65	68	77	85	91	93	110	110	110	4000;
322
                20	19	26	44	80	95	96	110	110	6000;
323
                ];
324
            if length(BFlist)==1 && ~isempty(comparisonData)
325
                availableFrequencies=comparisonData(:,end)';
326
                findRow= find(BFlist==availableFrequencies);
327
                if ~isempty (findRow)
328
                    experiment.comparisonData=comparisonData(findRow,:);
329
                end
330
            end
331

  
332
        case { 'absThreshold',  'absThreshold_8'}
333
            % MPa thresholds
334
            experiment.comparisonData=[
335
                32	26	16	18	22	22 0.008;
336
                16	13	6	9	15	11 0.500
337
                ];
338

  
339

  
340
        otherwise
341
            experiment.comparisonData=[];
342
    end
343
end
344

  
345

  
parameterStore/MAPparamsOHC.m
1
function method=MAPparamsOHC ...
2
    (BFlist, sampleRate, showParams)
3
% MAPparams<> establishes a complete set of MAP parameters
4
% Parameter file names must be of the form <MAPparams> <name>
5
%
6
% input arguments
7
%  BFlist     (optional) specifies the desired list of channel BFs
8
%    otherwise defaults set below
9
%  sampleRate (optional), default is 50000.
10
%  showParams (optional) =1 prints out the complete set of parameters
11
% output argument
12
%  method passes a miscelleny of values
13

  
14
global inputStimulusParams OMEParams DRNLParams
15
global IHC_VResp_VivoParams IHCpreSynapseParams  AN_IHCsynapseParams
16
global MacGregorParams MacGregorMultiParams  filteredSACFParams
17
global experiment % used by calls from multiThreshold only
18
global IHC_cilia_RPParams
19

  
20
currentFile=mfilename;                      % i.e. the name of this mfile
21
method.parameterSource=currentFile(10:end); % for the record
22

  
23
switchOffEfferent=0;
24
efferentDelay=0.010;
25
method.segmentDuration=efferentDelay;
26

  
27
if nargin<3, showParams=0; end
28
if nargin<2, sampleRate=50000; end
29
if nargin<1 || BFlist(1)<0 % if BFlist= -1, set BFlist to default
30
    lowestBF=250; 	highestBF= 8000; 	numChannels=21;
31
    % 21 chs (250-8k)includes BFs at 250 500 1000 2000 4000 8000
32
    BFlist=round(logspace(log10(lowestBF),log10(highestBF),numChannels));
33
end
34
% BFlist=1000;
35

  
36
% preserve for backward campatibility
37
method.nonlinCF=BFlist; 
38
method.dt=1/sampleRate; 
39

  
40
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
41
% set  model parameters
42
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
43

  
44
%%  #1 inputStimulus
45
inputStimulusParams=[];
46
inputStimulusParams.sampleRate= sampleRate; 
47

  
48
%%  #2 outerMiddleEar
49
OMEParams=[];  % clear the structure first
50
% outer ear resonances band pass filter  [gain lp order  hp]
51
OMEParams.externalResonanceFilters=      [ 10 1 1000 4000];
52
                                       
53
% highpass stapes filter  
54
%  Huber gives 2e-9 m at 80 dB and 1 kHz (2e-13 at 0 dB SPL)
55
OMEParams.OMEstapesLPcutoff= 1000;
56
OMEParams.stapesScalar=	     45e-9;
57

  
58
% Acoustic reflex: maximum attenuation should be around 25 dB Price (1966)
59
% i.e. a minimum ratio of 0.056.
60
if ~switchOffEfferent
61
    % 'spikes' model: AR based on brainstem spiking activity (LSR)
62
    OMEParams.rateToAttenuationFactor=0.003;   % * N(all ICspikes)
63
%     OMEParams.rateToAttenuationFactor=0;   % * N(all ICspikes)
64
    % 'probability model': Ar based on An firing probabilities (LSR)
65
    OMEParams.rateToAttenuationFactorProb=0.005;% * N(all ANrates)
66
%     OMEParams.rateToAttenuationFactorProb=0;% * N(all ANrates)
67
else
68
    OMEParams.rateToAttenuationFactor=0;        % 0= off
69
    OMEParams.rateToAttenuationFactorProb=0;    % 0= off
70
end
71
% asymptote should be around 100-200 ms
72
OMEParams.ARtau=.05; % AR smoothing function
73
% delay must be longer than the segment length
74
OMEParams.ARdelay=efferentDelay;  %Moss gives 8.5 ms latency
75
OMEParams.ARrateThreshold=0;
76

  
77
%%  #3 DRNL
78
DRNLParams=[];  % clear the structure first
79
DRNLParams.BFlist=BFlist;
80

  
81
% DRNL nonlinear path
82
DRNLParams.a=3e4;     % nonlinear path gain (below compression threshold)
83
DRNLParams.a=0;     % DRNL.a=0 means no OHCs (no nonlinear path)
84

  
85
DRNLParams.b=8e-6;    % *compression threshold raised compression
86
% DRNLParams.b=1;    % b=1 means no compression
87

  
88
DRNLParams.c=0.2;     % compression exponent
89
% nonlinear filters
90
DRNLParams.nonlinCFs=BFlist;
91
DRNLParams.nonlinOrder=	3;           % order of nonlinear gammatone filters
92
p=0.2895;   q=170;  % human  (% p=0.14;   q=366;  % cat)
93
DRNLParams.nlBWs=  p * BFlist + q;
94
DRNLParams.p=p;   DRNLParams.q=q;   % save p and q for printing only
95

  
96
% DRNL linear path:
97
DRNLParams.g=100;     % linear path gain factor
98
% linCF is not necessarily the same as nonlinCF
99
minLinCF=153.13; coeffLinCF=0.7341;   % linCF>nonlinBF for BF < 1 kHz
100
DRNLParams.linCFs=minLinCF+coeffLinCF*BFlist;
101
DRNLParams.linOrder=	3;           % order of linear gammatone filters
102
minLinBW=100; coeffLinBW=0.6531;
103
DRNLParams.linBWs=minLinBW + coeffLinBW*BFlist; % bandwidths of linear  filters
104

  
105
% DRNL MOC efferents
106
DRNLParams.MOCdelay = efferentDelay;            % must be < segment length!
107
if ~switchOffEfferent
108
    % 'spikes' model: MOC based on brainstem spiking activity (HSR)
109
    DRNLParams.rateToAttenuationFactor = .009;  % strength of MOC
110
    DRNLParams.rateToAttenuationFactor = .009;  % strength of MOC
111
%      DRNLParams.rateToAttenuationFactor = 0;  % strength of MOC
112

  
113
    % 'spikes' model: MOC based on brainstem spiking activity (HSR)
114
    DRNLParams.rateToAttenuationFactorProb = .002;  % strength of MOC
115
else
116
    DRNLParams.rateToAttenuationFactor = 0;     % 0 = MOC off (probability)
117
    DRNLParams.rateToAttenuationFactorProb = 0; % 0 = MOC off (spikes)
118
end
119
DRNLParams.MOCtau =.03;                         % smoothing for MOC
120
DRNLParams.MOCrateThreshold =50;                % set to AN rate threshold
121

  
122

  
123
%% #4 IHC_cilia_RPParams
124

  
125
IHC_cilia_RPParams.tc=	0.0003;   % 0.0003 filter time simulates viscocity
126
% IHC_cilia_RPParams.tc=	0.0005;   % 0.0003 filter time simulates viscocity
127
IHC_cilia_RPParams.C=	0.05;      % 0.1 scalar (C_cilia ) 
128
IHC_cilia_RPParams.u0=	5e-9;       
129
IHC_cilia_RPParams.s0=	30e-9;
130
IHC_cilia_RPParams.u1=	1e-9;
131
IHC_cilia_RPParams.s1=	1e-9;
132

  
133
IHC_cilia_RPParams.Gmax= 5e-9;    % 2.5e-9 maximum conductance (Siemens)
134
IHC_cilia_RPParams.Ga=	1e-9;  % 4.3e-9 fixed apical membrane conductance
135

  
136
%  #5 IHC_RP
137
IHC_cilia_RPParams.Cab=	4e-012;         % IHC capacitance (F)
138
IHC_cilia_RPParams.Cab=	1e-012;         % IHC capacitance (F)
139
IHC_cilia_RPParams.Et=	0.100;          % endocochlear potential (V)
140
% IHC_cilia_RPParams.Et=	0.07;          % endocochlear potential (V)
141

  
142
IHC_cilia_RPParams.Gk=	2e-008;         % 1e-8 potassium conductance (S)
143
IHC_cilia_RPParams.Ek=	-0.08;          % -0.084 K equilibrium potential
144
IHC_cilia_RPParams.Rpc=	0.04;           % combined resistances
145

  
146

  
147
%%  #5 IHCpreSynapse
148
IHCpreSynapseParams=[];
149
IHCpreSynapseParams.GmaxCa=	14e-9;% maximum calcium conductance
150
IHCpreSynapseParams.GmaxCa=	12e-9;% maximum calcium conductance
151
IHCpreSynapseParams.ECa=	0.066;  % calcium equilibrium potential
152
IHCpreSynapseParams.beta=	400;	% determine Ca channel opening
153
IHCpreSynapseParams.gamma=	100;	% determine Ca channel opening
154
IHCpreSynapseParams.tauM=	0.00005;	% membrane time constant ?0.1ms
155
IHCpreSynapseParams.power=	3;
156
% reminder: changing z has a strong effect on HF thresholds (like Et)
157
IHCpreSynapseParams.z=	    2e42;   % scalar Ca -> vesicle release rate
158

  
159
LSRtauCa=50e-6;            HSRtauCa=85e-6;            % seconds
160
% LSRtauCa=35e-6;            HSRtauCa=70e-6;            % seconds
161
IHCpreSynapseParams.tauCa= [LSRtauCa HSRtauCa]; %LSR and HSR fiber
162

  
163
%%  #6 AN_IHCsynapse
164
% c=kym/(y(l+r)+kl)	(spontaneous rate)
165
% c=(approx)  ym/l  (saturated rate)
166
AN_IHCsynapseParams=[];             % clear the structure first
167
AN_IHCsynapseParams.M=	12;         % maximum vesicles at synapse
168
AN_IHCsynapseParams.y=	4;          % depleted vesicle replacement rate
169
AN_IHCsynapseParams.y=	6;          % depleted vesicle replacement rate
170

  
171
AN_IHCsynapseParams.x=	30;         % replenishment from re-uptake store
172
AN_IHCsynapseParams.x=	60;         % replenishment from re-uptake store
173

  
174
% reduce l to increase saturated rate
175
AN_IHCsynapseParams.l=	100; % *loss rate of vesicles from the cleft
176
AN_IHCsynapseParams.l=	250; % *loss rate of vesicles from the cleft
177

  
178
AN_IHCsynapseParams.r=	500; % *reuptake rate from cleft into cell
179
% AN_IHCsynapseParams.r=	300; % *reuptake rate from cleft into cell
180

  
181
AN_IHCsynapseParams.refractory_period=	0.00075;
182
% number of AN fibers at each BF (used only for spike generation)
183
AN_IHCsynapseParams.numFibers=	100; 
184
AN_IHCsynapseParams.TWdelay=0.004;  % ?delay before stimulus first spike
185

  
186
%%  #7 MacGregorMulti (first order brainstem neurons)
187
MacGregorMultiParams=[];
188
MacGregorMultiType='chopper'; % MacGregorMultiType='primary-like'; %choose
189
switch MacGregorMultiType
190
    case 'primary-like'
191
        MacGregorMultiParams.nNeuronsPerBF=	10;   % N neurons per BF
192
        MacGregorMultiParams.type = 'primary-like cell';
193
        MacGregorMultiParams.fibersPerNeuron=4;   % N input fibers
194
        MacGregorMultiParams.dendriteLPfreq=200;  % dendritic filter
195
        MacGregorMultiParams.currentPerSpike=0.11e-6; % (A) per spike
196
        MacGregorMultiParams.Cap=4.55e-9;   % cell capacitance (Siemens)
197
        MacGregorMultiParams.tauM=5e-4;     % membrane time constant (s)
198
        MacGregorMultiParams.Ek=-0.01;      % K+ eq. potential (V)
199
        MacGregorMultiParams.dGkSpike=3.64e-5; % K+ cond.shift on spike,S
200
        MacGregorMultiParams.tauGk=	0.0012; % K+ conductance tau (s)
201
        MacGregorMultiParams.Th0=	0.01;   % equilibrium threshold (V)
202
        MacGregorMultiParams.c=	0.01;       % threshold shift on spike, (V)
203
        MacGregorMultiParams.tauTh=	0.015;  % variable threshold tau
204
        MacGregorMultiParams.Er=-0.06;      % resting potential (V)
205
        MacGregorMultiParams.Eb=0.06;       % spike height (V)
206

  
207
    case 'chopper'
208
        MacGregorMultiParams.nNeuronsPerBF=	10;   % N neurons per BF
209
        MacGregorMultiParams.type = 'chopper cell';
210
        MacGregorMultiParams.fibersPerNeuron=10;  % N input fibers
211
%         MacGregorMultiParams.fibersPerNeuron=6;  % N input fibers
212

  
213
        MacGregorMultiParams.dendriteLPfreq=50;   % dendritic filter
214
        MacGregorMultiParams.currentPerSpike=35e-9; % *per spike
215
%         MacGregorMultiParams.currentPerSpike=45e-9; % *per spike
216
        
217
        MacGregorMultiParams.Cap=1.67e-8; % ??cell capacitance (Siemens)
218
        MacGregorMultiParams.tauM=0.002;  % membrane time constant (s)
219
        MacGregorMultiParams.Ek=-0.01;    % K+ eq. potential (V)
220
        MacGregorMultiParams.dGkSpike=1.33e-4; % K+ cond.shift on spike,S
221
        MacGregorMultiParams.tauGk=	0.0001;% K+ conductance tau (s)
222
        MacGregorMultiParams.Th0=	0.01; % equilibrium threshold (V)
223
        MacGregorMultiParams.c=	0;        % threshold shift on spike, (V)
224
        MacGregorMultiParams.tauTh=	0.02; % variable threshold tau
225
        MacGregorMultiParams.Er=-0.06;    % resting potential (V)
226
        MacGregorMultiParams.Eb=0.06;     % spike height (V)
227
        MacGregorMultiParams.PSTHbinWidth=	1e-4;
228
end
229

  
230
%%  #8 MacGregor (second-order neuron). Only one per channel
231
MacGregorParams=[];                 % clear the structure first
232
MacGregorParams.type = 'chopper cell';
233
MacGregorParams.fibersPerNeuron=10; % N input fibers
234
MacGregorParams.dendriteLPfreq=100; % dendritic filter
235
MacGregorParams.currentPerSpike=120e-9;% *(A) per spike
236

  
237
MacGregorParams.Cap=16.7e-9;        % cell capacitance (Siemens)
238
MacGregorParams.tauM=0.002;         % membrane time constant (s)
239
MacGregorParams.Ek=-0.01;           % K+ eq. potential (V)
240
MacGregorParams.dGkSpike=1.33e-4;   % K+ cond.shift on spike,S
241
MacGregorParams.tauGk=	0.0003;     % K+ conductance tau (s)
242
MacGregorParams.Th0=	0.01;       % equilibrium threshold (V)
243
MacGregorParams.c=	0;              % threshold shift on spike, (V)
244
MacGregorParams.tauTh=	0.02;       % variable threshold tau
245
MacGregorParams.Er=-0.06;           % resting potential (V)
246
MacGregorParams.Eb=0.06;            % spike height (V)
247
MacGregorParams.debugging=0;        % (special)
248
% wideband accepts input from all channels (of same fiber type)
249
% use wideband to create inhibitory units
250
MacGregorParams.wideband=0;         % special for wideband units
251
% MacGregorParams.saveAllData=0;
252

  
253
%%  #9 filteredSACF
254
minPitch=	300; maxPitch=	3000; numPitches=60;    % specify lags
255
pitches=100*log10(logspace(minPitch/100, maxPitch/100, numPitches));
256
filteredSACFParams.lags=1./pitches;     % autocorrelation lags vector
257
filteredSACFParams.acfTau=	.003;       % time constant of running ACF
258
filteredSACFParams.lambda=	0.12;       % slower filter to smooth ACF
259
filteredSACFParams.plotFilteredSACF=1;  % 0 plots unfiltered ACFs
260
filteredSACFParams.plotACFs=0;          % special plot (see code)
261
%  filteredSACFParams.usePressnitzer=0; % attenuates ACF at  long lags
262
filteredSACFParams.lagsProcedure=  'useAllLags';
263
% filteredSACFParams.lagsProcedure=  'useBernsteinLagWeights';
264
% filteredSACFParams.lagsProcedure=  'omitShortLags';
265
filteredSACFParams.criterionForOmittingLags=3;
266

  
267
% checks
268
if AN_IHCsynapseParams.numFibers<MacGregorMultiParams.fibersPerNeuron
269
    error('MacGregorMulti: too few input fibers for input to MacG unit')
270
end
271

  
272

  
273
%% write all parameters to the command window
274
% showParams is currently set at the top of htis function
275
if showParams
276
    fprintf('\n %%%%%%%%\n')
277
    fprintf('\n%s\n', method.parameterSource)
278
    fprintf('\n')
279
    nm=UTIL_paramsList(whos);
280
    for i=1:length(nm)
281
        %         eval(['UTIL_showStruct(' nm{i} ', ''' nm{i} ''')'])
282
        if ~strcmp(nm(i), 'method')
283
            eval(['UTIL_showStructureSummary(' nm{i} ', ''' nm{i} ''', 10)'])
284
        end
285
    end
286
end
287

  
288

  
289

  
290
% **********************************************************************  comparison data
291
% store individual data here for display on the multiThreshold GUI (if used)
292
% the final value in each vector is an identifier (BF or duration))
293
if isstruct(experiment)
294
    switch experiment.paradigm
295
        case {'IFMC','IFMC_8ms'}
296
            % based on MPa
297
            comparisonData=[
298
                66	51	49	48	46	45	54	250;
299
                60	54	46	42	39	49	65	500;
300
                64	51	38	32	33	59	75	1000;
301
                59	51	36	30	41	81	93	2000;
302
                71	63	53	44	36	76	95	4000;
303
                70	64	43	35	35	66	88	6000;
304
                110	110	110	110	110	110	110	8000;
305
                ];
306
            if length(BFlist)==1 && ~isempty(comparisonData)
307
                availableFrequencies=comparisonData(:,end)';
308
                findRow= find(BFlist==availableFrequencies);
309
                if ~isempty (findRow)
310
                    experiment.comparisonData=comparisonData(findRow,:);
311
                end
312
            end
313

  
314
        case {'TMC','TMC_8ms'}
315
            % based on MPa
316
            comparisonData=[
317
                48	58	63	68	75	80	85	92	99	250;
318
                33	39	40	49	52	61	64	77	79	500;
319
                39	42	50	81	83	92	96	97	110	1000;
320
                24	26	32	37	46	51	59	71	78	2000;
321
                65	68	77	85	91	93	110	110	110	4000;
322
                20	19	26	44	80	95	96	110	110	6000;
323
                ];
324
            if length(BFlist)==1 && ~isempty(comparisonData)
325
                availableFrequencies=comparisonData(:,end)';
326
                findRow= find(BFlist==availableFrequencies);
327
                if ~isempty (findRow)
328
                    experiment.comparisonData=comparisonData(findRow,:);
329
                end
330
            end
331

  
332
        case { 'absThreshold',  'absThreshold_8'}
333
            % MPa thresholds
334
            experiment.comparisonData=[
335
                32	26	16	18	22	22 0.008;
336
                16	13	6	9	15	11 0.500
337
                ];
338

  
339

  
340
        otherwise
341
            experiment.comparisonData=[];
342
    end
343
end
344

  
345

  
parameterStore/MAPparamsStd.m
1
function method=MAPparamsStd ...
2
    (BFlist, sampleRate, showParams)
3
% MAPparams<> establishes a complete set of MAP parameters
4
% Parameter file names must be of the form <MAPparams> <name>
5
%
6
% input arguments
7
%  BFlist     (optional) specifies the desired list of channel BFs
8
%    otherwise defaults set below
9
%  sampleRate (optional), default is 50000.
10
%  showParams (optional) =1 prints out the complete set of parameters
11
% output argument
12
%  method passes a miscelleny of values
13

  
14
global inputStimulusParams OMEParams DRNLParams
15
global IHC_VResp_VivoParams IHCpreSynapseParams  AN_IHCsynapseParams
16
global MacGregorParams MacGregorMultiParams  filteredSACFParams
17
global experiment % used by calls from multiThreshold only
18
global IHC_cilia_RPParams
19

  
20
currentFile=mfilename;                      % i.e. the name of this mfile
21
method.parameterSource=currentFile(10:end); % for the record
22

  
23
switchOffEfferent=0;
24
efferentDelay=0.010;
25
method.segmentDuration=efferentDelay;
26

  
27
if nargin<3, showParams=0; end
28
if nargin<2, sampleRate=50000; end
29
if nargin<1 || BFlist(1)<0 % if BFlist= -1, set BFlist to default
30
    lowestBF=250; 	highestBF= 8000; 	numChannels=21;
31
    % 21 chs (250-8k)includes BFs at 250 500 1000 2000 4000 8000
32
    BFlist=round(logspace(log10(lowestBF),log10(highestBF),numChannels));
33
end
34
% BFlist=1000;
35

  
36
% preserve for backward campatibility
37
method.nonlinCF=BFlist; 
38
method.dt=1/sampleRate; 
39

  
40
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
41
% set  model parameters
42
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
43

  
44
%%  #1 inputStimulus
45
inputStimulusParams=[];
46
inputStimulusParams.sampleRate= sampleRate; 
47

  
48
%%  #2 outerMiddleEar
49
OMEParams=[];  % clear the structure first
50
% outer ear resonances band pass filter  [gain lp order  hp]
51
OMEParams.externalResonanceFilters=      [ 10 1 1000 4000];
52
                                       
53
% highpass stapes filter  
54
%  Huber gives 2e-9 m at 80 dB and 1 kHz (2e-13 at 0 dB SPL)
55
OMEParams.OMEstapesLPcutoff= 1000;
56
OMEParams.stapesScalar=	     45e-9;
57

  
58
% Acoustic reflex: maximum attenuation should be around 25 dB Price (1966)
59
% i.e. a minimum ratio of 0.056.
60
if ~switchOffEfferent
61
    % 'spikes' model: AR based on brainstem spiking activity (LSR)
62
    OMEParams.rateToAttenuationFactor=0.003;   % * N(all ICspikes)
63
%     OMEParams.rateToAttenuationFactor=0;   % * N(all ICspikes)
64
    % 'probability model': Ar based on An firing probabilities (LSR)
65
    OMEParams.rateToAttenuationFactorProb=0.005;% * N(all ANrates)
66
%     OMEParams.rateToAttenuationFactorProb=0;% * N(all ANrates)
67
else
68
    OMEParams.rateToAttenuationFactor=0;        % 0= off
69
    OMEParams.rateToAttenuationFactorProb=0;    % 0= off
70
end
71
% asymptote should be around 100-200 ms
72
OMEParams.ARtau=.05; % AR smoothing function
73
% delay must be longer than the segment length
74
OMEParams.ARdelay=efferentDelay;  %Moss gives 8.5 ms latency
75
OMEParams.ARrateThreshold=0;
76

  
77
%%  #3 DRNL
78
DRNLParams=[];  % clear the structure first
79
DRNLParams.BFlist=BFlist;
80

  
81
% DRNL nonlinear path
82
DRNLParams.a=3e4;     % nonlinear path gain (below compression threshold)
83
% DRNLParams.a=3e2;     % DRNL.a=0 means no OHCs (no nonlinear path)
84

  
85
DRNLParams.b=8e-6;    % *compression threshold raised compression
86
% DRNLParams.b=1;    % b=1 means no compression
87

  
88
DRNLParams.c=0.2;     % compression exponent
89
% nonlinear filters
90
DRNLParams.nonlinCFs=BFlist;
91
DRNLParams.nonlinOrder=	3;           % order of nonlinear gammatone filters
92
p=0.2895;   q=170;  % human  (% p=0.14;   q=366;  % cat)
93
DRNLParams.nlBWs=  p * BFlist + q;
94
DRNLParams.p=p;   DRNLParams.q=q;   % save p and q for printing only
95

  
96
% DRNL linear path:
97
DRNLParams.g=100;     % linear path gain factor
98
% linCF is not necessarily the same as nonlinCF
99
minLinCF=153.13; coeffLinCF=0.7341;   % linCF>nonlinBF for BF < 1 kHz
100
DRNLParams.linCFs=minLinCF+coeffLinCF*BFlist;
101
DRNLParams.linOrder=	3;           % order of linear gammatone filters
102
minLinBW=100; coeffLinBW=0.6531;
103
DRNLParams.linBWs=minLinBW + coeffLinBW*BFlist; % bandwidths of linear  filters
104

  
105
% DRNL MOC efferents
106
DRNLParams.MOCdelay = efferentDelay;            % must be < segment length!
107
if ~switchOffEfferent
108
    % 'spikes' model: MOC based on brainstem spiking activity (HSR)
109
    DRNLParams.rateToAttenuationFactor = .009;  % strength of MOC
110
    DRNLParams.rateToAttenuationFactor = .009;  % strength of MOC
111
%      DRNLParams.rateToAttenuationFactor = 0;  % strength of MOC
112

  
113
    % 'spikes' model: MOC based on brainstem spiking activity (HSR)
114
    DRNLParams.rateToAttenuationFactorProb = .002;  % strength of MOC
115
else
116
    DRNLParams.rateToAttenuationFactor = 0;     % 0 = MOC off (probability)
117
    DRNLParams.rateToAttenuationFactorProb = 0; % 0 = MOC off (spikes)
118
end
119
DRNLParams.MOCtau =.03;                         % smoothing for MOC
120
DRNLParams.MOCrateThreshold =50;                % set to AN rate threshold
121

  
122

  
123
%% #4 IHC_cilia_RPParams
124

  
125
IHC_cilia_RPParams.tc=	0.0003;   % 0.0003 filter time simulates viscocity
126
% IHC_cilia_RPParams.tc=	0.0005;   % 0.0003 filter time simulates viscocity
127
IHC_cilia_RPParams.C=	0.05;      % 0.1 scalar (C_cilia ) 
128
IHC_cilia_RPParams.u0=	5e-9;       
129
IHC_cilia_RPParams.s0=	30e-9;
130
IHC_cilia_RPParams.u1=	1e-9;
131
IHC_cilia_RPParams.s1=	1e-9;
132

  
133
IHC_cilia_RPParams.Gmax= 5e-9;    % 2.5e-9 maximum conductance (Siemens)
134
IHC_cilia_RPParams.Ga=	1e-9;  % 4.3e-9 fixed apical membrane conductance
135

  
136
%  #5 IHC_RP
137
IHC_cilia_RPParams.Cab=	4e-012;         % IHC capacitance (F)
138
IHC_cilia_RPParams.Cab=	1e-012;         % IHC capacitance (F)
139
IHC_cilia_RPParams.Et=	0.100;          % endocochlear potential (V)
140
% IHC_cilia_RPParams.Et=	0.07;          % endocochlear potential (V)
141

  
142
IHC_cilia_RPParams.Gk=	2e-008;         % 1e-8 potassium conductance (S)
143
IHC_cilia_RPParams.Ek=	-0.08;          % -0.084 K equilibrium potential
144
IHC_cilia_RPParams.Rpc=	0.04;           % combined resistances
145

  
146

  
147
%%  #5 IHCpreSynapse
148
IHCpreSynapseParams=[];
149
IHCpreSynapseParams.GmaxCa=	14e-9;% maximum calcium conductance
150
IHCpreSynapseParams.GmaxCa=	12e-9;% maximum calcium conductance
151
IHCpreSynapseParams.ECa=	0.066;  % calcium equilibrium potential
152
IHCpreSynapseParams.beta=	400;	% determine Ca channel opening
153
IHCpreSynapseParams.gamma=	100;	% determine Ca channel opening
154
IHCpreSynapseParams.tauM=	0.00005;	% membrane time constant ?0.1ms
155
IHCpreSynapseParams.power=	3;
156
% reminder: changing z has a strong effect on HF thresholds (like Et)
157
IHCpreSynapseParams.z=	    2e42;   % scalar Ca -> vesicle release rate
158

  
159
LSRtauCa=50e-6;            HSRtauCa=85e-6;            % seconds
160
% LSRtauCa=35e-6;            HSRtauCa=70e-6;            % seconds
161
IHCpreSynapseParams.tauCa= [LSRtauCa HSRtauCa]; %LSR and HSR fiber
162

  
163
%%  #6 AN_IHCsynapse
164
% c=kym/(y(l+r)+kl)	(spontaneous rate)
165
% c=(approx)  ym/l  (saturated rate)
166
AN_IHCsynapseParams=[];             % clear the structure first
167
AN_IHCsynapseParams.M=	12;         % maximum vesicles at synapse
168
AN_IHCsynapseParams.y=	4;          % depleted vesicle replacement rate
169
AN_IHCsynapseParams.y=	6;          % depleted vesicle replacement rate
170

  
171
AN_IHCsynapseParams.x=	30;         % replenishment from re-uptake store
172
AN_IHCsynapseParams.x=	60;         % replenishment from re-uptake store
173

  
174
% reduce l to increase saturated rate
175
AN_IHCsynapseParams.l=	100; % *loss rate of vesicles from the cleft
176
AN_IHCsynapseParams.l=	250; % *loss rate of vesicles from the cleft
177

  
178
AN_IHCsynapseParams.r=	500; % *reuptake rate from cleft into cell
179
% AN_IHCsynapseParams.r=	300; % *reuptake rate from cleft into cell
180

  
181
AN_IHCsynapseParams.refractory_period=	0.00075;
182
% number of AN fibers at each BF (used only for spike generation)
183
AN_IHCsynapseParams.numFibers=	100; 
184
AN_IHCsynapseParams.TWdelay=0.004;  % ?delay before stimulus first spike
185

  
186
%%  #7 MacGregorMulti (first order brainstem neurons)
187
MacGregorMultiParams=[];
188
MacGregorMultiType='chopper'; % MacGregorMultiType='primary-like'; %choose
189
switch MacGregorMultiType
190
    case 'primary-like'
191
        MacGregorMultiParams.nNeuronsPerBF=	10;   % N neurons per BF
192
        MacGregorMultiParams.type = 'primary-like cell';
193
        MacGregorMultiParams.fibersPerNeuron=4;   % N input fibers
194
        MacGregorMultiParams.dendriteLPfreq=200;  % dendritic filter
195
        MacGregorMultiParams.currentPerSpike=0.11e-6; % (A) per spike
196
        MacGregorMultiParams.Cap=4.55e-9;   % cell capacitance (Siemens)
197
        MacGregorMultiParams.tauM=5e-4;     % membrane time constant (s)
198
        MacGregorMultiParams.Ek=-0.01;      % K+ eq. potential (V)
199
        MacGregorMultiParams.dGkSpike=3.64e-5; % K+ cond.shift on spike,S
200
        MacGregorMultiParams.tauGk=	0.0012; % K+ conductance tau (s)
201
        MacGregorMultiParams.Th0=	0.01;   % equilibrium threshold (V)
202
        MacGregorMultiParams.c=	0.01;       % threshold shift on spike, (V)
203
        MacGregorMultiParams.tauTh=	0.015;  % variable threshold tau
204
        MacGregorMultiParams.Er=-0.06;      % resting potential (V)
205
        MacGregorMultiParams.Eb=0.06;       % spike height (V)
206

  
207
    case 'chopper'
208
        MacGregorMultiParams.nNeuronsPerBF=	10;   % N neurons per BF
209
        MacGregorMultiParams.type = 'chopper cell';
210
        MacGregorMultiParams.fibersPerNeuron=10;  % N input fibers
211
%         MacGregorMultiParams.fibersPerNeuron=6;  % N input fibers
212

  
213
        MacGregorMultiParams.dendriteLPfreq=50;   % dendritic filter
214
        MacGregorMultiParams.currentPerSpike=35e-9; % *per spike
215
%         MacGregorMultiParams.currentPerSpike=45e-9; % *per spike
216
        
217
        MacGregorMultiParams.Cap=1.67e-8; % ??cell capacitance (Siemens)
218
        MacGregorMultiParams.tauM=0.002;  % membrane time constant (s)
219
        MacGregorMultiParams.Ek=-0.01;    % K+ eq. potential (V)
220
        MacGregorMultiParams.dGkSpike=1.33e-4; % K+ cond.shift on spike,S
221
        MacGregorMultiParams.tauGk=	0.0001;% K+ conductance tau (s)
222
        MacGregorMultiParams.Th0=	0.01; % equilibrium threshold (V)
223
        MacGregorMultiParams.c=	0;        % threshold shift on spike, (V)
224
        MacGregorMultiParams.tauTh=	0.02; % variable threshold tau
225
        MacGregorMultiParams.Er=-0.06;    % resting potential (V)
226
        MacGregorMultiParams.Eb=0.06;     % spike height (V)
227
        MacGregorMultiParams.PSTHbinWidth=	1e-4;
228
end
229

  
230
%%  #8 MacGregor (second-order neuron). Only one per channel
231
MacGregorParams=[];                 % clear the structure first
232
MacGregorParams.type = 'chopper cell';
233
MacGregorParams.fibersPerNeuron=10; % N input fibers
234
MacGregorParams.dendriteLPfreq=100; % dendritic filter
235
MacGregorParams.currentPerSpike=120e-9;% *(A) per spike
236

  
237
MacGregorParams.Cap=16.7e-9;        % cell capacitance (Siemens)
238
MacGregorParams.tauM=0.002;         % membrane time constant (s)
239
MacGregorParams.Ek=-0.01;           % K+ eq. potential (V)
240
MacGregorParams.dGkSpike=1.33e-4;   % K+ cond.shift on spike,S
241
MacGregorParams.tauGk=	0.0003;     % K+ conductance tau (s)
242
MacGregorParams.Th0=	0.01;       % equilibrium threshold (V)
243
MacGregorParams.c=	0;              % threshold shift on spike, (V)
244
MacGregorParams.tauTh=	0.02;       % variable threshold tau
245
MacGregorParams.Er=-0.06;           % resting potential (V)
246
MacGregorParams.Eb=0.06;            % spike height (V)
247
MacGregorParams.debugging=0;        % (special)
248
% wideband accepts input from all channels (of same fiber type)
249
% use wideband to create inhibitory units
250
MacGregorParams.wideband=0;         % special for wideband units
251
% MacGregorParams.saveAllData=0;
252

  
253
%%  #9 filteredSACF
254
minPitch=	300; maxPitch=	3000; numPitches=60;    % specify lags
255
pitches=100*log10(logspace(minPitch/100, maxPitch/100, numPitches));
256
filteredSACFParams.lags=1./pitches;     % autocorrelation lags vector
257
filteredSACFParams.acfTau=	.003;       % time constant of running ACF
258
filteredSACFParams.lambda=	0.12;       % slower filter to smooth ACF
259
filteredSACFParams.plotFilteredSACF=1;  % 0 plots unfiltered ACFs
260
filteredSACFParams.plotACFs=0;          % special plot (see code)
261
%  filteredSACFParams.usePressnitzer=0; % attenuates ACF at  long lags
262
filteredSACFParams.lagsProcedure=  'useAllLags';
263
% filteredSACFParams.lagsProcedure=  'useBernsteinLagWeights';
264
% filteredSACFParams.lagsProcedure=  'omitShortLags';
265
filteredSACFParams.criterionForOmittingLags=3;
266

  
267
% checks
268
if AN_IHCsynapseParams.numFibers<MacGregorMultiParams.fibersPerNeuron
269
    error('MacGregorMulti: too few input fibers for input to MacG unit')
270
end
271

  
272

  
273
%% write all parameters to the command window
274
% showParams is currently set at the top of htis function
275
if showParams
276
    fprintf('\n %%%%%%%%\n')
277
    fprintf('\n%s\n', method.parameterSource)
278
    fprintf('\n')
279
    nm=UTIL_paramsList(whos);
280
    for i=1:length(nm)
281
        %         eval(['UTIL_showStruct(' nm{i} ', ''' nm{i} ''')'])
282
        if ~strcmp(nm(i), 'method')
283
            eval(['UTIL_showStructureSummary(' nm{i} ', ''' nm{i} ''', 10)'])
284
        end
285
    end
286
end
287

  
288

  
289

  
290
% **********************************************************************  comparison data
291
% store individual data here for display on the multiThreshold GUI (if used)
292
% the final value in each vector is an identifier (BF or duration))
293
if isstruct(experiment)
294
    switch experiment.paradigm
295
        case {'IFMC','IFMC_8ms'}
296
            % based on MPa
297
            comparisonData=[
298
                66	51	49	48	46	45	54	250;
299
                60	54	46	42	39	49	65	500;
300
                64	51	38	32	33	59	75	1000;
301
                59	51	36	30	41	81	93	2000;
302
                71	63	53	44	36	76	95	4000;
303
                70	64	43	35	35	66	88	6000;
304
                110	110	110	110	110	110	110	8000;
305
                ];
306
            if length(BFlist)==1 && ~isempty(comparisonData)
307
                availableFrequencies=comparisonData(:,end)';
308
                findRow= find(BFlist==availableFrequencies);
309
                if ~isempty (findRow)
310
                    experiment.comparisonData=comparisonData(findRow,:);
311
                end
312
            end
313

  
314
        case {'TMC','TMC_8ms'}
315
            % based on MPa
316
            comparisonData=[
317
                48	58	63	68	75	80	85	92	99	250;
318
                33	39	40	49	52	61	64	77	79	500;
319
                39	42	50	81	83	92	96	97	110	1000;
320
                24	26	32	37	46	51	59	71	78	2000;
321
                65	68	77	85	91	93	110	110	110	4000;
322
                20	19	26	44	80	95	96	110	110	6000;
323
                ];
324
            if length(BFlist)==1 && ~isempty(comparisonData)
325
                availableFrequencies=comparisonData(:,end)';
326
                findRow= find(BFlist==availableFrequencies);
327
                if ~isempty (findRow)
328
                    experiment.comparisonData=comparisonData(findRow,:);
329
                end
330
            end
331

  
332
        case { 'absThreshold',  'absThreshold_8'}
333
            % MPa thresholds
334
            experiment.comparisonData=[
335
                32	26	16	18	22	22 0.008;
336
                16	13	6	9	15	11 0.500
337
                ];
338

  
339

  
340
        otherwise
341
            experiment.comparisonData=[];
342
    end
343
end
344

  
345

  

Also available in: Unified diff