Search found 65 matches

by mattions
Tue Apr 13, 2010 5:30 pm
Forum: NEURON + Python
Topic: NeuroML exporter does not honor the section name
Replies: 14
Views: 6093

Re: NeuroML exporter does not honor the section name

Sorry. I misunderstood the context. The implmentation for reading is incomplete as I see in nrn/share/lib/hoc/celbild/celtopol.hoc that the name is ignored and substituted with "d" in sscanf(cab.name_, "%s[%d]", s.s, &nx) //printf("i=%d id=%d %s[%d]\n", i, cab.id_,...
by mattions
Tue Apr 13, 2010 4:14 pm
Forum: NEURON + Python
Topic: NeuroML exporter does not honor the section name
Replies: 14
Views: 6093

Re: NeuroML exporter does not honor the section name

Are you going to apply this modification (and the one before) to the source of NEURON?

I'm saving only the anatomy and working on the single cell right now so NeuroML should be enough for the time being.
by mattions
Mon Apr 12, 2010 10:18 am
Forum: NEURON + Python
Topic: NeuroML exporter does not honor the section name
Replies: 14
Views: 6093

Re: NeuroML exporter does not honor the section name

I just want to make clear what I'm looking for: my goal is to save all the info about the geometry in the NeuroML format and write them on a file. Then I want to reload the geometry info in memory, using the NeuroML file as the source of my model. The model back in memory and loaded in NEURON should...
by mattions
Mon Apr 12, 2010 7:54 am
Forum: NEURON + Python
Topic: NeuroML exporter does not honor the section name
Replies: 14
Views: 6093

Re: NeuroML exporter does not honor the section name

There are any plans to support multiple cells?
For now I have only one cell in my model, so that would be good enough for the time being.

How can I accomplish that?
by mattions
Sat Apr 10, 2010 5:44 am
Forum: NEURON + Python
Topic: NeuroML exporter does not honor the section name
Replies: 14
Views: 6093

Re: NeuroML exporter does not honor the section name

It is also possible to put the name of the cell in front of it? This is my system: In [3]: h.topology() |-| MSP_Cell[0].soma(0-1) `| MSP_Cell[0].dend1(0-1) `| MSP_Cell[0].dend1_1[0](0-1) `----------| MSP_Cell[0].dend1_1[1](0-1) `----------| MSP_Cell[0].dend1_1[2](0-1) `| MSP_Cell[0].dend1_2[0](0-1) ...
by mattions
Fri Apr 09, 2010 2:27 pm
Forum: NEURON + Python
Topic: Saving and loading NeuroML file
Replies: 13
Views: 6716

Re: Saving and loading NeuroML file

My fault.

Used with classic GNU program I though ./configure would use /usr/local by default not /usr/local/nrn.
I need to update my PYTHONPATH with this location, then should be ok.
by mattions
Fri Apr 09, 2010 1:42 pm
Forum: NEURON + Python
Topic: NeuroML exporter does not honor the section name
Replies: 14
Views: 6093

Re: NeuroML exporter does not honor the section name

Consider this code: from neuron import h import neuron.gui # To not freeze the GUI h.load_file('mview.hoc') # Bunch of sections, just for testing purpose. sec1 = h.Section() sec2 = h.Section() sec2.diam=1000 sec1.connect(sec2) print sec1.name(), sec2.name() h.define_shape() modelView = h.ModelView(0...
by mattions
Fri Apr 09, 2010 1:33 pm
Forum: NEURON + Python
Topic: Saving and loading NeuroML file
Replies: 13
Views: 6716

Re: Saving and loading NeuroML file

I think that maybe there is a nrn directory that should not be there.

I found the file here:

Code: Select all

/usr/local/nrn/share/nrn/lib/python/rdxml.py
instead should be here

Code: Select all

/usr/local/share/nrn/lib/python/rdxml.py
my prefix is the standard:

Code: Select all

/usr/local
by mattions
Fri Apr 09, 2010 7:51 am
Forum: NEURON + Python
Topic: NeuroML exporter does not honor the section name
Replies: 14
Views: 6093

NeuroML exporter does not honor the section name

I've tried to export a model in neuroML but I just noticed that the name of the sections change http://www.neuron.yale.edu/hg/neuron/nrn/file/cbc0331180f8/share/lib/hoc/mview/mviewxml.hoc#l301 I think would be better if the real name of the section will be exported, so it's possible to attach to it ...
by mattions
Thu Apr 08, 2010 5:12 am
Forum: NEURON + Python
Topic: Saving and loading NeuroML file
Replies: 13
Views: 6716

Re: Saving and loading NeuroML file

Dear all, I think I found the problem. The rdxml.py file is in the source http://www.neuron.yale.edu/hg/neuron/nrn/file/cbc0331180f8/share/lib/python/rdxml.py but it doesn't get installed in the proper location. Therefore is not in the PYTHONPATH so when CellBuilder try to read the xml, loading rdxm...
by mattions
Tue Apr 06, 2010 5:30 pm
Forum: NEURON + Python
Topic: Saving and loading NeuroML file
Replies: 13
Views: 6716

Re: Saving and loading NeuroML file

I guess I have a problem with the CellBuilder: this is the dir of the neuroml object: In [21]: dir(cb.manage.neuroml ) Out[21]: ['Section', '__call__', '__class__', '__delattr__', '__delitem__', '__doc__', '__format__', '__getattribute__', '__getitem__', '__hash__', '__init__', '__iter__', '__len__'...
by mattions
Tue Apr 06, 2010 10:08 am
Forum: NEURON + Python
Topic: Saving and loading NeuroML file
Replies: 13
Views: 6716

Re: Saving and loading NeuroML file

ted wrote:The problem occurs with Level 1 NeuroML. Level 2 NeuroML seems to import OK.
I'm getting the same error also using Level 2..
by mattions
Tue Apr 06, 2010 5:40 am
Forum: NEURON + Python
Topic: Saving and loading NeuroML file
Replies: 13
Views: 6716

Re: Saving and loading NeuroML file

Hi, thanks for the answers. I managed to export a NeuroML file using the python interpreter doing this: Saving from neuron import h import neuron.gui # To not freeze the GUI h.load_file('mview.hoc') # Bunch of sections, just for testing purpose. sec1 = h.Section() sec2 = h.Section() sec2.diam=1000 s...
by mattions
Thu Apr 01, 2010 10:09 am
Forum: NEURON + Python
Topic: Saving and loading NeuroML file
Replies: 13
Views: 6716

Saving and loading NeuroML file

Hello, I would like to know if there is a way to save and load NeuroML file using python and not the GUI. Is somewhere on the Programmer's Reference? Proposed API would be something like: h.save_to_NeuroML('filename.xml', level=1) # For saving. Level keyword to choose the NeuroML level h.load_NeuroM...
by mattions
Fri Mar 12, 2010 11:48 am
Forum: NEURON + Python
Topic: Retrieve _ref_ range variables?
Replies: 3
Views: 2674

Re: Retrieve _ref_ range variables?

Hi there, the logic I use in Neuronvisio http://mattions.github.com/neuronvisio/ is to check if the section has that variable as attribute: (Have a look to the following code: from neuron import h soma = h.Section() if hasattr(soma, 'v'): print "Variable v present" It worked pretty well so...