Morphology and AP generation

hines
Site Admin
Posts: 1682
Joined: Wed May 18, 2005 3:32 pm

Re: Morphology and AP generation

Post by hines »

I've run the latest version of NEURON with Anaconda3 with a Jupyter notebook and believe your issue is due to fmc3_1 requiring that
stdrun.hoc already be loaded when celldef() is executed. If stdrun.hoc is not already loaded, then celldef() will raise an error at the beginning of
geom_nseg() becasu lambda_f is not declared and all segment counts for each section will stay at their devault value of sec.nseg=1.
ted
Site Admin
Posts: 6287
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Morphology and AP generation

Post by ted »

Ah, yes--I generally import both h and gui
from neuron import h, gui
Importing gui causes stdrun.hoc to be loaded, so lambda_f is declared and geom_nseg() succeeds. But it also loads several other files and brings up the NEURON Main Menu toolbar. If you don't want that to happen, but you do want your model's geom_nseg() procedure to succeed, either do this
from neuron import h
h.load_file("noload.hoc")
which loads NEURON's standard run system AND its gui library but doesn't launch the NEURON Main Menu toolbar, or this
from neuron import h
h.load_file("stdrun.hoc")
sohaib786
Posts: 20
Joined: Thu Feb 14, 2019 4:31 am

Re: Morphology and AP generation

Post by sohaib786 »

Do you see a problem with iteration over segments when you just use Python from NEURON, without Jupyter?
Had not tried before. However, upon checking, it works fine with just python.

In both cases, i.e Loading with or without GUI doesn't affect it and works fine. Jupyter seems to create some trouble.
believe your issue is due to fmc3_1 requiring that
stdrun.hoc already be loaded when celldef() is executed
Thanks. I also figured out a menial way to load all segments in jupyter.
-Load the file. ( If there's a problem)
-Load a file which doesn't exist. (Repeat step if needed)
-Load the correct file again, it works!
(Some type of interruption in the process makes it work correctly)


Thanks for your time and help!
:)
Post Reply