Page 1 of 1

Import3d tool via Jupyter

Posted: Thu Aug 12, 2021 11:37 am
by landoskape
Question re: import3d tool. I'm using neuron in a jupyter lab environment. When I run the code:

Code: Select all

from neuron import h, gui
It opens the neuron gui in XQuartz, but I can't find the import3d tool anywhere. Even if I run:

Code: Select all

h.load_file('import3d.hoc')
Nothing changes and I still can't find the Import3d tool.

The context -- I'm trying to load a Neurolucida .asc file and convert to hoc as you described here - viewtopic.php?f=8&t=4333&p=18715&hilit= ... da3#p18715

Re: Import3d tool via Jupyter

Posted: Thu Aug 12, 2021 12:08 pm
by ted
Easy workaround: launch Python, import h and gui, then use the NEURON Main Menu toolbar to access the Import3d tool to your heart's content. From the CellBuilder export either a hoc file that you can use to create a top-level instance of your cell model, or a hoc file that defines new cell class that you can use to create as many new cell objects as you like. Also, be sure to save the CellBuilder with your imported morphology to a session file in case you need to return to it in the future. Exit Python when you're ready to switch back to Jupyter.

Once back in Jupyter, use
h.load_file()
with a string argument (the name of your hoc file) to retrieve what you previously saved.

Comment: note that I split your post from the thread to which you originally added it. Why? It was a big departure from the topic of the original thread, and as such would be regarded as a violation of policy on any moderated forum.

Re: Import3d tool via Jupyter

Posted: Fri Aug 27, 2021 6:49 pm
by landoskape
Thank you Ted, sorry for the wrong location and thanks for your answer