Search found 19 matches

by alexandrapierri
Wed Oct 16, 2019 5:38 pm
Forum: NEURON + Python
Topic: accessing the same instantiation of a cell template from another python script
Replies: 1
Views: 28

accessing the same instantiation of a cell template from another python script

Hello developers I have the following novice problem. I want to call a given cell template from a hoc script and then access the exact same instantiation of that cell from a different python script. I fall upon a couple of syntax errors as I try to do that and was hoping for some guidance. my hoc ce...
by alexandrapierri
Wed Sep 25, 2019 3:44 pm
Forum: NEURON + Python
Topic: running hoc files accompanied by comand line arguments, in Python
Replies: 2
Views: 158

running hoc files accompanied by comand line arguments, in Python

Hello Developers I am having some difficulty finding an answer to the following question in the NEURON-Python documentation so far and was hoping for some guidance or pointing to the right direction. My question is: How can I load (and thus execute) a hoc file from a python script that is accompanie...
by alexandrapierri
Tue Sep 24, 2019 11:20 am
Forum: NEURON + Python
Topic: error in saving a voltage trace into a figure
Replies: 2
Views: 159

error in saving a voltage trace into a figure

Hello developers I am trying to do the simple task, save a figure using one of the python templates found on the NEURON Documentation: initonerun.py. The script plots the Graph just fine using one of my own cell templates (example.hoc), but it doesn't save it correctly. The problem is in the last si...
by alexandrapierri
Thu Sep 05, 2019 5:26 pm
Forum: NEURON + Python
Topic: TypeError: sec is not a Section"
Replies: 3
Views: 332

Re: TypeError: sec is not a Section"

thanks a lot, this worked.

Code: Select all

from neuron import h

h.load_file('example.hoc')
cell=h.example() #create an instance of this class
soma_py=cell.soma[0]
print(soma_py)
stim = h.IClamp(0.5, sec=soma_py)
by alexandrapierri
Tue Sep 03, 2019 7:43 pm
Forum: NEURON + Python
Topic: TypeError: sec is not a Section"
Replies: 3
Views: 332

TypeError: sec is not a Section"

Hello developers In the example below I want to stimulate and record from the soma of the cell template example.hoc using the try.py python script. If I run try.py I get the error: "stim = h.IClamp(0.5, sec=soma_py) TypeError: sec is not a Section" It doesn't seem that my script is accessing the som...
by alexandrapierri
Mon Jun 03, 2019 9:23 pm
Forum: NEURON + Python
Topic: 'hoc.HocObject' object has no attribute 'instantiate'
Replies: 3
Views: 644

Re: 'hoc.HocObject' object has no attribute 'instantiate'

Thank you Ted I have done some further digging into the problem and I realize the the issue is with the instantiation of my cell model in python. I changed the title to reflect the issue more accurately. So I want to instantiate my cell model whose morphology is given in a cell template. I get the e...
by alexandrapierri
Fri May 31, 2019 4:56 pm
Forum: NEURON + Python
Topic: 'hoc.HocObject' object has no attribute 'instantiate'
Replies: 3
Views: 644

'hoc.HocObject' object has no attribute 'instantiate'

Hello

What is the general meaning behind the error: "a template cannot be redefined"?
In my case I am trying to stimulate a neuron written in a hoc template using a python script.
Is it because stimulating my cell modifies the template and modifying a template is not allowed?

thank you,
Alexandra
by alexandrapierri
Thu Jan 10, 2019 3:27 pm
Forum: NEURON + Python
Topic: How can python read from a hoc file templates and procs?
Replies: 7
Views: 2008

Re: How can python read from a hoc file templates and procs?

Thank you Ted. I now understand that "newpyr = h.Pyr()" creates a new instance of "Pyr" and this explains the zero values I was getting in the first example I posted. However if we go back to my first example listed again below, how can I have python print h.NumApical? "print h.axoaxoniccell_temp.Nu...
by alexandrapierri
Fri Jan 04, 2019 3:02 pm
Forum: NEURON + Python
Topic: How can python read from a hoc file templates and procs?
Replies: 7
Views: 2008

Re: How can python read from a hoc file templates and procs?

Thank you Ted. As a matter of fact, the code I posted is a toy code I use to experiment/understand how Python reads variables, parameters and their values from NEURON. From your response I realize that the idea is that Python reads the type of variables and parameters defined in hoc but expects that...
by alexandrapierri
Fri Dec 21, 2018 6:01 pm
Forum: NEURON + Python
Topic: How can python read from a hoc file templates and procs?
Replies: 7
Views: 2008

How can python read from a hoc file templates and procs?

Hello developers I want my python script to read from a NEURON hoc script and and I am facing difficulties having python read variables if they are defined within a template or a proc and not on top level. How can python read parameters right (and in general any variable in hoc) if defined within a ...
by alexandrapierri
Wed Dec 19, 2018 8:34 pm
Forum: SimTracker
Topic: fscan confused with comment lines
Replies: 1
Views: 3003

fscan confused with comment lines

Hello

Is it true that fscan is confused with comment lines and is there a way to add comments in a text file that needs to be read by fscan?
by alexandrapierri
Sat Jun 23, 2018 8:54 pm
Forum: UNIX/Linux
Topic: libreadline.so.0: cannot open shared object file: No such file or directory
Replies: 1
Views: 1598

libreadline.so.0: cannot open shared object file: No such file or directory

hello after installation of NEURON 7.5 in linux, trying to execute a previous hoc script by running nrniv produces the following errors: NEURON: Couldn't find: stdlib.hoc NEURON: Couldn't find: import3d.hoc libreadline.so.0: cannot open shared object file: No such file or directory I searched for th...
by alexandrapierri
Mon Jan 01, 2018 11:41 pm
Forum: MSWin
Topic: neuron 7.5 crashes on cygwin 2.9.0
Replies: 6
Views: 4818

Re: neuron 7.5 crashes on cygwin 2.9.0

I will keep that in mind about finding a workaround with Python ( I do have Python installed) but will switch to linux for now.

thanks a lot for all help Ted!