Search found 25 matches

by alexandrapierri
Tue May 11, 2021 9:43 am
Forum: NEURON + Python
Topic: silencing netstim during simulation.
Replies: 2
Views: 205

Re: silencing netstim during simulation.

thanks for this most didactic response. My apologies for what may seem like excessive pedantry, but in writing these entries I realize that they will also be read by others who may not have the same background or local resources as the person who asked the question in the first place. I recently bo...
by alexandrapierri
Mon May 10, 2021 9:51 pm
Forum: NEURON + Python
Topic: silencing netstim during simulation.
Replies: 2
Views: 205

silencing netstim during simulation.

Hello Following other posts on the forum, I want to silence my netstim at a certain time (400ms) during my simulation. To do this I set netcon.active(0), or I've also tried to do netcon.weight=0 according to https://www.neuron.yale.edu/phpBB/viewtopic.php?p=17875#p17875 . I have a very novice syntax...
by alexandrapierri
Thu Feb 25, 2021 7:31 pm
Forum: NEURON + Python
Topic: hoc file is not a template
Replies: 6
Views: 357

Re: hoc file is not a template

thank you! I was originally under the impression that the hoc file relies on fewer mod files and not most of the box. I am getting a better sense of the model now. Regarding the same repository I downloaded the 39948 entry and tried to run the "izhi2004a.hoc" according to the README instru...
by alexandrapierri
Thu Feb 25, 2021 11:45 am
Forum: NEURON + Python
Topic: hoc file is not a template
Replies: 6
Views: 357

hoc file is not a template

Hello NEURON team I want to instantiate the izhekevic neuron Izhi2003a.hoc attached, but I get the error: "Izhi2003a is not a template" I did some basic troubleshooting and I added "load_file("import3d.hoc") and load_file("nrngui.hoc")" at the beginning of the...
by alexandrapierri
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: 1510

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
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: 4
Views: 1510

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: 1273

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: 1317

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: 1798

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: 1798

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...
by alexandrapierri
Mon Jun 03, 2019 9:23 pm
Forum: NEURON + Python
Topic: 'hoc.HocObject' object has no attribute 'instantiate'
Replies: 3
Views: 2437

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: 2437

'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...