examples.figures¶
Plot selected figures from paper, Manis and Campagnola, Hearing Research, 2018. To obtain the original results, this should be run after checking out the “hearing-research-2018” tag available in the repository on github.
From the main cnmodel directory:
$ ./examples figures.sh fignum
where fignum is one of 2a, 2b, 2c, 3, 4, 5, 6a, 6b, or 7.
Note that Figure 7 may take several hours to generate.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | from __future__ import print_function
"""
"""
import sys
import subprocess
if len(sys.argv) < 2: # if no argument, print helpful message
print("Plot selected figures from paper, Manis and Campagnola, Hearing Research. 2018")
print("Usage: figures.py [2a | 2b | 2c | 3 | 4 | 5 | 6a | 6d | 7]")
exit(1)
arg = sys.argv[1] # get argument, check that it is valid
if arg not in ['2a', '2b', '2c', '3', '4', '5', '6a', '6d', '7']:
print("Usage: figures.py [2a | 2b | 2c | 3 | 4 | 5 | 6a | 6d | 7]")
exit(1)
if arg == '2a':
proc = subprocess.Popen(['python', 'examples/test_mechanisms.py', 'klt'],
stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
proc.wait()
print (proc.stdout.read())
# ;;
# 2b)
# python examples/test_mechanisms.py kht
# ;;
# 2c)
# python examples/test_mechanisms.py ka
# ;;
# 3)
# python examples/toy_model.py
# ;;
# 4)
# python examples/test_synapses.py sgc bushy
# ;;
# 5)
# python examples/test_decorator.py
# ;;
# 6a)
# python examples/test_bushy_variation.py a
# ;;
# 6d)
# python examples/test_bushy_variation.py d
# ;;
#
# 7)
# while true; do
# echo "This figure may take hours to generate!"
# read -p "Are you sure you want to run the script?" yn
# case $yn in
# [Yy]* ) python examples/test_physiology.py; break;;
# [Nn]* ) exit;;
# * ) echo "Please answer yes or no.";;
# esac
# done
# ;;
#
|