The Auditory Modeling Toolbox

Applies to version: 0.9.8

View the code

Go to function

EXP_VERHULST2012 - Compute figurs from the Verhulst paper

Usage

output = exp_verhulst2012(flag)

Description

This script reproduces figures 2a and 2c from Verhulst et al. "Nonlinear time-domain cochlear model for transient stimulation and human otoacoustic emission." The Journal of the Acoustical Society of America 132.6 (2012): 3842-3848.

Requirements and installation:

  1. Python >2.6 is required with numpy and scipi packages. On Linux, use sudo apt-get install python-scipy python-numpy
  2. Compiled files with a C-compiler, e.g. gcc. In amtbase/bin/verhulst2012 start make (Linux) or make.bat (Windows)
  3. On linux, when problems with GFORTRAN lib appear, try sudo ln -sf /usr/lib64/libgfortran.so.3.0.0 /mymatlabroot/sys/os/glnxa64/libgfortran.so.3 (mymatlabroot is usually /usr/local/MATLAB/version

Examples:

To display Figure 2a from the Verhulst et al. (2012) use:

exp_verhulst2012('fig2a');

This code produces the following output:

Traceback (most recent call last):
  File "run_cochlear_model.py", line 5, in <module>
    import cochlear_model
  File "/media/sf_AMT/amtoolbox/code/bin/verhulst2012/cochlear_model.py", line 20, in <module>
    libtrisolv=np.ctypeslib.load_library("tridiag.so",os.path.dirname(os.path.abspath(__file__)))
  File "/usr/lib/python2.7/dist-packages/numpy/ctypeslib.py", line 131, in load_library
    raise exc
OSError: /media/sf_AMT/amtoolbox/code/bin/verhulst2012/tridiag.so: invalid ELF header
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 64, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python2.7/dist-packages/apport/__init__.py", line 5, in <module>
    from apport.report import Report
  File "/usr/lib/python2.7/dist-packages/apport/report.py", line 16, in <module>
    from xml.parsers.expat import ExpatError
  File "/usr/lib/python2.7/xml/parsers/expat.py", line 4, in <module>
    from pyexpat import *
ImportError: /usr/lib/python2.7/lib-dynload/pyexpat.x86_64-linux-gnu.so: undefined symbol: XML_SetHashSalt

Original exception was:
Traceback (most recent call last):
  File "run_cochlear_model.py", line 5, in <module>
    import cochlear_model
  File "/media/sf_AMT/amtoolbox/code/bin/verhulst2012/cochlear_model.py", line 20, in <module>
    libtrisolv=np.ctypeslib.load_library("tridiag.so",os.path.dirname(os.path.abspath(__file__)))
  File "/usr/lib/python2.7/dist-packages/numpy/ctypeslib.py", line 131, in load_library
    raise exc
OSError: /media/sf_AMT/amtoolbox/code/bin/verhulst2012/tridiag.so: invalid ELF header
exp_verhulst2012_1_1.png

To display Figure 2c from the Verhulst et al. (2012) use:

exp_verhulst2012('fig2c');

This code produces the following output:

Traceback (most recent call last):
  File "run_cochlear_model.py", line 5, in <module>
    import cochlear_model
  File "/media/sf_AMT/amtoolbox/code/bin/verhulst2012/cochlear_model.py", line 20, in <module>
    libtrisolv=np.ctypeslib.load_library("tridiag.so",os.path.dirname(os.path.abspath(__file__)))
  File "/usr/lib/python2.7/dist-packages/numpy/ctypeslib.py", line 131, in load_library
    raise exc
OSError: /media/sf_AMT/amtoolbox/code/bin/verhulst2012/tridiag.so: invalid ELF header
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 64, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python2.7/dist-packages/apport/__init__.py", line 5, in <module>
    from apport.report import Report
  File "/usr/lib/python2.7/dist-packages/apport/report.py", line 16, in <module>
    from xml.parsers.expat import ExpatError
  File "/usr/lib/python2.7/xml/parsers/expat.py", line 4, in <module>
    from pyexpat import *
ImportError: /usr/lib/python2.7/lib-dynload/pyexpat.x86_64-linux-gnu.so: undefined symbol: XML_SetHashSalt

Original exception was:
Traceback (most recent call last):
  File "run_cochlear_model.py", line 5, in <module>
    import cochlear_model
  File "/media/sf_AMT/amtoolbox/code/bin/verhulst2012/cochlear_model.py", line 20, in <module>
    libtrisolv=np.ctypeslib.load_library("tridiag.so",os.path.dirname(os.path.abspath(__file__)))
  File "/usr/lib/python2.7/dist-packages/numpy/ctypeslib.py", line 131, in load_library
    raise exc
OSError: /media/sf_AMT/amtoolbox/code/bin/verhulst2012/tridiag.so: invalid ELF header
exp_verhulst2012_2_1.png

References:

S. Verhulst, T. Dau, and C. A. Shera. Nonlinear time-domain cochlear model for transient stimulation and human otoacoustic emission. J. Acoust. Soc. Am., 132(6):3842 - 3848, 2012.