Revision 38:c2204b18f4a2 parameterStore

View differences:

parameterStore/MAPparamsNormal.m
25 25
method.segmentDuration=efferentDelay;
26 26

  
27 27
if nargin<3, showParams=0; end
28
if nargin<2, sampleRate=50000; end
28
if nargin<2, sampleRate=44100; end
29 29
if nargin<1 || BFlist(1)<0 % if BFlist= -1, set BFlist to default
30 30
    lowestBF=250; 	highestBF= 8000; 	numChannels=21;
31 31
    % 21 chs (250-8k)includes BFs at 250 500 1000 2000 4000 8000
......
52 52
                                       
53 53
% highpass stapes filter  
54 54
%  Huber gives 2e-9 m at 80 dB and 1 kHz (2e-13 at 0 dB SPL)
55
OMEParams.OMEstapesLPcutoff= 1000;
55
OMEParams.OMEstapesHPcutoff= 1000;
56 56
OMEParams.stapesScalar=	     45e-9;
57 57

  
58 58
% Acoustic reflex: maximum attenuation should be around 25 dB (Price, 1966)
59 59
% i.e. a minimum ratio of 0.056.
60 60
% 'spikes' model: AR based on brainstem spiking activity (LSR)
61
OMEParams.rateToAttenuationFactor=0.008;  % * N(all ICspikes)
62
% OMEParams.rateToAttenuationFactor=0;  % i.e. no AR
63

  
61
OMEParams.rateToAttenuationFactor=0.05; % * N(all ICspikes)
64 62
% 'probability model': Ar based on AN firing probabilities (LSR)
65
OMEParams.rateToAttenuationFactorProb=0.006;    % * N(all ANrates)
66
% OMEParams.rateToAttenuationFactorProb=0;      % i.e. no AR
63
OMEParams.rateToAttenuationFactorProb=0.02;    % * N(all ANrates)
67 64

  
68 65
% asymptote should be around 100-200 ms
69 66
OMEParams.ARtau=.250; % AR smoothing function 250 ms fits Hung and Dallos
......
77 74

  
78 75
%   *** DRNL nonlinear path
79 76
% broken stick compression
80
DRNLParams.a=5e4;       % DRNL.a=0 means no OHCs (no nonlinear path)
77
DRNLParams.a=2e4;       % DRNL.a=0 means no OHCs (no nonlinear path)
81 78
DRNLParams.c=.2;        % compression exponent
82
DRNLParams.CtBMdB = 10; %Compression threshold dB re 10e-9 m displacement
79
DRNLParams.ctBMdB = 10; %Compression threshold dB re 10e-9 m displacement
83 80

  
84 81
% filters
85 82
DRNLParams.nonlinOrder=	3;  % order of nonlinear gammatone filters
86 83
DRNLParams.nonlinCFs=BFlist;
87
p=0.2895;   q=250;      % human  (% p=0.14;   q=366;  % cat)
88
DRNLParams.nlBWs=  p * BFlist + q;
89
DRNLParams.p=p;   DRNLParams.q=q;   % save p and q for printing only
84
DRNLParams.p=0.2895;   DRNLParams.q=250;   % save p and q for printing only
85
% p=0.2895;   q=250;      % human  (% p=0.14;   q=366;  % cat)
86
DRNLParams.nlBWs=  DRNLParams.p * BFlist + DRNLParams.q;
90 87

  
91 88
%   *** DRNL linear path:
92
DRNLParams.g=200;       % linear path gain factor
89
DRNLParams.g=100;       % linear path gain factor
93 90
DRNLParams.linOrder=3;  % order of linear gammatone filters
94 91
% linCF is not necessarily the same as nonlinCF
95 92
minLinCF=153.13; coeffLinCF=0.7341;   % linCF>nonlinBF for BF < 1 kHz
......
100 97

  
101 98
%   *** DRNL MOC efferents
102 99
DRNLParams.MOCdelay = efferentDelay;            % must be < segment length!
103
DRNLParams.minMOCattenuationdB=-30;
100
DRNLParams.minMOCattenuationdB=-35;
104 101

  
105 102
% 'spikes' model: MOC based on brainstem spiking activity (HSR)
106
DRNLParams.MOCtau =.025;                         % smoothing for MOC
107
DRNLParams.rateToAttenuationFactor = .00635;  % strength of MOC
108
% DRNLParams.rateToAttenuationFactor = 0;  % strength of MOC
103
DRNLParams.MOCtau =.0285;                         % smoothing for MOC
104
DRNLParams.rateToAttenuationFactor = .03;  % strength of MOC
105
DRNLParams.rateToAttenuationFactor = .0055;  % strength of MOC
109 106

  
110
% 'probability' model: MOC based on AN spiking activity (HSR)
107
% 'probability' model: MOC based on AN probability (HSR)
111 108
DRNLParams.MOCtauProb =.285;                         % smoothing for MOC
112
DRNLParams.rateToAttenuationFactorProb = 0.0075;  % strength of MOC
113
% DRNLParams.rateToAttenuationFactorProb = .0;  % strength of MOC
114
DRNLParams.MOCrateThresholdProb =50;                % spikes/s probability only
109
DRNLParams.rateToAttenuationFactorProb = 0.007;  % strength of MOC
110
DRNLParams.MOCrateThresholdProb =67;                % spikes/s probability only
115 111

  
116 112

  
117 113
%% #4 IHC_cilia_RPParams
118
IHC_cilia_RPParams.tc=	0.0003;   % 0.0003 filter time simulates viscocity
119
IHC_cilia_RPParams.C=	0.03;      % 0.1 scalar (C_cilia ) 
114
IHC_cilia_RPParams.tc=	0.00012;   % 0.0003 Shamma
115
IHC_cilia_RPParams.C=	0.08;       % 0.1 scalar (C_cilia ) 
120 116
IHC_cilia_RPParams.u0=	5e-9;       
121 117
IHC_cilia_RPParams.s0=	30e-9;
122 118
IHC_cilia_RPParams.u1=	1e-9;
......
148 144
% reminder: changing z has a strong effect on HF thresholds (like Et)
149 145
IHCpreSynapseParams.z=	    2e42;   % scalar Ca -> vesicle release rate
150 146

  
151
LSRtauCa=40e-6;            HSRtauCa=80e-6;            % seconds
147
LSRtauCa=30e-6;            HSRtauCa=80e-6;            % seconds
148
% LSRtauCa=40e-6;            HSRtauCa=90e-6;            % seconds
152 149
% IHCpreSynapseParams.tauCa= [15e-6 80e-6]; %LSR and HSR fiber
153 150
IHCpreSynapseParams.tauCa= [LSRtauCa HSRtauCa]; %LSR and HSR fiber
154 151

  
......
159 156
% absolute refractory period. Relative refractory period is the same. 
160 157
AN_IHCsynapseParams.refractory_period=	0.00075;
161 158
AN_IHCsynapseParams.TWdelay=0.004;  % ?delay before stimulus first spike
162
AN_IHCsynapseParams.ANspeedUpFactor=5; % longer epochs for computing spikes.
159
AN_IHCsynapseParams.spikesTargetSampleRate=10000;
160
% AN_IHCsynapseParams.ANspeedUpFactor=5; % longer epochs for computing spikes.
163 161

  
164 162
% c=kym/(y(l+r)+kl)	(spontaneous rate)
165 163
% c=(approx)  ym/l  (saturated rate)
......
205 203
        MacGregorMultiParams.fibersPerNeuron=10;  % N input fibers
206 204

  
207 205
        MacGregorMultiParams.dendriteLPfreq=50;   % dendritic filter
208
        MacGregorMultiParams.currentPerSpike=35e-9; % *per spike
206
        MacGregorMultiParams.currentPerSpike=28e-9; % *per spike
209 207
%         MacGregorMultiParams.currentPerSpike=30e-9; % *per spike
210 208
        
211 209
        MacGregorMultiParams.Cap=1.67e-8; % ??cell capacitance (Siemens)
......
226 224
MacGregorParams.type = 'chopper cell';
227 225
MacGregorParams.fibersPerNeuron=10; % N input fibers
228 226
MacGregorParams.dendriteLPfreq=100; % dendritic filter
229
MacGregorParams.currentPerSpike=120e-9;% *(A) per spike
230 227
MacGregorParams.currentPerSpike=40e-9;% *(A) per spike
231 228

  
232 229
MacGregorParams.Cap=16.7e-9;        % cell capacitance (Siemens)
......
246 243
% MacGregorParams.saveAllData=0;
247 244

  
248 245
%%  #9 filteredSACF
249
minPitch=	300; maxPitch=	3000; numPitches=60;    % specify lags
250
pitches=100*log10(logspace(minPitch/100, maxPitch/100, numPitches));
251
filteredSACFParams.lags=1./pitches;     % autocorrelation lags vector
252
filteredSACFParams.acfTau=	.003;       % time constant of running ACF
253
filteredSACFParams.lambda=	0.12;       % slower filter to smooth ACF
254
filteredSACFParams.plotFilteredSACF=1;  % 0 plots unfiltered ACFs
255
filteredSACFParams.plotACFs=0;          % special plot (see code)
256
%  filteredSACFParams.usePressnitzer=0; % attenuates ACF at  long lags
257
filteredSACFParams.lagsProcedure=  'useAllLags';
258
% filteredSACFParams.lagsProcedure=  'useBernsteinLagWeights';
259
% filteredSACFParams.lagsProcedure=  'omitShortLags';
260
filteredSACFParams.criterionForOmittingLags=3;
246
% identify periodicities to be logged
247
    minPitch=	80; maxPitch=	500; numPitches=50;  
248
    maxLag=1/minPitch; minLag=1/maxPitch;
249
    lags= linspace(minLag, maxLag, numPitches);
250
    pitches=10.^ linspace(log10(minPitch), log10(maxPitch),numPitches);
251
    pitches=fliplr(pitches);
252
    % convert to lags for ACF
253
    filteredSACFParams.lags=lags;     % autocorrelation lags vector
254
    filteredSACFParams.acfTau=	.003;       % time constant of running ACF
255
    filteredSACFParams.lambda=	0.12;       % slower filter to smooth ACF
256
    % request plot of within-channel ACFs at fixed intervals in time
257
    filteredSACFParams.plotACFs=1;          
258
    filteredSACFParams.plotACFsInterval=0.002;
259
    filteredSACFParams.plotMoviePauses=.1;  
260

  
261
    filteredSACFParams.usePressnitzer=0; % attenuates ACF at  long lags
262
    filteredSACFParams.lagsProcedure=  'useAllLags';
263
    %  'useAllLags' or 'omitShortLags'
264
    filteredSACFParams.criterionForOmittingLags=3;
265

  
261 266

  
262 267
% checks
263 268
if AN_IHCsynapseParams.numFibers<MacGregorMultiParams.fibersPerNeuron
......
269 274
% paramChanges
270 275
if nargin>3 && ~isempty(paramChanges)
271 276
    if ~iscellstr(paramChanges)
272
        error(['paramChanges error: paramChanges not a cell array'])
277
        error('paramChanges error: paramChanges not a cell array')
273 278
    end
274 279
    
275 280
    nChanges=length(paramChanges);
parameterStore/MAPparamsOHCloss.m
1
function method=MAPparamsOHCloss ...
2
    (BFlist, sampleRate, showParams, paramChanges)
3
% MAPparamsOHCloss.m is a parameter file, similar in all respects to
4
% MAPparamsNormal except that the parameter 'DRNLParams.a' is set to zero.
5
%
6
% MAPparams<> establishes a complete set of MAP parameters
7
% Parameter file names must be of the form <MAPparams><name>
8
%
9
% Input arguments
10
%  BFlist     (optional) specifies the desired list of channel BFs
11
%    otherwise defaults set below
12
%  sampleRate (optional), default is 50000.
13
%  showParams (optional) =1 prints out the complete set of parameters
14
% Output argument
15
%  method passes a miscelleny of values
16
%  the use of 'method' is being phased out. use globals
17

  
18
global inputStimulusParams OMEParams DRNLParams IHC_cilia_RPParams
19
global IHCpreSynapseParams  AN_IHCsynapseParams
20
global MacGregorParams MacGregorMultiParams  filteredSACFParams
21
global experiment % used only by calls from multiThreshold
22
% global IHC_VResp_VivoParams
23

  
24
currentFile=mfilename;                      % i.e. the name of this mfile
25
method.parameterSource=currentFile(10:end); % for the record
26

  
27
efferentDelay=0.010;
28
method.segmentDuration=efferentDelay;
29

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

  
39
% preserve for backward campatibility
40
method.nonlinCF=BFlist; 
41
method.dt=1/sampleRate; 
42

  
43
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
44
% set  model parameters
45
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
46

  
47
%%  #1 inputStimulus
48
inputStimulusParams=[];
49
inputStimulusParams.sampleRate= sampleRate; 
50

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

  
61
% Acoustic reflex: maximum attenuation should be around 25 dB (Price, 1966)
62
% i.e. a minimum ratio of 0.056.
63
% 'spikes' model: AR based on brainstem spiking activity (LSR)
64
OMEParams.rateToAttenuationFactor=0.05; % * N(all ICspikes)
65
% 'probability model': Ar based on AN firing probabilities (LSR)
66
OMEParams.rateToAttenuationFactorProb=0.02;    % * N(all ANrates)
67

  
68
% asymptote should be around 100-200 ms
69
OMEParams.ARtau=.250; % AR smoothing function 250 ms fits Hung and Dallos
70
% delay must be longer than the segment length
71
OMEParams.ARdelay=efferentDelay;  %Moss gives 8.5 ms latency
72
OMEParams.ARrateThreshold=40;
73

  
74
%%  #3 DRNL
75
DRNLParams=[];  % clear the structure first
76
% DRNLParams.BFlist=BFlist;
77

  
78
%   *** DRNL nonlinear path
79
% broken stick compression
80
% DRNLParams.a=2e4;     % normal value (commented out)
81
DRNLParams.a=0;         % DRNL.a=0 means no OHCs (no nonlinear path)
82
DRNLParams.c=.2;        % compression exponent
83
DRNLParams.ctBMdB = 10; %Compression threshold dB re 10e-9 m displacement
84

  
85
% filters
86
DRNLParams.nonlinOrder=	3;  % order of nonlinear gammatone filters
87
DRNLParams.nonlinCFs=BFlist;
88
DRNLParams.p=0.2895;   DRNLParams.q=250;   % save p and q for printing only
89
% p=0.2895;   q=250;      % human  (% p=0.14;   q=366;  % cat)
90
DRNLParams.nlBWs=  DRNLParams.p * BFlist + DRNLParams.q;
91

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

  
102
%   *** DRNL MOC efferents
103
DRNLParams.MOCdelay = efferentDelay;            % must be < segment length!
104
DRNLParams.minMOCattenuationdB=-35;
105

  
106
% 'spikes' model: MOC based on brainstem spiking activity (HSR)
107
DRNLParams.MOCtau =.0285;                         % smoothing for MOC
108
DRNLParams.rateToAttenuationFactor = .03;  % strength of MOC
109
DRNLParams.rateToAttenuationFactor = .0055;  % strength of MOC
110

  
111
% 'probability' model: MOC based on AN probability (HSR)
112
DRNLParams.MOCtauProb =.285;                         % smoothing for MOC
113
DRNLParams.rateToAttenuationFactorProb = 0.007;  % strength of MOC
114
DRNLParams.MOCrateThresholdProb =67;                % spikes/s probability only
115

  
116

  
117
%% #4 IHC_cilia_RPParams
118
IHC_cilia_RPParams.tc=	0.00012;   % 0.0003 Shamma
119
IHC_cilia_RPParams.C=	0.08;       % 0.1 scalar (C_cilia ) 
120
IHC_cilia_RPParams.u0=	5e-9;       
121
IHC_cilia_RPParams.s0=	30e-9;
122
IHC_cilia_RPParams.u1=	1e-9;
123
IHC_cilia_RPParams.s1=	1e-9;
124

  
125
IHC_cilia_RPParams.Gmax= 6e-9;    % 2.5e-9 maximum conductance (Siemens)
126
IHC_cilia_RPParams.Ga=	1e-9;  % 4.3e-9 fixed apical membrane conductance
127
IHC_cilia_RPParams.Ga=	.8e-9;  % 4.3e-9 fixed apical membrane conductance
128

  
129
%  #5 IHC_RP
130
IHC_cilia_RPParams.Cab=	4e-012;         % IHC capacitance (F)
131
% IHC_cilia_RPParams.Cab=	1e-012;         % IHC capacitance (F)
132
IHC_cilia_RPParams.Et=	0.100;          % endocochlear potential (V)
133

  
134
IHC_cilia_RPParams.Gk=	2e-008;         % 1e-8 potassium conductance (S)
135
IHC_cilia_RPParams.Ek=	-0.08;          % -0.084 K equilibrium potential
136
IHC_cilia_RPParams.Rpc=	0.04;           % combined resistances
137

  
138

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

  
151
LSRtauCa=30e-6;            HSRtauCa=80e-6;            % seconds
152
% LSRtauCa=40e-6;            HSRtauCa=90e-6;            % seconds
153
% IHCpreSynapseParams.tauCa= [15e-6 80e-6]; %LSR and HSR fiber
154
IHCpreSynapseParams.tauCa= [LSRtauCa HSRtauCa]; %LSR and HSR fiber
155

  
156
%%  #6 AN_IHCsynapse
157
AN_IHCsynapseParams=[];             % clear the structure first
158
% number of AN fibers at each BF (used only for spike generation)
159
AN_IHCsynapseParams.numFibers=	100; 
160
% absolute refractory period. Relative refractory period is the same. 
161
AN_IHCsynapseParams.refractory_period=	0.00075;
162
AN_IHCsynapseParams.TWdelay=0.004;  % ?delay before stimulus first spike
163
AN_IHCsynapseParams.spikesTargetSampleRate=10000;
164
% AN_IHCsynapseParams.ANspeedUpFactor=5; % longer epochs for computing spikes.
165

  
166
% c=kym/(y(l+r)+kl)	(spontaneous rate)
167
% c=(approx)  ym/l  (saturated rate)
168
AN_IHCsynapseParams.M=	12;         % maximum vesicles at synapse
169
AN_IHCsynapseParams.y=	4;          % depleted vesicle replacement rate
170
AN_IHCsynapseParams.y=	6;          % depleted vesicle replacement rate
171

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

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

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

  
182

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

  
204
    case 'chopper'
205
        MacGregorMultiParams.nNeuronsPerBF=	10;   % N neurons per BF
206
        MacGregorMultiParams.type = 'chopper cell';
207
        MacGregorMultiParams.fibersPerNeuron=10;  % N input fibers
208

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

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

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

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

  
262
% checks
263
if AN_IHCsynapseParams.numFibers<MacGregorMultiParams.fibersPerNeuron
264
    error('MacGregorMulti: too few input fibers for input to MacG unit')
265
end
266

  
267

  
268
%% now accept last minute parameter changes required by the calling program
269
% paramChanges
270
if nargin>3 && ~isempty(paramChanges)
271
    if ~iscellstr(paramChanges)
272
        error('paramChanges error: paramChanges not a cell array')
273
    end
274
    
275
    nChanges=length(paramChanges);
276
    for idx=1:nChanges
277
        x=paramChanges{idx};
278
        x=deblank(x);
279
        if ~isempty(x)
280
            if ~strcmp(x(end),';')
281
                error(['paramChanges error (terminate with semicolon) ' x])
282
            end
283
            st=strtrim(x(1:strfind(x,'.')-1));
284
            fld=strtrim(x(strfind(x,'.')+1:strfind(x,'=')-1));
285
            value=x(strfind(x,'=')+1:end);
286
            if isempty(st) || isempty(fld) || isempty(value)
287
                error(['paramChanges error:' x])
288
            end
289
            
290
            x1=eval(['isstruct(' st ')']);
291
            cmd=['isfield(' st ',''' fld ''')'];
292
            x2=eval(cmd);
293
            if ~(x1*x2)
294
                error(['paramChanges error:' x])
295
            end
296
        end
297
        
298
        % no problems so go ahead
299
        eval(paramChanges{idx})
300
    end
301
end
302

  
303

  
304
%% write all parameters to the command window
305
% showParams is currently set at the top of htis function
306
if showParams
307
    fprintf('\n %%%%%%%%\n')
308
    fprintf('\n%s\n', method.parameterSource)
309
    fprintf('\n')
310
    nm=UTIL_paramsList(whos);
311
    for i=1:length(nm)
312
        %         eval(['UTIL_showStruct(' nm{i} ', ''' nm{i} ''')'])
313
        if ~strcmp(nm(i), 'method')
314
            eval(['UTIL_showStructureSummary(' nm{i} ', ''' nm{i} ''', 10)'])
315
        end
316
    end
317

  
318
    % highlight parameter changes made locally
319
    if nargin>3 && ~isempty(paramChanges)
320
        fprintf('\n Local parameter changes:\n')
321
        for i=1:length(paramChanges)
322
            disp(paramChanges{i})
323
        end
324
    end
325
end
326

  
327
% for backward compatibility
328
experiment.comparisonData=[];
parameterStore/MAPparamsPL.m
1
function method=MAPparamsPL ...
2
    (BFlist, sampleRate, showParams, paramChanges)
3
% MAPparamsPL.m is a parameter file, similar in all respects to
4
%  MAPparamsNormal except that a primary-like' neuron is used at the 
5
%  level of the cochlear nuclues (rather than a chopper cell).
6
%
7
% MAPparams<> establishes a complete set of MAP parameters
8
% Parameter file names must be of the form <MAPparams><name>
9
%
10
% Input arguments
11
%  BFlist     (optional) specifies the desired list of channel BFs
12
%    otherwise defaults set below
13
%  sampleRate (optional), default is 50000.
14
%  showParams (optional) =1 prints out the complete set of parameters
15
% Output argument
16
%  method passes a miscelleny of values
17
%  the use of 'method' is being phased out. use globals
18

  
19
global inputStimulusParams OMEParams DRNLParams IHC_cilia_RPParams
20
global IHCpreSynapseParams  AN_IHCsynapseParams
21
global MacGregorParams MacGregorMultiParams  filteredSACFParams
22
global experiment % used only by calls from multiThreshold
23
% global IHC_VResp_VivoParams
24

  
25
currentFile=mfilename;                      % i.e. the name of this mfile
26
method.parameterSource=currentFile(10:end); % for the record
27

  
28
efferentDelay=0.010;
29
method.segmentDuration=efferentDelay;
30

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

  
40
% preserve for backward campatibility
41
method.nonlinCF=BFlist; 
42
method.dt=1/sampleRate; 
43

  
44
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
45
% set  model parameters
46
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
47

  
48
%%  #1 inputStimulus
49
inputStimulusParams=[];
50
inputStimulusParams.sampleRate= sampleRate; 
51

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

  
62
% Acoustic reflex: maximum attenuation should be around 25 dB (Price, 1966)
63
% i.e. a minimum ratio of 0.056.
64
% 'spikes' model: AR based on brainstem spiking activity (LSR)
65
OMEParams.rateToAttenuationFactor=0.05; % * N(all ICspikes)
66
% 'probability model': Ar based on AN firing probabilities (LSR)
67
OMEParams.rateToAttenuationFactorProb=0.02;    % * N(all ANrates)
68

  
69
% asymptote should be around 100-200 ms
70
OMEParams.ARtau=.250; % AR smoothing function 250 ms fits Hung and Dallos
71
% delay must be longer than the segment length
72
OMEParams.ARdelay=efferentDelay;  %Moss gives 8.5 ms latency
73
OMEParams.ARrateThreshold=40;
74

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

  
79
%   *** DRNL nonlinear path
80
% broken stick compression
81
DRNLParams.a=2e4;       % DRNL.a=0 means no OHCs (no nonlinear path)
82
DRNLParams.c=.2;        % compression exponent
83
DRNLParams.ctBMdB = 10; %Compression threshold dB re 10e-9 m displacement
84

  
85
% filters
86
DRNLParams.nonlinOrder=	3;  % order of nonlinear gammatone filters
87
DRNLParams.nonlinCFs=BFlist;
88
DRNLParams.p=0.2895;   DRNLParams.q=250;   % save p and q for printing only
89
% p=0.2895;   q=250;      % human  (% p=0.14;   q=366;  % cat)
90
DRNLParams.nlBWs=  DRNLParams.p * BFlist + DRNLParams.q;
91

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

  
102
%   *** DRNL MOC efferents
103
DRNLParams.MOCdelay = efferentDelay;            % must be < segment length!
104
DRNLParams.minMOCattenuationdB=-35;
105

  
106
% 'spikes' model: MOC based on brainstem spiking activity (HSR)
107
DRNLParams.MOCtau =.0285;                         % smoothing for MOC
108
DRNLParams.rateToAttenuationFactor = .03;  % strength of MOC
109
DRNLParams.rateToAttenuationFactor = .0055;  % strength of MOC
110

  
111
% 'probability' model: MOC based on AN probability (HSR)
112
DRNLParams.MOCtauProb =.285;                         % smoothing for MOC
113
DRNLParams.rateToAttenuationFactorProb = 0.007;  % strength of MOC
114
DRNLParams.MOCrateThresholdProb =67;                % spikes/s probability only
115

  
116

  
117
%% #4 IHC_cilia_RPParams
118
IHC_cilia_RPParams.tc=	0.00012;   % 0.0003 Shamma
119
IHC_cilia_RPParams.C=	0.08;       % 0.1 scalar (C_cilia ) 
120
IHC_cilia_RPParams.u0=	5e-9;       
121
IHC_cilia_RPParams.s0=	30e-9;
122
IHC_cilia_RPParams.u1=	1e-9;
123
IHC_cilia_RPParams.s1=	1e-9;
124

  
125
IHC_cilia_RPParams.Gmax= 6e-9;    % 2.5e-9 maximum conductance (Siemens)
126
IHC_cilia_RPParams.Ga=	1e-9;  % 4.3e-9 fixed apical membrane conductance
127
IHC_cilia_RPParams.Ga=	.8e-9;  % 4.3e-9 fixed apical membrane conductance
128

  
129
%  #5 IHC_RP
130
IHC_cilia_RPParams.Cab=	4e-012;         % IHC capacitance (F)
131
% IHC_cilia_RPParams.Cab=	1e-012;         % IHC capacitance (F)
132
IHC_cilia_RPParams.Et=	0.100;          % endocochlear potential (V)
133

  
134
IHC_cilia_RPParams.Gk=	2e-008;         % 1e-8 potassium conductance (S)
135
IHC_cilia_RPParams.Ek=	-0.08;          % -0.084 K equilibrium potential
136
IHC_cilia_RPParams.Rpc=	0.04;           % combined resistances
137

  
138

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

  
151
LSRtauCa=30e-6;            HSRtauCa=80e-6;            % seconds
152
% LSRtauCa=40e-6;            HSRtauCa=90e-6;            % seconds
153
% IHCpreSynapseParams.tauCa= [15e-6 80e-6]; %LSR and HSR fiber
154
IHCpreSynapseParams.tauCa= [LSRtauCa HSRtauCa]; %LSR and HSR fiber
155

  
156
%%  #6 AN_IHCsynapse
157
AN_IHCsynapseParams=[];             % clear the structure first
158
% number of AN fibers at each BF (used only for spike generation)
159
AN_IHCsynapseParams.numFibers=	100; 
160
% absolute refractory period. Relative refractory period is the same. 
161
AN_IHCsynapseParams.refractory_period=	0.00075;
162
AN_IHCsynapseParams.TWdelay=0.004;  % ?delay before stimulus first spike
163
AN_IHCsynapseParams.spikesTargetSampleRate=sampleRate;
164
% AN_IHCsynapseParams.ANspeedUpFactor=5; % longer epochs for computing spikes.
165

  
166
% c=kym/(y(l+r)+kl)	(spontaneous rate)
167
% c=(approx)  ym/l  (saturated rate)
168
AN_IHCsynapseParams.M=	12;         % maximum vesicles at synapse
169
AN_IHCsynapseParams.y=	4;          % depleted vesicle replacement rate
170
AN_IHCsynapseParams.y=	6;          % depleted vesicle replacement rate
171

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

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

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

  
182

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

  
205
    case 'chopper'
206
        MacGregorMultiParams.nNeuronsPerBF=	10;   % N neurons per BF
207
        MacGregorMultiParams.type = 'chopper cell';
208
        MacGregorMultiParams.fibersPerNeuron=10;  % N input fibers
209

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

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

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

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

  
263
% checks
264
if AN_IHCsynapseParams.numFibers<MacGregorMultiParams.fibersPerNeuron
265
    error('MacGregorMulti: too few input fibers for input to MacG unit')
266
end
267

  
268

  
269
%% now accept last minute parameter changes required by the calling program
270
% paramChanges
271
if nargin>3 && ~isempty(paramChanges)
272
    if ~iscellstr(paramChanges)
273
        error('paramChanges error: paramChanges not a cell array')
274
    end
275
    
276
    nChanges=length(paramChanges);
277
    for idx=1:nChanges
278
        x=paramChanges{idx};
279
        x=deblank(x);
280
        if ~isempty(x)
281
            if ~strcmp(x(end),';')
282
                error(['paramChanges error (terminate with semicolon) ' x])
283
            end
284
            st=strtrim(x(1:strfind(x,'.')-1));
285
            fld=strtrim(x(strfind(x,'.')+1:strfind(x,'=')-1));
286
            value=x(strfind(x,'=')+1:end);
287
            if isempty(st) || isempty(fld) || isempty(value)
288
                error(['paramChanges error:' x])
289
            end
290
            
291
            x1=eval(['isstruct(' st ')']);
292
            cmd=['isfield(' st ',''' fld ''')'];
293
            x2=eval(cmd);
294
            if ~(x1*x2)
295
                error(['paramChanges error:' x])
296
            end
297
        end
298
        
299
        % no problems so go ahead
300
        eval(paramChanges{idx})
301
    end
302
end
303

  
304

  
305
%% write all parameters to the command window
306
% showParams is currently set at the top of htis function
307
if showParams
308
    fprintf('\n %%%%%%%%\n')
309
    fprintf('\n%s\n', method.parameterSource)
310
    fprintf('\n')
311
    nm=UTIL_paramsList(whos);
312
    for i=1:length(nm)
313
        %         eval(['UTIL_showStruct(' nm{i} ', ''' nm{i} ''')'])
314
        if ~strcmp(nm(i), 'method')
315
            eval(['UTIL_showStructureSummary(' nm{i} ', ''' nm{i} ''', 10)'])
316
        end
317
    end
318

  
319
    % highlight parameter changes made locally
320
    if nargin>3 && ~isempty(paramChanges)
321
        fprintf('\n Local parameter changes:\n')
322
        for i=1:length(paramChanges)
323
            disp(paramChanges{i})
324
        end
325
    end
326
end
327

  
328
% for backward compatibility
329
experiment.comparisonData=[];

Also available in: Unified diff