examples.test_sound_stim¶
Test using sound stimulation to generate SGC spike trains.
This script uses an_model.get_spiketrain(), which internally calls MATLAB to generate spike trains and caches the output. A higher-level approach is to use DummySGC, which will automatically feed the spike train into a synapse for input to downstream neurons (see test_sgc_input.py). Lower-level access to the auditory nerve model is demonstrated in test_an_model.py.
This script also can measure the time required to generate the spike trains, or to retrieve them from the cache. In addition, it can access a second interface to the Zilany et al. mode that is in pure python (“cochlea”) for comparison. In general the speed to compute the spike trains for the same sets of stimuli is faster with the pure Python interface than with the Matlab interface, and fastest for retrieval of pre-computed trains. Note that changing the value of “seed” will force a recomputation of the spike trains.
-
examples.test_sound_stim.runtest()[source]
-
examples.test_sound_stim.set_dbspl(signal, dbspl)[source] Scale the level of signal to the given dB_SPL.
-
examples.test_sound_stim.sound_stim(*args, **kwargs)[source]
-
examples.test_sound_stim.time_usage(func)[source]