previous next Up Title Contents

AnSpikeGen_Binomial: Auditory Nerve Binomial Approximation


File name
MoANSGBinom.[ch]


Description
This module expects to receive spike probabilities as an input signal, which are then converted to spike events using a random number generator. It uses the geometric distribution method (see routine The GeomDist_Random(...) Routine) to produce the results for s specified number of fibres (without the need for a loop). A refractory effect is also applied (see module 0).

This approximation runs much faster then the other less efficient auditory nerve modules, but only when a large number of fibres is specified. When a smaller number of fibres is used, then the approximation starts to fail. If in doubt, then always check the output using this module against the output using the "ANSpikeGen_Simple" module.



Example parameter file format
5000	Number of fibres.
1	Random number seed.
0.02e-3	Pulse duration (s).
1.0	Pulse magnitude (nA?).
1.0e-3	Refractory period (s).



Test program directory
Tests/Models/Auditory_N

Generic Module Routines

This module has the standard Generic Module Routines (see Basic Module Routines used in Generic Programming, page 52).

The RunModel_ANSpikeGen_Binomial(...) Process Routine

Syntax
BOOLN RunModel_ANSpikeGen_Binomial(EarObjectPtr data);


Returns
TRUE if the process is successful, otherwise it returns FALSE.

The SetNumFibres_ANSpikeGen_Binomial(...) Routine

Syntax
BOOLN SetNumFibres_ANSpikeGen_Binomial(double theNumFibres);


Returns
TRUE if the function is successful, otherwise it returns FALSE.

The SetPars_ANSpikeGen_Binomial(...) Routine

Syntax
BOOLN SetPars_ANSpikeGen_Binomial(int numFibres, long ranSeed, double pulseDuration, double pulseMagnitude, double refractoryPeriod);


Returns
TRUE if the function is successful, otherwise it returns FALSE.

The SetPulseDuration_ANSpikeGen_Binomial(...) Routine

Syntax
BOOLN SetPulseDuration_ANSpikeGen_Binomial(double thePulseDuration);


Returns
TRUE if the function is successful, otherwise it returns FALSE.

The SetPulseMagnitude_ANSpikeGen_Binomial(...) Routine

Syntax
BOOLN SetPulseMagnitude_ANSpikeGen_Binomial(double PulseMagnitude);


Returns
TRUE if the function is successful, otherwise it returns FALSE.

The SetRanSeed_ANSpikeGen_Binomial(...) Routine

Syntax
BOOLN SetRanSeed_ANSpikeGen_Binomial(double theRanSeed);


Special Values
A negative random number seed will change the sequence of random numbers used.


Returns
TRUE if the function is successful, otherwise it returns FALSE.

The SetRefractoryPeriod_ANSpikeGen_Binomial(...) Routine

Syntax
BOOLN SetRefractoryPeriod_ANSpikeGen_Binomial(double theRefractoryPeriod);


Returns
TRUE if the function is successful, otherwise it returns FALSE.

Example: Tests/Models/Auditory_N/BinomialSpike c

Parameter file: BinomialSpike.par:

# Main Parameter file
#
output.dat	Name of output file.

# Module specifications.

#Par. file		Name		Description
#---------		-----		-------------
PTone1.par		PureTone	Stimulus generation paradigm.
Meddis86.par		IHC_Meddis86		Inner hair cell (IHC) model.

BinomSG1.par	Auditory nerve spike generation.

# Miscellaneous parameters

1		Number of repeated runs.
2.5e-3	Ramp up rise time for signal (s).
Output

Figure [53] Output for Binomial approximation spike generation test.

Comments:

This test program shows the Binomial spike generation routine used in conjunction with the Meddis '86 hair cell. It shows the stochastic response expected of a real AN fibre.


previous next Up Title Contents