Search found 21 matches
- Thu Oct 24, 2019 12:37 pm
- Forum: NEURON + Python
- Topic: accessing the same instantiation of a cell template from another python script
- Replies: 4
- Views: 1404
Re: accessing the same instantiation of a cell template from another python script
thank you, I believe I got it!
- Tue Oct 22, 2019 11:07 am
- Forum: NEURON + Python
- Topic: accessing the same instantiation of a cell template from another python script
- Replies: 4
- Views: 1404
Re: accessing the same instantiation of a cell template from another python script
thank you Ted. I will work on your instructions.
If you could also point me to an example that would be really helpful.
thanks again,
Alexandra
If you could also point me to an example that would be really helpful.
thanks again,
Alexandra
- Wed Oct 16, 2019 5:38 pm
- Forum: NEURON + Python
- Topic: accessing the same instantiation of a cell template from another python script
- Replies: 4
- Views: 1404
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...
- Wed Oct 02, 2019 5:53 pm
- Forum: NEURON + Python
- Topic: running hoc files accompanied by comand line arguments, in Python
- Replies: 2
- Views: 1177
- Wed Sep 25, 2019 3:44 pm
- Forum: NEURON + Python
- Topic: running hoc files accompanied by comand line arguments, in Python
- Replies: 2
- Views: 1177
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...
- Tue Sep 24, 2019 11:20 am
- Forum: NEURON + Python
- Topic: error in saving a voltage trace into a figure
- Replies: 2
- Views: 1172
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...
- Thu Sep 05, 2019 5:26 pm
- Forum: NEURON + Python
- Topic: TypeError: sec is not a Section"
- Replies: 3
- Views: 1660
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)
- Tue Sep 03, 2019 7:43 pm
- Forum: NEURON + Python
- Topic: TypeError: sec is not a Section"
- Replies: 3
- Views: 1660
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 accessi...
- Mon Jun 03, 2019 9:23 pm
- Forum: NEURON + Python
- Topic: 'hoc.HocObject' object has no attribute 'instantiate'
- Replies: 3
- Views: 2337
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...
- Fri May 31, 2019 4:56 pm
- Forum: NEURON + Python
- Topic: 'hoc.HocObject' object has no attribute 'instantiate'
- Replies: 3
- Views: 2337
'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, Al...
- Thu Jan 10, 2019 5:06 pm
- Forum: NEURON + Python
- Topic: How can python read from a hoc file templates and procs?
- Replies: 7
- Views: 4151
Re: How can python read from a hoc file templates and procs?
Ok, understood now thank you.
- 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: 4151
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? "prin...
- 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: 4151
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...
- 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: 4151
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 ...
- Wed Dec 19, 2018 8:34 pm
- Forum: SimTracker
- Topic: fscan confused with comment lines
- Replies: 1
- Views: 4851
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?
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?