63
Manual MAPv1_6 MAP (MATLAB auditory periphery) Ray Meddis. [email protected] Department of Psychology, Essex University, UK, CO7 9SW 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 ). 25/05/2022 1 document.doc

Manual Mapv1 6

Embed Size (px)

DESCRIPTION

Manual Mapv1 6

Citation preview

ReadMe_MAPv1

Manual MAPv1_6MAP (MATLAB auditory periphery)Ray Meddis. [email protected]

Department of Psychology, Essex University, UK, CO7 9SW

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.htmlThere 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 [email protected]

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).

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 modulesThese are functions that directly relate to the auditory peripheryUtilities are kept in the folder utilitiesThese are functions that help around the houseParameter files are kept in the folder parameterStoreEach 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.matouterMiddleEarParamsGPSumner03.mat

Test programs are kept in the folder testProgramsThese programs exercise the modules and utilities. They also act as tutorials and sources of chunks of code that you can use in your own programsSignal files are kept in wavFileStoreOnly .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 ( [MAPlocation '\modules'] )rmpath ( [MAPlocation '\utilities'] )rmpath ( [MAPlocation '\parameterStore'])rmpath ( [MAPlocation '\wavFileStore'])

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 action

inputStimuluschecks the stimulus input outerMiddleEarconverts sound to stapes motion DRNL

converts stapes motion to basilar membrane motion RPihc_Shammaconverts BM motion to IHC receptor potential IHCpreSynapseconverts RP to probability of vesicle release AN_IHCsynapseconverts vesicle release to AN activity

MacGregor

computes single chopper unit response from AN input MacGregorMulti computes populations of choppers from AN inputAll modules are called using the same format,

[earObject method functionSpecificAnalysis] =

functionName (earObject, method, functionNameParams)

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 ; 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 it. Not all modules use this facility but the argument is always available to create uniformity among module functions.

3.1 Method structureMethod is a structure that accumulates information across successive modules, such as sampling interval (method.dt), a list of channel best frequencies (BFs) (method.nonlinCF), etc. It is also used to guide the plotting process.

The only obligatory fields at the start of a run are,method.plotGraphs=1; % please plot

ormethod.plotGraphs=0; % plotting not requiredIf 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=6; % total no. of plots requiredmethod.subPlotNo=0; % initialize plot count

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 parameters4.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:

e.g., inputStimulusParamsMeddisThe 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

e.g. inputStimulusParamsParameters 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).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.1 Sampling interval

All parameter sets require a sample interval value (dt). In the case of the inputStimulus module, inputStimulus.dt defines the sampling interval of the stimulus. The sample interval is, of course, 1/sampleRate.If moduleNameParams.dt is specified as -1, the module simply inherits the sample interval of the previous module. This current value of dt is passed from one module to the next through method.dt. This is the normal mode of operation.If moduleNameParams.dt is greater than the passed value (method.dt), the earObject is down sampled accordingly. This can be a useful way of speeding up the model in its later stages when the sample rate can safely be much slower than that required by the early filtering routines. However, down sampling is not always a meaningful procedure; when this is the case, the module simply ignores the request.

The parameters supplied are for human and guinea pig models. When using guinea pig parameters, note that the most sensitive frequency region is around 10-20 kHz. Sampling rates need to be higher when working in this region.

Sample rates need to be set as a compromise between accuracy and time taken. Try repeating a run at double the desired sample rate to check that there is no loss of accuracy at your rate. This is a useful check for many reasons. If the results change substantially when the sample interval is decreased, this indicates a problem with the programming of model. 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';4.2 Optimising parameters

This section is mainly about tactics rather than programming. Ignore it if you are reading the manual for the first time.

Note that all units in this software are international units (Pa, m, s).

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.

4.2.1 Benchmark observation values

How do you know when a model is working well? The best guide is that the model will reproduce experimental observations. I use a number of simple tests for checking basic functioning based on some influential papers in the literature. Nuttall and Dolan (1986) published some very detailed stapes and BM velocity values for guinea pig for a single BM site with a BF of 18 kHz at a range of signal levels (animal 23-81; Fig. 2 and table A1). Their values are typical of those found in the literature.When setting parameters, check your responses at 5 and 83 dB SPL against their values. Try to get the model to produce peak responses within an order of magnitude of this value.Stimulus:5 dB signal has a peak amplitude of

5e-5 Pascals

Stapes: Nutall and Dolan (1996, guinea pig) 18 kHz

At 5 dB SPL they give a peak stapes velocity of 10e-9 m/s

At 83 dB SPL they give a peak stapes velocity of 539e-6 m/sStenfelt (2006, human) 1 kHz

At 80 dB SPL at the tympanic membrane (i.e. no outer ear filtering) gives a peak stapes displacement of 10e-9 m at 1000 Hz.This translates to a peak velocity of 63e-6 m/s N.B. at 1 kHz, there is little attenuation by the outer ear, so this is a reasonable guide target.BM 18 kHz:At 5 dB SPL, BM peak velocity of

36e-6 m/s At 83 dB SPL BM peak velocity of

539e-6 m/s. IHC: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.

5 Module descriptionsInformation on individual modules can be found using help. What follows is a listing of the help files for each module; for examplehelp inputStimulus

help outerMiddleEar

help DRNLhelp bm2ciliadisp

help IHC_Shamma

help IHCpreSynapse

help AN_IHCsynapse

help MacGregorhelp MacGregorMultiThese 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)

Also requires these method fields

method.plotGraphs= 1;

method.numPlots=6; % user sets number of plots required

method.subPlotNo=0;

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;

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

[ ]

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;5.2.1 Example parameters:

outerMiddleEarParamsGPSumner03

outerMiddleEarParams.mode='cascade';

outerMiddleEarParams.filters= [

0 4000 25000 2

0 700 30000 3

];

outerMiddleEarParams.stapesScalar=0.00014;

outerMiddleEarParams.fft=0;

outerMiddleEarParams.dt=-1;

outerMiddleEarParams.comment='Sumner 2003;';

outerMiddleEarParamsHUMANRuggeroouterMiddleEarParams.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

% method.plotGraphs=1;

% method.numPlots=6;

% method.subPlotNo=0;

% method.dt=2e-006;5.3.1 Example parameters: Note DRNLParams.ID is a dummy variable to make the parameter list more readable!DRNLParamsGuineaPigSumner03

DRNLParams.comment=' DRNL params (guinea pig) from Sumner 2003 JASA 113, 3264-3118';

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.8 1.87 -5.65 0.339 1.3 5.68 -1];

DRNLParams.m=[0.58 0.45 0.875 0.895 0.53 -0.97 0];

DRNLParams.dt=-1;DRNLParamsHUMANELP01DRNLParams.comment=' DRNL params HUMAN from Lopez-Poveda 2001 Tables II & III';

DRNLParams.linOrder=3;

DRNLParams.NumLinLPfilters=4;

DRNLParams.nonlinOrder=3;

DRNLParams.NumNonlinLPfilters=3;

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;

DRNLParams.BFlist=1000;

DRNLParamsHUMANELP01aNB experimental version to give a better audiogramDRNLParams.comment='modified from Lopez-Poveda 2001 Tables II & III';

DRNLParams.commenta=' a_ parameter modified to give better audiogram';

DRNLParams.linOrder=3;

DRNLParams.NumLinLPfilters=4;

DRNLParams.nonlinOrder=3;

DRNLParams.NumNonlinLPfilters=3;

DRNLParams.ID='nonlinBW a b linCF linBW lin GAIN c';

DRNLParams.p0=[-0.031 3.7 1.619 -0.067 0.037 4.2 -0.69897];

DRNLParams.m=[0.774 0.1 -0.818 1.016 0.785 -0.48 0];

DRNLParams.dt=-1;

DRNLParams.BFlist=1000;Other parameter files in the store are not supported here

5.4 bm2ciliaNew to MAPv1.5!bm2cilia.m converts BM motion or displacement to IHC stereocilia displacement

This code was supplied by Almodena Eustaqio Martin (AEM).

5.4.1 Example parameters: IHC_ciliaParams06

IHC_ciliaParams.comment='Meddis 2006 Table II';

IHC_ciliaParams.CdB=16;

IHC_ciliaParams.tc=0.00213;

IHC_ciliaParams.bm_units='velocity';

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_ShammaNew to MAPv1.5!

This function converts stereocilia displacement to receptor potential voltage.

This code was supplied by Almodena Eustaqio Martin (AEM).

The code allows the user to follow Shammas method directly involving a first-order Boltzman function or Sumners method using a second order Boltzman. See IHC_ShammaParams.BoltzmanOrder. If the first order Boltzman is chosen parameters beta and Gamma are used (see Shamma et al 1986). If the second order Boltzman is used, parameters s0, s1, u0, u1 are used (see Sumner 2003). 5.5.1 Example parameters: IHC_RP(Shamma_Sumner)IHC_ShammaParams.comment='uses parameters from Meddis 2006 Table II';

IHC_ShammaParams.comment1='Use BoltzmanOrder=2';

IHC_ShammaParams.BoltzmanOrder=2;

IHC_ShammaParams.Et=0.1;

IHC_ShammaParams.Ek=-0.0745;

IHC_ShammaParams.Rpc=0.04;

IHC_ShammaParams.Gk=1.8e-008;

IHC_ShammaParams.G0=1.974e-009;

IHC_ShammaParams.Gmax=8e-009;

IHC_ShammaParams.q=0.04;

IHC_ShammaParams.Cab=6e-012;

IHC_ShammaParams.Beta=0.25;

IHC_ShammaParams.Gamma=10000000;

IHC_ShammaParams.s0=8.5e-008;

IHC_ShammaParams.u0=7e-009;

IHC_ShammaParams.s1=5e-009;

IHC_ShammaParams.u1=7e-009;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)

% .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;

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

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';

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 willbe 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;

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';

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';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;

6 Programming the model6.1 HumanFor simulating human responses, the following is recommended. Put your list of channel BFs in BFlist and then use the following code.% inputStimulus

load inputStimulusParams

[earObject method A] = ...

inputStimulus (inputSignal, method, inputStimulusParams);

% outer/ middle ear (OME)

load outerMiddleEarParamsHUMANRuggero

[earObject method A] = ...

outerMiddleEar (earObject, method, outerMiddleEarParams);

% BM response (DRNL)

load DRNLParamsHUMANELP01a

DRNLParams.BFlist=BFlist;

[earObject method A] = ...

DRNL (earObject, method, DRNLParams);

% IHC receptor potential

load IHC_ShammaParamsNew

[earObject method A] = ...

IHC_Shamma (earObject, method, IHC_ShammaParams);

% pre-synaptic calcium

load IHCpreSynapseParams

[earObject method A] = ...

IHCpreSynapse (earObject, method, IHCpreSynapseParams);

% IHC/AN synapse

load AN_IHCsynapseParams

[earObject method PSTH] = ...

AN_IHCsynapse (earObject, method, AN_IHCsynapseParams);6.2 Guinea pig

For simulating guinea pig responses, the following is recommended. Put your list of channel BFs in BFlist, set dt and then use the following code.

% inputStimulus

load inputStimulusParams

inputStimulusParams.dt=dt; [earObject method A] = ...

inputStimulus (inputSignal, method, inputStimulusParams); % outer/ middle ear (OME)

load outerMiddleEarParamsGPSumner03

[earObject method A] = ...

outerMiddleEar (earObject, method, outerMiddleEarParams);

% BM response (DRNL)

load DRNLParamsGuineaPigSumner03

DRNLParams.BFlist=BFlist;

[earObject method A] = ...

DRNL (earObject, method, DRNLParams);

% IHC receptor potential

load IHC_ShammaParamsSumner

[earObject method A] = ...

IHC_ShammaSumner (earObject, method, IHC_ShammaParams);

% pre-synaptic calcium

load IHCpreSynapseParams

[earObject method A] = ...

IHCpreSynapse (earObject, method, IHCpreSynapseParams);

% IHC/AN synapse

load AN_IHCsynapseParams

[ANresponse method PSTH] = ...

AN_IHCsynapse (earObject, method, AN_IHCsynapseParams);

7 Programs

These programs illustrate the use of the modules. All programs are available in the folder testPrograms7.1 testInputOutputThe 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);

The results should look like this.

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);

7.2 testANsimple

This is a simple get started introduction to the modeling software. To run the demo: change the directory to testPrograms

load the program into the editor

open testANsimple switch to the editor

hit keyYou should get something like this

Each panel represents a different stage of the peripheral model

stimulus (Pa)

50 ms pure tone, 16 kHz, peak amplitude 40 dB SPL, 5 ms onset and offset raised-cosine ramps, 200 kHz sample rate stapes vibration (m/s)

basilar membrane vibration (m/s)

Single channel (BF=16 kHz) based on guinea pig data IHC receptor potential (V)

IHC/AN synapse transmitter release (vesicles/s)

AN spikes raster plot for 20 AN fibers all with BF = 16 kHz

The command window will show all the parameters used in the model. Each module has its own set of parameters. For example, the parameters for the IHC receptor potential module is based on Shammas model and has these parameters

IHC_ShammaParams.comment='uses parameters from Meddis 2006 Table II';

IHC_ShammaParams.comment1='Use BoltzmanOrder=2';

IHC_ShammaParams.BoltzmanOrder=2;

IHC_ShammaParams.Et=0.1;

IHC_ShammaParams.Ek=-0.0745;

IHC_ShammaParams.Rpc=0.04;

IHC_ShammaParams.Gk=1.8e-008;

IHC_ShammaParams.G0=1.974e-009;

IHC_ShammaParams.Gmax=8e-009;

IHC_ShammaParams.q=0.04;

IHC_ShammaParams.Cab=6e-012;

IHC_ShammaParams.Beta=0.25;

IHC_ShammaParams.Gamma=10000000;

IHC_ShammaParams.s0=8.5e-008;

IHC_ShammaParams.u0=7e-009;

IHC_ShammaParams.s1=5e-009;

IHC_ShammaParams.u1=7e-009;

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

Whenever a module is called, it is supplied with a general purpose structure called method. This is also shown in the command window to give an impression of the information that is carried by this useful little structure. The final value of method is:

method =

plotGraphs: 1

numPlots: 6

subPlotNo: 5

dt: 5.0000e-006

nonlinCF: 16000

restingV: -0.0536

kdt0: 0.0144

rasterDotSize: 4

You can alter the stimulus or the configuration of the model by changing lines

sampleRate= 200000; % Hz (higher sample rate for guinea pig) toneFrequency=16000; % HzBFlist=toneFrequency; % tone is at BF leveldBSPL=40; % dB SPLduration=.050; % duration=.005; rampDuration=.005; % seconds ANmodelMode= 'spikes'; % force spikes rather than AN probabilityBefore doing so, you should save the program as temp.m.The following changes will produce a multi-channel model with 10 BFs between 10 kHz and 20 kHz. the stimulus is now 14 kHz at a level of 80 dB SPL and a duration of 10 ms. the ramps are still 5 ms so that the signal has no steady-state portion.

toneFrequency=14000; % HzBFlist=10000:1000:20000;% multi-channel leveldBSPL=80; % dB SPLduration=.010; % duration=.005; rampDuration=.005; % seconds

This gives the following output.

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

move to the editor and hit key

Explore the program. It offers many options choose the

species

signal type and signal parameters

number of channels

fibre type (HSR, MSR, LSR)

These values are set in the first few lines of the program. Almost all options work with each other. Most problems occur when the input is from file and the sample rate of the file is lower than what is reasonable for an auditory model (