Using a hoc cell template with Python
Posted: Wed Aug 14, 2024 12:59 pm
I am trying to run a basic simulation using the cell defined in pyr.hoc from https://modeldb.science/267686?tab=2. I would like to load the hoc file, then use Python to run the simulation. So far, I have the following code:
The cell is made without error, but when I try to insert an IClamp in the soma, I get the error "Object is not callable." Somehow it does not like the fact that I'm trying to insert the IClamp in the middle of the soma.
When I print(cell.soma),
the output is CA1_PC_cAC_sig[0].soma[?]
So my questions are:
1) Why can't I reference cell.soma(0.5) ?
2) What does the question mark in CA1_PC_cAC_sig[0].soma[?] mean?
I'm sure I'm missing some very basic insight, and I apologize for how basic my knowledge in this space is. I've only ever used NEURON with Python, and even after reading the documentation (https://www.neuron.yale.edu/neuron/stat ... essing-hoc), I still can't answer these basic questions for myself. Thank you.
Code: Select all
from neuron import h
h.load_file('pyr.hoc')
cell = h.CA1_PC_cAC_sig()
Iext = h.IClamp(cell.soma(0.5))
When I print(cell.soma),
the output is CA1_PC_cAC_sig[0].soma[?]
So my questions are:
1) Why can't I reference cell.soma(0.5) ?
2) What does the question mark in CA1_PC_cAC_sig[0].soma[?] mean?
I'm sure I'm missing some very basic insight, and I apologize for how basic my knowledge in this space is. I've only ever used NEURON with Python, and even after reading the documentation (https://www.neuron.yale.edu/neuron/stat ... essing-hoc), I still can't answer these basic questions for myself. Thank you.