I have a file called pyrcellfile.hoc, which contains a hoc template that defines a cell class called PYR.
I want to use a Python script to load and instantiate my hoc file.
My python script, myscript.py, looks like his:
from neuron import h
h.load_file("pyrcellfile.hoc")
newpyr = h.PYR()
When I run it, I get the error:
Code: Select all
[b]NEURON: init not enough arguments
near line 0
^
PYR[0].init()[/b]
This is my init() proc in the pyrcellfile.hoc file:
Code: Select all
proc init() {
gid = $1
randi = $2
// morphology
connect_sections()
size_sections()
define_shape()
append_sections()
set_nseg()
get_root()
mechinit()
insert_mechs()
set_chanparams()
pre_list = new List()
define_synapses($3)
}