accessing the same instantiation of a cell template from another python script
Posted: Wed Oct 16, 2019 5:38 pm
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 cell file is the: "class_bistratifiedcell.hoc" which contains the template: bistratifiedcell
It is loaded successfully from another hoc script in the following manner:
To call the same cell template from python I could simply do:
However this would create a different instantiation of the same cell.
I need to access the exact same instantiation of that cell from python, and for that reason I do the following:
The above syntax is wrong. I have tried different combinations of the above syntax but nothing has worked yet.
I believe this is a knowledge gap on my part. Any advice on what is the correct way to access the same instantiation of bistratifiedcell from python would be much appreciated.
thank you in advance for your help!
Alexandra
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 cell file is the: "class_bistratifiedcell.hoc" which contains the template: bistratifiedcell
It is loaded successfully from another hoc script in the following manner:
Code: Select all
default_var("celltype2use", "bistratifiedcell")
sprint(tempFileStr,"./cells/class_%s.hoc",celltype2use) load_file(tempFileStr)
Code: Select all
h.load_file('class_bistratifiedcell.hoc')
my_cell= h.bistratifiedcell()
soma_loc=my_cell.soma[0]
soma_center=soma_loc(0.5)
I need to access the exact same instantiation of that cell from python, and for that reason I do the following:
Code: Select all
my_cell=h.celltype2use
print my_cell #successfully prints: "bistratifiedcell"
soma_loc=my_cell.soma[0] #error: 'str' object has no attribute soma
I believe this is a knowledge gap on my part. Any advice on what is the correct way to access the same instantiation of bistratifiedcell from python would be much appreciated.
thank you in advance for your help!
Alexandra