I am curious how to create a hoc_func_table in Python. I am getting this error which I believe is due to me not creating the hoc_func_table properly. This error happens when I try to run my model:
NEURON: table not specified in hoc_func_table
near line 0
^
fadvance()
advance()
step()
continuerun(5)
and others
Traceback (most recent call last):
File "/home/neurosci3/Desktop/Cocaine_Model/src/main.py", line 158, in <module>
h.run(t_stop)
RuntimeError: hoc error
The way a table was created in HOC was like this:
objref taum_
objref tauh_
objref vtau_
objref file_
file_ = new File ()
taum_ = new Vector(16,0)
tauh_ = new Vector(16,0)
vtau_ = new Vector(16,0)
sprint(dirstr, "taum_naf.txt")
file_.ropen (dirstr)
taum_.scanf(file_)
file_.close()
sprint(dirstr, "tauh_naf.txt")
file_.ropen (dirstr)
tauh_.scanf(file_)
file_.close()
sprint(dirstr, "vtau_naf.txt")
file_.ropen (dirstr)
vtau_.scanf(file_)
file_.close()
table_taumnaf_naf(taum_,vtau_)
table_tauhnaf_naf(tauh_,vtau_)
So I am wondering how to do these last two lines in python to link the tables and the mod files.
**table_taumnaf_naf()**
Any help is very appreciated.
bwjmbb17
How to create hoc_func_table in NEURON + Python
Moderator: hines
Re: How to create hoc_func_table in NEURON + Python
I expect the python statements
will suffice. if not, please send me the mod file and your python file that tries to construct the table.
Code: Select all
from neuron import h
h.table_taumnaf_naf(taum_,vtau_)
h.table_tauhnaf_naf(tauh_,vtau_)