Can't we write tautable.hoc in Python?

When Python is the interpreter, what is a good
design for the interface to the basic NEURON
concepts.

Moderator: hines

Post Reply
mi2n
Posts: 6
Joined: Wed Apr 12, 2023 6:36 am

Can't we write tautable.hoc in Python?

Post by mi2n »

I wonder if we still need to write tautables in hoc, then include in the python script? For example, for the following hoc script:

Code: Select all

// Tautable for KIR channel
objref vecv_KIR, vecmtau_KIR
vecv_KIR = new Vector()
vecv_KIR.indgen(-100, 0, 10) // -100 to 0 with steps of 10

vecmtau_KIR = new Vector()
vecmtau_KIR.append(14.93, 16.00, 18.87, 21.51, 24.24, 27.59, 30.77, 28.57, 23.53, 17.78, 16.00)

table_tabmtau_KIR(&vecmtau_KIR.x[0], vecv_KIR.size, &vecv_KIR.x[0])
Do we have an equivalent python script using Python's NEURON module, which works with the KIR.mod file and allow FUNCTION_TABLE creation?

Code: Select all

: in KIR.mod file
FUNCTION_TABLE tabmtau(v(mV)) (ms)
Sorry if this has been discussed before, I couldn't find anything with a quick search.
ted
Site Admin
Posts: 6305
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Can't we write tautable.hoc in Python?

Post by ted »

Sure, if you want to rewrite those statements in Python, go ahead. Here's a seed to get you started. I have even corrected the comment in the second statement.

Code: Select all

vecv_KIR = h.Vector()
vecv_KIR.indgen(-100, 0, 10) # -100 to 0 with steps of 10
Post Reply