Beruflich Dokumente
Kultur Dokumente
1 Welcome
If you want to play first and read afterwards, go immediately to section 7.2.
This manual is a basic introduction to a MATLAB version of a computational auditory
model in regular use at Essex University. The package consists of a number of modules
that are run successively. Each module represents a different stage in auditory
processing.
The modules and their parameters are formally introduced in the appendix of
Meddis 2006 Auditory-nerve first-spike latency and auditory absolute threshold:
A computer model, JASA, 119 406-417).
This and a number of related articles can be found at
http://www.essex.ac.uk/psychology/psy/PEOPLE/meddis/meddis.html
There are a number of programs that take the drudgery out of calling the individual
routines and setting parameters. However, this manual describes the system at its most
basic level; routines and parameters.
Example programs are given later (see Programs).
This is work in progress. All comments, criticisms and suggestions will be very
welcome. I need your help! Contact the author at rmeddic@essex.ac.uk
If you would like to add your own modules to the library, please use the format described
below and send them to me.
For easy navigation through this document, open the document map (View/Document
map).
26/07/2015
277617810.doc
2 Folders
To keep life simple, different file types are stored separately inside MAP. All folders are
held in parallel (i.e. subfolders of MAP). If you follow the advice given below, you will
avoid a lot of MATLAB path problems.
Modules are kept in the folder modules
These are functions that directly relate to the auditory periphery
Utilities are kept in the folder utilities
These are functions that help around the house
Parameter files are kept in the folder parameterStore
Each module requires its own parameters.
Even for the same module the parameters may change for a range of reasons (e.g.
different species).
The parameters are held in parameter files with a unique filename e.g.
outerMiddleEarParamsChinchilla.mat
outerMiddleEarParamsGPSumner03.mat
Test programs are kept in the folder testPrograms
These programs exercise the modules and utilities. They also act as tutorials and sources
of chunks of code that you can use in your own programs
Signal files are kept in wavFileStore
Only .wav files are processed by MAP at present.
If you write code to read other types of file, please send it to me and I will include it in
the package for other users. An MP3 reader would be very nice.
Individual user programs should be stored in a separate folder.
The following lines should be added to all programs to give access to these folders
MAPlocation='..'; % the location of the MAP
addpath ( [MAPlocation '\modules'] )
addpath ( [MAPlocation '\utilities'] )
addpath ( [MAPlocation '\parameterStore'])
addpath ( [MAPlocation '\wavFileStore'])
This works if your program folder is parallel with (i.e. in the same folder as) the MAP
folders. Otherwise you will need to define MAPlocation as the path to the MAP 1.6
folder
. I like to keep my path swept. I therefore end each program with the command
rmpath
rmpath
rmpath
rmpath
(
(
(
(
[MAPlocation
[MAPlocation
[MAPlocation
[MAPlocation
26/07/2015
'\modules'] )
'\utilities'] )
'\parameterStore'])
'\wavFileStore'])
277617810.doc
3 Modular structure
The system is highly modular. Each auditory processing stage has its own module. Most
modules take a multi-channel ear object (a channel x time matrix) and transform it into
another multi-channel ear object ready for passing to the next module.
The list of modules supported in this document is:
functionName
inputStimulus
outerMiddleEar
DRNL
RPihc_Shamma
IHCpreSynapse
AN_IHCsynapse
MacGregor
MacGregorMulti
action
checks the stimulus input
converts sound to stapes motion
converts stapes motion to basilar membrane motion
converts BM motion to IHC receptor potential
converts RP to probability of vesicle release
converts vesicle release to AN activity
computes single chopper unit response from AN input
computes populations of choppers from AN input
where:
functionName is the name of the module (e.g. outerMiddleEar, DRNL,
MacGregor)
earObject is a channels x time signal matrix used both as input and output from
the function. earObject is normally the output of the previous module.
In the exceptional case of the first module, inputStimulus, the earObject is
supplied by the user and is normally a row vector representing a monaural
stimulus.
method is a structure containing a small amount of general data that is passed
from module to module.
functionNameParams is a structure containing parameters specific to the function
that is being called. The name of this structure is always constructed as
<functionName> <Params>;
examples:. outerMiddleEarParams
DRNLParams.
functionSpecificAnalysis is a matrix, sometimes empty. It is used to output
information that is specific to that module. This information is not
normally passed to the next module but it is available if the user requires
26/07/2015
277617810.doc
it. Not all modules use this facility but the argument is always available to
create uniformity among module functions.
method.plotGraphs=
method.plotGraphs=
1; % please plot
0; % plotting not required
If a module needs to pass specific information (other than earObject) to the succeeding
module, this information is passed as a field in the method structure.
If a module requires certain fields to be present in method, these are specified in the
header of the function code.
3.2 Plotting
If method.plotGraphs=0, no plotting of results occurs.
If you use the plotting facility (i.e. method.plotGraphs=1), you must specify the following,
method.numPlots=
method.subPlotNo=
This is specified once only at the beginning of the program before any modules are
called.
When plotting, all charts are generated as subplots in figure 1. You must specify, at the
outset, the number of subplots (method.numPlots) required in this figure so that the subplot
space can be arranged intelligently. This is normally the same as the number of modules
to be called but there are exceptions. If in doubt, ask for more subplots than required and
then reduce this value later when you find empty subplots in figure 1. Asking for too few
subplots will cause an error.
4 Module parameters
4.1 parameterStore
Parameter files are stored in a folder called parameterStore. A parameter file always
contains a single structure as described in the module parameters section above.
Parameter files are named according to the convention:
26/07/2015
277617810.doc
<module name><'Params'><identifier>
e.g., inputStimulusParamsMeddis
The name is important because a number of different parameter files may exist for any
given module. For example the outer middle ear parameters are different for different
species. However, the files always contain a single structure with the name
<module name><'Params'>
e.g. inputStimulusParams
Parameters are a big deal in auditory modelling. There are lots of them, they vary from
species to species and no one knows what the right values are! It pays to adopt a
disciplined approach to avoid confusion. Initially, you may want to use the parameters
supplied in the package, but soon you will want to branch out. Even if you use the
package parameters, you will still have to make some choices.
Parameters are passed to a module in a structure, one structure per module. Each module
requires its own set of parameters. A set of obligatory and optional parameters is posted
at the head of each module.
To inspect a set of parameters, navigate in MATLAB to the folder parameterStore. Load
any one of the files you see and then inspect the structure that is loaded.
Example:
>> load IHCpreSynapseParams
>> IHCpreSynapseParams
IHCpreSynapseParams =
type: 'clearance'
ECa: 0.0660
beta: 400
gamma: 130
tauM: 1.0000e-004
tauCa: 1.0000e-003
power: 3
z: 2.0000e+042
GmaxCa: 8.0000e-009
dt: -1
comment: 'Meddis 2006 Table III'
The parameter structure can be constructed in the program but it is more usual to load the
structure from a file prepared earlier. Lots of prepared parameter files are kept in the
parameterStore folder. For a given module, you may need different sets of parameters
because parameters vary between species (e.g. human, guinea pig). Alternatively you
might wish to experiment with different sets of parameters. The .mat file can be given
any name but it is helpful if the filename is based on the structure name plus an identifier
(e.g. inputStimulusParamsRM).
26/07/2015
277617810.doc
These parameter sets are also stored as .mat files. One strategy when running a model is
to load the parameter file and then call the module:
load inputStimulusParams
[stimulus, method, A]=inputStimulus(waveform, method, inputStimulusParams)
4.1.2 Comments
Extra fields can be supplied in parameter structures. These are ignored. This is useful for
supplying comments and notes, e.g.
inputStimulusParams.comment='This is a helpful comment';
inputStimulusParams.commentb='This is another helpful comment';
26/07/2015
277617810.doc
The parameters in the supplied parameter files are advisory only and are supplied on the
basis of the authors 'best effort'. You must accept responsibility for any parameters you
choose to use. Test the supplied parameters yourself until you are happy that they are
satisfactory.
Most parameters are based on published papers but this is a rapidly moving field.
5e-5 Pascals
Stapes:
Nutall and Dolan (1996, guinea pig) 18 kHz
At 5 dB SPL they give a peak stapes velocity of
At 83 dB SPL they give a peak stapes velocity of
10e-9 m/s
539e-6 m/s
36e-6 m/s
539e-6 m/s.
IHC:
Translation as follows
peak pressure at 80 dB SPL,
peak displacement
frequency
v= 2fd
26/07/2015
277617810.doc
It is difficult to get useful IHC membrane voltages from the literature. Typically, the
maximum voltage swing is reported to be quite small. This may reflect reality or might
reflect the difficulty of measuring voltages accurately in vivo.
I aim for a resting voltage of
-0.053 V
and a maximum of
-0.030 V
(i.e. a swing of 0.023 V). If you know better than this, let me know.
AN
Spontaneous rates normally lie between 0 and 100 spikes/s
Adapted firing rate (after the first 50 ms) vary with fiber type but HSR fibers typically
have rates between 200 and 300 spikes/s for signal levels more than 40 dB above
threshold.
Thresholds vary with fiber BF. The animal audiogram is a rough guide to where the
threshold should be for a given BF. For BFs in the middle region of the audiogram, aim
for a threshold of 0 dB SPL.
26/07/2015
277617810.doc
5 Module descriptions
Information on individual modules can be found using help. What follows is a listing of
the help files for each module; for example
help inputStimulus
help outerMiddleEar
help DRNL
help bm2ciliadisp
help IHC_Shamma
help IHCpreSynapse
help AN_IHCsynapse
help MacGregor
help MacGregorMulti
These help notices are updated more frequently in the program code than the manual.
Please check the code for the latest information.
5.1 inputStimulus
Important: The stimulus has units (Pascals). Arbitrary units will not work. This is
because the BM filters are nonlinear; they are linear below and compressed above a
certain level specified in Pascals. This level is different for different BFs.
N.B. At 0 dB SPL, the peak of a pure tone acoustic stimulus is 28e-6 Pa.
inputStimulus checks and conditions a stimulus.
*************
usage:
[earObject method FFTresult]=inputStimulus(stimulus, method, inputStimulusParams)
It performs some elementary checks and
plots the stimulus if required (method.plotGraphs=1) with peak amp and rms
Only mono signals are allowed.
Input units are Pascals; output units are Pascals.
This is important because the filters are nonlinear.
NB DSAM uses microPascals. Here Pascals are required.
FFTresult is returned if inputStimulusParams.fft= 1.
FFTresult is a matrix with four rows
1: frequency
2: amplitude
3: power
4: phase
NB FFT can be slow. Unless required the default should be inputStimulusParams.fft=0.
Example parameters:
inputStimulusParams.dt=: 2.0000e-006;
inputStimulusParams.fft=0; (optional)
26/07/2015
277617810.doc
5.1.1
Example parameters
inputStimulusParams.mat
inputStimulusParams.dt=: 2e-006;
inputStimulusParams.fft=
0; (optional 1)
Also requires these method fields
method.plotGraphs= 1;
method.numPlots=
6;
method.subPlotNo= 0;
26/07/2015
10
277617810.doc
5.2 outerMiddleEar
outerMiddleEar filters the input signal as specified.
**************
usage:
[outputSignal method FFTresult]=outerMiddleEar(inputSignal, method,
outerMiddleEarParams)
The filter specification is in a matrix with 4 columns
[<gain> <lower cutoff> <upper cutoff> <filter order>]
each row represents a parallel filter.
The outputs from all filters are added together to create the output
A scalar is applied ('stapesScalar') to convert from pressure to stapes
velocity (m/s).
FFTresult is returned if inputStimulusParams.fft=
1.
Use a click stimulus to explore the frequency characteristics of the
filtering.
FFTresult is a matrix with four rows
1: frequency
2: amplitude
3: power
4: phase
NB FFT can be slow. Unless required, the default should be inputStimulusParams.fft=0.
Mandatory method fields:
method.plotGraphs= 1;
method.numPlots=
6;
method.subPlotNo= 0;
method.dt=
2e-006;
26/07/2015
0.00014;
'Sumner 2003;';
11
277617810.doc
outerMiddleEarParamsHUMANRuggero
outerMiddleEarParams.stapesScalar=
0.00014;
outerMiddleEarParams.dt= -1;
outerMiddleEarParams.fft= 0;
outerMiddleEarParams.filters= [
0
500
2000
1
0
1000
5000
1
];
outerMiddleEarParams.comment= 'Based on Ruggero and Temchin (2003) ARLO, 4,
53-58';
outerMiddleEarParams.comment2= 'yields 4-6e-9 m/s for 0 dB SPL input';
5.3 DRNL
% DRNL filters a stapes velocity function into a multi-channel
% ****
% representation of the basilar membrane velocity response
% usage:
%
[DRNLresponse method FFTresult]=DRNL(inputSignal, method, DRNLParams)
%
% DRNLParams.BFlist contains a list of channel best frequencies.
% These frequencies are passed to method.nonlinCF for subsequent modules.
%
% If a single channel is used, the display automatically displays both
% linear (green) and nonlinear (red) components as well as the combined
% (black) output.
%
% If DRNLParams.fft=1, and the input is a single channel, its FFT is computed and
% and returned in FFTresult.
%
% DRNLParams.p0 and DRNLParams.m are coefficients used to calculate the
% filter characteristics at each individual BF (i.e. nonlinBW a, b, c, linCF, linBW, linGAIN).
%
% However, if DRNLParams.DRNLparameters exists as a nChannels x 7 value row vector.
% it is assumed that the user already knows the values he wishes to use
% and this matrix is used instead.
%
% Example parameters:
% DRNLParams.comment=' DRNL params HUMAN from Lopez-Poveda 2001'
% DRNLParams.BFlist= [500 1000 1500 2000 2500 3000 3500 4000 4500 5000];
% DRNLParams.NumNonlinLPfilters= 4;
% DRNLParams.nonlinOrder= 3;
% DRNLParams.NumLinLPfilters=
4;
% DRNLParams.linOrder=
2;
% DRNLParams.ID='nonlinBW a
b
linCF
linBW lin GAIN c';
% DRNLParams.p0=[-0.031
1.402
1.619
-0.067
0.037
4.2 -0.69897];
% DRNLParams.m=
[0.774
0.819
-0.818
1.016
0.785
-0.48
0];
% DRNLParams.dt=
-1;
%
% Also requires these method fields
26/07/2015
12
277617810.doc
% method.plotGraphs= 1;
% method.numPlots= 6;
% method.subPlotNo= 0;
% method.dt= 2e-006;
26/07/2015
13
277617810.doc
5.4 bm2cilia
New to MAPv1.5!
bm2cilia.m converts BM motion or displacement to IHC stereocilia displacement
This code was supplied by Almodena Eustaqio Martin (AEM).
Usage:
% Determines the IHC cilia displacement as a funtion of basilar membrane velocity or
displacement.
%
% Input arguments
% signal
matrix of (number of channels x number of points) basilar membrane velocity or
displacement
% method
structure containing general information needed
%
.dt: sample time
% params
structure containing the model input parameters
%
.CdB
gain
%
.tc
time constant
%
.bm_units If 'velocity': bm is basilar membrane velocity.
%
If 'displacement': bm is basilar membrane displacement.
%
% Output arguments
% u
matrix of (number of channels x number of points) cilia displacement (m/s)
% method
structure containing general information needed
%
.dt: sample time
% info
structure containing general extra information useful for the user
%
% References
% Shamma, S.A., Chadwich, R.S., Wilbur, W.J., Morrish, K.A. and Rinzel, J. (1986).
% "A biophysical model of cochlear processing: intensity dependence of pure tone responses"
% J. Acooust. Soc. Am. 80 (1), 133-145.
% (c) Almudena Eustaquio
% University of Salamanca, 2004.
5.5 IHC_RP_Shamma
New to MAPv1.5!
This function converts stereocilia displacement to receptor potential voltage.
26/07/2015
14
277617810.doc
Usage:
% [V, method, info] = IHC_RP_Shamma (u, method, params)
%
% Implementation of Shamma's IHC receptor potential model.
% Shamma, S. (1984) "A biophysical model of cochlear processing: Intensity
% dependence of pure tone responses", J. Acoust. Soc. Am.
% The function that defines de second order Boltmann ditribution is from:
% Sumner, C.J. (2001) "A revised model of the inner-hair cell and
% auditory-nerve complex", J. Acoust. Soc. Am.
%
% Input arguments:
% u:
Input signal matrix (number of channels x number of data points). It is assumed
to be stereocilia
%
displacementin units of m/s.
% method structure containing general information needed
%
.dt: sample time
%
% params: Structure containaing the model parameters.
%
.BoltzmanOrder; IHC membrane mechanical conductance
%
=1 defined as a first order Boltzmann distribution (e.g. Shamma)
%
=2 defined as a second order Boltzmann distribution (e.g. Sumner)
%
.Gmax: IHC membrane max mechanical conductance [S]
%
.Gamma: Constant [m] (only used if first order Boltzmann distribution)
%
.Beta: Constant (only used if first order Boltzmann distribution)
26/07/2015
15
277617810.doc
%
.s0: displacement sensitivity (only used if second order Boltzmann distribution)
%
.u0: displacement offset (m-1) (only used if second order Boltzmann distribution)
%
.s1: displacement sensitivity (only used if second order Boltzmann distribution)
%
.u1: displacement offset (m-1) (only used if second order Boltzmann distribution)
%
.Et: Endococlear potential [V]
%
.Ek: Reversal potential [V]
%
.q: Reversal potential correction =Rp/(Rp+Rt)
%
.Cab: Total capacitance =Ca+Cb [F]
%
.Gk: Potassiun conductance [S]
%
.G0: Gu(u=0) (Gu=Gmu+Ga)
%
% Output parameters:
% V:
Input signal matrix (number of channels x number of data points). IHC receptor
potential) [V]
% method structure containing general information needed
%
.dt: sample time
% info structure containing general extra information useful for the user
%
% Comments:
%
% Created: 22/09/03. Almudena Eustaquio-Martin
%
University of Salamanca, Spain
%
See Cheatham and Dallos (2001) for more information relating IHC response
to the audiogram. This work was not previously taken into account when
setting parameters in Meddis 2006. To do so, it is recommended that we
restore Shamma's value for tauC (stereocilium time constant) of .0003.
This had migrated to 0.0023 in Meddis 2006 for reasons lost to history.
The resting voltage is stored and passed to the nexr module:
method.restingV=restingV;
Plotting:
Surface plots are within the color range -60mV to 0mV
IHC_ShammaParams.fft= 0=1; adds FFT plot
NB allocate an extra plot for this
Also requires these method fields
method.plotGraphs= 1;
method.numPlots= 6;
method.subPlotNo= 0;
method.dt= 2e-006;
method.nonlinCF=[500 1000 1500 2000 2500 3000];
ShammaParamsSumner
IHC_ShammaParams.Et=
0.1;
IHC_ShammaParams.Ek= -0.0745;
IHC_ShammaParams.G0= 1.974e-009;
IHC_ShammaParams.Gk= 1.8e-008;
26/07/2015
16
277617810.doc
IHC_ShammaParams.Rpc= 0.04;
IHC_ShammaParams.Gmax=8e-009;
IHC_ShammaParams.s0=
8.5e-008;
IHC_ShammaParams.u0=
7e-009;
IHC_ShammaParams.s1=
5e-009;
IHC_ShammaParams.u1=
7e-009;
IHC_ShammaParams.Ct=
6e-012;
IHC_ShammaParams.couplingGAINdB= 32;
IHC_ShammaParams.tauC= 0.00213;
IHC_ShammaParams.dt=
-1;
IHC_ShammaParams.fft=
0;
IHC_ShammaParams.comment=
'As Meddis 2006 Table II';
NB useful tauCa values are:
tauCas=[1e-3 .15e-3 .075e-3];
HSR MSR LSR
26/07/2015
17
277617810.doc
5.6 IHCpreSynapse
IHCpreSynapse converts IHC potential to vesicle release probabilities
*************
Input units are Volts and output is probability.
usage:
[releaseRate method A ]=IHCpreSynapse(V, method, IHCpreSynapseParams)
Also requires these method fields
method.plotGraphs= 1;
method.numPlots=
6;
method.subPlotNo= 0;
method.dt=
2e-006;
method.nonlinCF=[500 1000 1500 2000 2500 3000];
method.restingV=
-0.049624;
IHCpreSynapseParams
IHCpreSynapseParams.type= 'clearance';
IHCpreSynapseParams.ECa= 0.066;
IHCpreSynapseParams.beta= 400;
IHCpreSynapseParams.gamma=
130;
IHCpreSynapseParams.tauM= 0.0001;
IHCpreSynapseParams.tauCa= 0.001;
IHCpreSynapseParams.power= 3;
IHCpreSynapseParams.z=
2.000000e+042;
IHCpreSynapseParams.GmaxCa=
8e-009;
IHCpreSynapseParams.dt=
-1;
IHCpreSynapseParams.comment=
'Meddis 2006 Table III';
26/07/2015
18
277617810.doc
5.7 AN_IHCsynapse
AN_IHCsynapse converts IHC release probabilities to AN activity
*************
usage:
[PSTH method releaseEvents] = AN_IHCsynapse(kdt, method, AN_IHCsynapseParams)
Input arguments:
kdt is a channel x time matrix of probabilities that a vesicle will be released
Output arguments:
ANresponse is either the total number of spikes in each epoch or the
probability of firing
PSTH is the binned AN activity; one PSTH per channel
releaseEvents is a logical record of release events
This routine has two modes of operation; spikes and probabilities
AN_IHCsynapseParams.mode=
'spikes'; is slow
AN_IHCsynapseParams.mode=
'probability'; is faster
kdt is a matrix (channels x time) of release probablities
method.kdt0 specifies the probability of release during silence.
This is needed to establish the disposition of vesicles at time 0.
The computation may proceed either for spikes or probability
depending on AN_IHCsynapseParams.mode
If spikes are used, a refractory effect is included.
The refractory effect is relative, in that an absolute refractory effect is followed by
a recovering response probability.
The relative refractory period has the same duration as the absolute period.
releaseEvents (fibers x time) is a (logical) raw matrix of spike events
If there is more than one fiber, then releaseEvents is (numChannels * numFibers x time).
Before leaving the function the fibers are consolidated into a PSTH of spikes per channel.
PSTH is a rate /fiber matrix (channels x bin) - see method.PSTHbinWidth
AN_IHCsynapseParams.plotType has three possible values: 'raster', 'PSTH' or 'prob'.
Also requires these method fields
method.plotGraphs= 1;
method.numPlots=
6;
method.subPlotNo= 5;
method.dt=
2e-006;
method.nonlinCF=
[500 1000 1500 2000 2500 3000 3500 4000 4500 5000];
method.restingV=
-0.049624;
method.kdt0= 2.6462e-005;
AN_IHCsynapseParams
AN_IHCsynapseParams.mode= 'spikes';
AN_IHCsynapseParams.M=
10;
AN_IHCsynapseParams.y=
3;
26/07/2015
19
277617810.doc
AN_IHCsynapseParams.l=
2580;
AN_IHCsynapseParams.x=
30;
AN_IHCsynapseParams.r=
6580;
AN_IHCsynapseParams.dt=
-1;
AN_IHCsynapseParams.refractory_period=
0.00075;
AN_IHCsynapseParams.numFibers=
20;
AN_IHCsynapseParams.PSTHbinWidth=
0.0001;
AN_IHCsynapseParams.numfibers=
20;
AN_IHCsynapseParams.comment=
'Meddis 2006 tableIV';
26/07/2015
20
277617810.doc
5.8 MacGregor
MacGregor converts input spikes input to a binary spike train
********
usage:
[spikes, method, PSTH] = MacGregor(ANspikes, method, MacGregorParams)
Input arguments:
ANspikes is a channels x time PSTH (i.e. spike count).
NB It is not possible to downsample an input of spikes.
If a speed up is required, use a smaller PSTHbinWidth in AN_IHCsynapse
Output arguments:
spikes is a logical matrix of spike activity
PSTH uses method.binwidth to aggregate spikes within channels
Plotting:
If only one channel is used, the plot shows the membrane potential.
Otherwise a raster display is used
Example parameters
NB currentPerSpike is different from the published value
It has been changed to allow scaling for different dt.
Otherwise it is the same
Example of mandatory fields for method
method.plotGraphs= 1;
method.numPlots=
7;
method.subPlotNo= 6;
method.dt=
2e-005;
method.nonlinCF=
[500 1000 1500 2000 2500 3000 3500 4000 4500 5000];
method.ANresponseType=
'spikes';
MacGregorParams
MacGregorParams.dendriteLPfreq= 100;
MacGregorParams.currentPerSpike= 2e-005;
MacGregorParams.tauM=
0.0005;
MacGregorParams.tauGk= 0.0004;
MacGregorParams.tauTh= 0.02;
MacGregorParams.c= 0;
MacGregorParams.b= 8000;
MacGregorParams.Th0=
0.016;
MacGregorParams.R=
60000000;
MacGregorParams.Ek=
-0.01;
MacGregorParams.Eb=
0.06;
MacGregorParams.Er=
-0.06;
MacGregorParams.PSTHbinWidth= 0.001;
MacGregorParams.comment=
'Meddis 2006 Table V new currentPerSpike';
26/07/2015
21
277617810.doc
MacGregorMulti
MacGregorMulti computes a bunch of MacGregor units for each BF channel
**************
Input arguments:
'inputSpikes' is a logical matrix of spikes
Each row is the response of a separate fiber
At least one fiber per channel but there must be the same number of fibers per channel.
Output arguments:
'result' is a logical matrix of spike events (fibers * channel x time).
If there is only one MacGregor unit in total,
'result' is its membrane potential.
PSTH is a channel x time PSTH (spike count)
numNeuronsPerBF specifies the number of units computed in each channel.
Input AN fibers are allocated at random to neurons in the same BF channel.
Random selection of fibers is 'selection with replacement'.
fibersPerNeuron specifies the number of fibers allocated to each neuron.
There must, of course, be as many or more ANfibers per channel than 'fibersPerNeuron'.
All units have the same potassium time constant (tauGk) and other
parameters.
currentPerSpike must be /s and is adjusted by dt
Mandatory method parameters
method.plotGraphs= 1;
method.numPlots=
7;
method.subPlotNo= 6;
method.dt=
2e-005;
method.nonlinCF=
1000;
method.ANresponseType=
'spikes';
MacGregorMultiParams
MacGregorMultiParams.dendriteLPfreq=100;
MacGregorMultiParams.currentPerSpike=
2e-005;
MacGregorMultiParams.tauM= 0.0005;
MacGregorMultiParams.tauGk= 0.001;
MacGregorMultiParams.tauTh= 0.02;
MacGregorMultiParams.c=
0;
MacGregorMultiParams.b=
8000;
MacGregorMultiParams.Th0= 0.016;
MacGregorMultiParams.R=
60000000;
MacGregorMultiParams.Ek=
-0.01;
MacGregorMultiParams.Eb=
0.06;
MacGregorMultiParams.Er=
-0.06;
MacGregorMultiParams.numNeuronsPerBF=
20;
MacGregorMultiParams.fibersPerNeuron=
20;
MacGregorMultiParams.PSTHbinWidth=0.0001;
26/07/2015
22
277617810.doc
26/07/2015
23
277617810.doc
26/07/2015
24
277617810.doc
7 Programs
These programs illustrate the use of the modules.
All programs are available in the folder testPrograms
7.1 testInputOutput
The first sample program is really a function that a user might want to incorporate into
his or her own program. It analyses a stimulus supplied by the user.
To run this program, navigate to the testProgram folder and then copy and paste the
following into the command window
[stimulus sampleRate]=wavread('../wavFileStore/1o7a_44kHz.wav');
wavplay(stimulus, sampleRate)
nChannels= 20;
plotGraphs=1;
ANresponse=testInputOutput(stimulus, sampleRate, nChannels, plotGraphs);
26/07/2015
25
277617810.doc
More details of the program can be found using the command 'help testInputOutput'.
Currently this help is
testInputOutput: No frills auditory periphery model
The model uses human parameters and
produces auditory nerve firing probabilities for HSR fibers.
The model works reasonably well for sampleRates as low as 44 kHz.
Input arguments:
'inputSignal' is a row vector in .wav format (i.e. peak amplitude is 1)
'sampleRate' is in Hz
'nChannels' is the number of channels between 200 Hz and 10 kHz.
'plotGraphs'=1 if plots required, otherwise 0.
Output arguments:
'ANresponse' is a matrix (nchannels x length(inputSignal)) of firing rates.
Usage:
[stimulus sampleRate]=wavread('../wavFileStore/1o7a_44kHz.wav');
Wavplay(stimulus, sampleRate)
nChannels= 20;
plotGraphs=1;
ANresponse=testInputOutput(stimulus, sampleRate, nChannels, plotGraphs);
26/07/2015
26
277617810.doc
7.2 testANsimple
This is a simple get started introduction to the modeling software. To run the demo:
26/07/2015
27
277617810.doc
The command window also shows some interesting statistics obtained as the
computations proceed; e.g.
** peak stimulus pressure = 0.0027945 Pa
** peak stapes velocity = 5.8211e-007 m/s
** peak BM response = 0.0012987 m/s
** cilia dispalacement = 8.1667e-008 m
** peak IHC voltage = -0.044 V
** mean firing rate = 47 spikes/s
26/07/2015
1
6
5
5.0000e-006
16000
-0.0536
0.0144
4
28
277617810.doc
You can alter the stimulus or the configuration of the model by changing lines
sampleRate= 200000;
toneFrequency=16000;
BFlist=toneFrequency;
leveldBSPL=40;
duration=.050;
rampDuration=.005;
ANmodelMode= 'spikes';
%
%
%
%
%
%
%
Hz
multi-channel
dB SPL
duration=.005;
seconds
26/07/2015
29
277617810.doc
7.3 testAN
This test program is mainly there to provide program code that you can use. It also
demonstrates programming techniques and model options that can be used with MAP.
For best results, examine the code in the editor.
To get started quickly
change the directory to testPrograms
load the program into the editor
open testAN
26/07/2015
30
277617810.doc
This program has been designed to be explicit in its layout to make the programming as
transparent as possible to new users. This may not be the best layout for regular modeling
use.
The program has the following form
1. Allows user to choose options in the program
2. Creates (or reads from file) a stimulus (click or pure tone)
3. Runs a series of modules in succession. For each module, it
a. prints out the method structure
b. loads the appropriate parameter file
c. prints out the parameters in a form that can be copied and pasted
d. prints out any useful information from the output of the module preceded
by the sign '**'
e. plots the output of each module in a separate sub plot.
The diagnostics are extensive and are intended to help you become familiar with the
operation of the MAP modeling system.
Make a backup of the program and then explore it by choosing different options.
Cannibalize the code for your own programs.
The output will be different according to the options you choose but here are some
possible outputs.
26/07/2015
31
277617810.doc
26/07/2015
32
277617810.doc
Current information about the program and its options can be found by typing 'help
testAN' on the command line. Currently the information is
% testAN runs the MATLAB auditory periphery model as far as the auditory
% nerve with graphical output and full reporting on module parameters and
% changes to the method structure as the program progresses.
%
% This is a *tutorial* program whose purpose is to illustrate functions
% Before running this progrm, try 'tesANsimple.m'
% This version of testAN allows all kinds of options to be examined (see below).
%
% User-set parameters:
% 'stimulus' can either be a click, a pure tone or .wav file;
% Advice:
% If a file is used the sample rate of the file will overide the sample rate
set.
%
the sample rate of the file should be *at least* 42000.
% Set leveldBSPL to the 'peak amplitude' (not rms)
% Note that ramps are not applied to clicks or file input
%
% 'species' can be either guineaPig or human.
% 'guineaPig' uses
%
Sumner's 2003 guinea pig outer middle ear parameters
%
Sumner's 2003 guinea pig DRNL parameters
%
Sumner's 2003 IHC parameters and the IHC_ShammaSumner IHC module
% 'human' uses
%
OME parameters based on Roggero and Temchin
%
Lopez-Poveda's 2001 human DRNL parameters
%
IHC_Shamma IHC module and Shamma's parameters with modifications
26/07/2015
33
277617810.doc
26/07/2015
34
277617810.doc
testANfileInput
This is similar to testAN above but illustrates a number of different features
The input is from file. The file is assumed to be in the wavFileStore folder. This simplifies
path problems. The duration is derived from the length of the wavFile
The sample rate and the signal duration are based on the file itself. This has important
implications. Most wav files are recorded at very low sample rates; much too low for
modeling purposes. The illustration below is based on a .wav file samples at 96 kHz. The
user must resample the signal to an appropriate rate for modeling (not listening). This
can be done to the file itself (as here) or more economically as a few lines in the program.
All the parameters are loaded and any adjustments are made at the beginning of the
program. Running the model is simply a case of cycling through the modules.
The list of channel BFs is arranged logarithmically. The formula for this should come in
handy for your own applications.
'107a_44kHz.wav'
probability
26/07/2015
spikes
35
277617810.doc
help testANfileInput
% testANfileInput runs the MATLAB auditory periphery model as far as the
auditory
% nerve with graphical output and full reporting on module parameters and
% changes to the method structure.
%
% The stimulus is read from a wav file and scaled to Pascals
%
% The model uses conjectured parameters for human hearing
%
% The model can be run at a single BF or as a multi-channel implementation
%
26/07/2015
36
277617810.doc
7.4 testAN_rateLevel
This program extends testAN (see above) to create rate/level functions. At the beginning
of the program, the user can select model options. Make a back up before exploring.
In this example, the model uses a 'guinea pig' filter (BF=18 kHz) stimulated by a 100-ms
BF pure tone. The model evaluates the probability of AN firing in three types of fibers
(HSR, MSR, LSR) defined by their calcium clearance rates (tauCa).
Figure (3) shows the three rate/level functions
Probability
spikes
Note that probability figure does not make any correction for refractory effects.
When spikes are used, refractory effects are taken into account. 100 fibers are used
and this represents 100 trials of the same fiber because the fibers are identical apart from
their stochasticity.
26/07/2015
37
277617810.doc
26/07/2015
38
277617810.doc
7.5 testMacGregor
A program to demonstrate the simple MacGregor module. The program runs the
peripheral model (guinea pig) to generate the output from 20 AN fibers per channel in the
form of spikes. These 20 fibers provide input to a single Macgregor unit per channel. If a
single channel input is used, the MacGregor receptor potential for the single cell is shown
on the plot. Otherwise a raster display is given in the final plot.
The chopping rate is determined by many things but is most easily influenced by
changing the potassium time constant:
MacGregorParams.tauGk=
0.001;
SINGLE CHANNEL
MULTI-CHANNEL
help testMacGregor
testMacGregor runs the MATLAB auditory periphery model beyond the auditory
nerve to include a MacGregors cell putatively simulating a chopper neuron.
It has graphical output and full reporting on module parameters
26/07/2015
39
277617810.doc
7.6 testMacGregorMulti
This program computes a large group of AN fibers in each channel. In this case 100 fibers
are computed:
AN_IHCsynapseParams.numFibers=
100;
These act as the input to the MacGregorMulti module. This simulates a number of CN
chopper units. In this case 20 units per BF channel are computed
MacGregorMultiParams.fibersPerNeuron=
20;
The AN fibers providing input to a single unit are selected at random from the input. A
single AN fiber can be used for multiple CN units.
MacGregorMultiParams.numNeuronsPerBF=
SINGLE CHANNEL
26/07/2015
20;
MULTI-CHANNEL
40
277617810.doc
7.7 testCN_MTF
This computes the modulation transfer function of the CN neurons described in
testMacGregorMulti above. The stimulus is a SAM tone and its rate of modulation is
changed on each successive stimulus. A period histogram and a vector strength are
computed for each stimulus and these are plotted at the end of the program.
The MTF is evaluated by playing an amplitude modulated BF carrier tone. In this case
the carrier tone (and BF) has a frequency of 5 kHz. It is modulated to a depth of 35% and
played at a low level (20 dB SPL). The MTF is typically flat at high signal levels.
The modulation rate is varied on each pass between 40 and 500 Hz. 50 CN units are
simulated in a single pass. This is to represent a 50 trial experiment. A vector-strength
metric is computed on the basis of a period histogram created using the 50 spike trains.
The modulation gain is based on this.
The simulation uses 200 AN fibers supplying input to 50 CN units on the basis of 20
fibers per neuron allocated on a random and overlapping basis. Many aspects of the
stimulus and MacGregor parameters influence the shape of the MTF.
For more information, see:
Hewitt, M. J., Meddis, R. and Shackleton, T. M. (1992). "A computer model of a cochlear-nucleus
stellate cell: responses to amplitude modulated and pure-tone stimuli," Journal of the Acoustical
Society of America 91, 2096-2109.
26/07/2015
41
277617810.doc
26/07/2015
42
277617810.doc
7.8 testIC
This program simulates the spike activity of 20 CN units per channel (see
testMacGregorMulti above).
The spike activity of all 20 units is used as input to a simple MacGregor unit (see
testMacGregor above). These are presumed to be IC units. The model has is one IC unit
per BF channel.
The stimulus consists of the 2-5th harmonic of 200 Hz fundamental.
SINGLE CHANNEL
26/07/2015
MULTI-CHANNEL
43
277617810.doc
7.9 testIC_MTF
This program extends testIC (see above) to generate MTF and rateMTSs using SAM
tones. The model has been tuned to give a nice rate MTF and uses very low signal levels.
Note that the MTF is flat while the rateMTF is tuned to 1000 Hz
For more information see Hewitt, M. J. and Meddis, R. (1994). "A Computer Model of
Amplitude-Modulation Sensitivity of Single Units in the Inferior Colliculus," Journal of
the Acoustical Society of America 95, 2145-2159. The parameters may not be the same
26/07/2015
44
277617810.doc
7.10 testAudiogramWithMacGregor
testAudiogramWithMacGregor measures audiograms or tuning curves
this is an advanced application of MAP and computationally expensive.
Please expect a long processing time of many minutes or hours.
Figure 3 gives either audiograms or tuning curves
Figure 2 shows the BM input/output function for the last BF
(useful check when things go wrong. At BF and 0 dB SPL BM velocity should
be around 10e-6 m/s).
Set experimentType to either 'audiogram' or 'tuningCurve'
For audiograms specifiy audioGramfrequencies (e.g. .25 .5 1 2 4 8 kHz)
For tuning curves specify BFs in tuningCurveBFlist and values to be sampled in
tuningCurveFreqRatios as ratios of BF.
The tuning curve algorithm is slow and crude but complete.
It measures responses at all levels (probeLevels)
and at all frequencies (tuningCurveFreqRatios*BF) before looking for thresholds
using the 'findThreshold' function.
iso-response functions are reported for BM, AN and CN.
iso-response criteria need to be set in findThreshold.m
At the end of each run, results are stored in
'savedResults<BF>Hz<species>.mat' for tuning curves (one per BF)
'savedResults0Hz<species>.mat' for audiogram
findThreshold.m uses the data stored in this file
As a result findThresholds can be called from the command line if it is
necessary to explore threshold criteria without re-computing the data.
e.g. findThresholds(BF,'human')
Different OME and BM models are used for human and guinea pig.
Warning: sampleRate needs to be high when high frequencies are used
even though, this slows the program down.
a great deal of useful information is printed at the end of execution.
This is worth studying when familarizing.
26/07/2015
45
277617810.doc
26/07/2015
46
277617810.doc