Choosing vectors to plot

2 views
Skip to first unread message

Uri Cohen

unread,
Dec 24, 2011, 4:47:56 PM12/24/11
to neuronvisio
When I load a model from ModelDB and then just press "Init and Run" in
the main window, I get the following error:

INFO neuronvisio.controls 344 No vector Created. Create at least one
vector to run the simulation
Traceback (most recent call last):
File "neuronvisio\controls.py", line 370, in run
self.animation()
File "neuronvisio\controls.py", line 501, in animation
len (self.manager.groups['t']))
KeyError: 't'

Now, if I add 'v' as "Variable to record" and press "Create vector"
before "Init and Run", all is well.
- Is this a bug? Why can't a simulation run without any recorded
variable?
- How can the user tell which variables are available, other than 'v'?

Thanks!

Michele Mattioni

unread,
Dec 27, 2011, 5:41:52 AM12/27/11
to neuro...@googlegroups.com
Hello!

The check is done after the init:
https://github.com/mattions/neuronvisio/blob/master/src/neuronvisio/controls.py#L245

I thought this was a good idea, to check if there were some vectors
instantiated before running any simulation, to avoid running a
simulation and not having even one vector recorded.

Of course, if you have created the vectors via hoc, or via python, not
using the neuronvisio data structure that check is not a good one.
We could delete the check and leave it to the user to remember to
create the vectors!

Cheers,
Michele.

Michele Mattioni

unread,
Dec 27, 2011, 6:07:56 AM12/27/11
to neuro...@googlegroups.com
I just realized I didn't reply to the last question:

>> - How can the user tell which variables are available, other than 'v'?

This is a tricky one. this is more a NEURON question than a
Neuronvisio question.
Usually a variable can be recorded if it has been added to the section
(usually if it is written by a mod file!)
I think the best way is to head off to NEURON forum and check over there.

I didn't find a nice method to check what is available. If you manage
to find one, please let me know :)

Cheers,
Michele.

Uri Cohen

unread,
Dec 27, 2011, 4:35:01 PM12/27/11
to neuro...@googlegroups.com
I understand now the current behavior is the right one if you load HDF file, so maybe we should create a variable 'v' for the user whenever a new model is loaded from ModelDB. This way simulation will usually just work as the user expects.

Also I've post a question in NEURON forums about listing available variables, let's see what I'll get there.
Thanks,
      Uri
--

            Uri Cohen
Reply all
Reply to author
Forward
0 new messages