Innear ear models in Python.
Return nearest valid frequency relative to cf.
Create Brian’s spike generator group from spike trains.
Parameters: | trains : spike_trains
|
---|---|
Returns: | brian.SpikeGeneratorGroup
|
Run the inner ear model by [Holmberg2007]. It simulates the traveling wave on the basilar membrane, inner hair cell, synapses and generates auditory nerve spikes. The model takes sound signal as input and outputs auditory nerve spike trains.
Parameters: | sound : array_like
fs : float
anf_num : tuple
seed : int
cf : float or array_like or None, optional
syn_mode : {‘probability’, ‘quantal’}, optional
|
---|---|
Returns: | spike_trains
|
References
If you are using results of this or modified version of the model in your research, please cite [Holmberg2007].
[Holmberg2007] | Holmberg, M. (2007). Speech Encoding in the Human Auditory Periphery: Modeling and Quantitative Assessment by Means of Automatic Speech Recognition. PhD thesis, Technical University Darmstadt. |
Run the inner ear model by [Holmberg2007] in the quantal mode and return vesicles instead of spikes.
Parameters: | sound : array_like
fs : float
anf_num : tuple
seed : int
cf : float or array_like or None, optional
|
---|---|
Returns: | pd.DataFrame with vesicle timings
|
References
If you are using results of this or modified version of the model in your research, please cite [Holmberg2007].
[Holmberg2007] | Holmberg, M. (2007). Speech Encoding in the Human Auditory Periphery: Modeling and Quantitative Assessment by Means of Automatic Speech Recognition. PhD thesis, Technical University Darmstadt. |
Run the inner ear model by [Zilany2009].
This model is based on the original implementation provided by the authors. The MEX specific code was replaced by Python code in C files. We also compared the outputs of both implementation (see the tests directory for unit tests).
Parameters: | sound : array_like
fs : float
anf_num : tuple
cf : float or array_like or tuple
seed : int
cohc : flaot, optional
cihc : flaot, optional
powerlaw: {‘approximate’, ‘actual’}, optional
|
---|---|
Returns: | spike_trains
|
Notes
The fractorial Gausian noise from the oryginal implementation is disabled at the moment.
References
If you are using results of this or modified version of the model in your research, please cite [Zilany2009].
[Zilany2009] | (1, 2, 3) Zilany, M. S., Bruce, I. C., Nelson, P. C., & Carney, L. H. (2009). A phenomenological model of the synapse between the inner hair cell and auditory nerve: long-term adaptation with power-law dynamics. The Journal of the Acoustical Society of America, 126(5), 2390-2412. |
Run the inner ear model by [Zilany2014].
This model is based on the original implementation provided by the authors. The MEX specific code was replaced by Python code in C files. We also compared the outputs of both implementation (see the tests directory for unit tests).
Parameters: | sound : array_like
fs : float
anf_num : tuple
cf : float or array_like or tuple
species : {‘cat’, ‘human’, ‘human_glasberg1990’}
seed : int
cohc : float <0-1>, optional
cihc : float <0-1>, optional
powerlaw : {‘approximate’, ‘actual’}, optional
ffGn : bool
|
---|---|
Returns: | spike_trains
|
References
If you are using results of this or modified version of the model in your research, please cite [Zilany2014].
[Zilany2014] | Zilany, M. S., Bruce, I. C., & Carney, L. H. (2014). Updated parameters and expanded simulation options for a model of the auditory periphery. The Journal of the Acoustical Society of America, 135(1), 283-286. |
Run the inner ear model by [Zilany2014]. Return mean firing rate of the auditory nerve fibers.
Notes
This implementation is was not used very much and may have some problems. Use with caution! (Like any implementation here, BTW)
References
[Zilany2014] | Zilany, M. S., Bruce, I. C., & Carney, L. H. (2014). Updated parameters and expanded simulation options for a model of the auditory periphery. The Journal of the Acoustical Society of America, 135(1), 283-286. |
Rescale the signal to a new level in dB SPL.
Parameters: | signal : array_like
dbspl : float
|
---|---|
Returns: | array_like
|
External models.
Run Matlab Auditory Periphery [MAP] model by Ray Meddis. This function does not implement the model, but wraps the model implementation using matlab_wrapper. The model takes sound signal as input and outputs auditory nerve spike trains.
In order to run it, make sure that all necessary [MAP] model files are in MATLABPATH. You should be able to run MAP1_14 function in MATLAB first!
Requires MATLAB, matlab_wrapper, thorns and [MAP] in MATLABPATH.
Parameters: | sound : array_like
fs : float
anf_num : tuple
cf : float or array_like or tuple
seed : int
params_name : str, optional Tail of the parameter filename
matlab_session : MatlabSession or None, optional
|
---|---|
Returns: | spike_trains
|
References
[MAP] | (1, 2, 3, 4) http://www.essexpsychology.macmate.me/HearingLab/modelling.html |
Calculate human hearing thresholds for given frequencies.
References
E. Terhardt, “Calculating virtual pitch”, Hearing Res., vol. 1, pp. 155–182, 1979.
http://www.diracdelta.co.uk/science/source/t/h/threshold%20of%20hearing/source.html
Calculate modulation gain of an inner ear model.
Parameters: | fms : array_like
cf : scalar, optional
model_pars : dict, ooptional
m : float, optional
level_above_threshold : scalar, optional
map_backend : str, optional
|
---|
Calculate rate-level characteristic of an auditory model.
Parameters: | dbspls : array_like, optional
|
---|
Calculate vector strength of an inner ear model.
Calculate rate based hearing threshold of an inner ear model.
Calculate runing of the cochlea at cf.