PyNN: recording V_m from NEST native cell type

59 views
Skip to first unread message

Sacha van Albada

unread,
Jan 23, 2015, 9:32:02 AM1/23/15
to neurale...@googlegroups.com
Dear all,

Trying to use the NEST iaf_psc_exp_ps neuron model in order to have precise spike timing, I encountered the problem that I cannot seem to record the membrane potential. This occurs with both PyNN 0.7.5 and 0.7.6dev. Here is a code snippet reproducing the error:

import pyNN.nest as sim
from pyNN.nest import native_cell_type

sim.nest.SetKernelStatus({'dict_miss_is_error': False})
model = native_cell_type('iaf_psc_exp_ps')
nrn = sim.Population(1, model)
nrn._record('V_m')


---------------------------------------------------------------------------
RecordingError                            Traceback (most recent call last)
/users/albada/PyNN-0.7.5_install/lib/python2.7/site-packages/<ipython-input-6-0eaa87b830df> in <module>()
----> 1 nrn._record('V_m')

/users/albada/PyNN-0.7.5_install/lib/python2.7/site-packages/pyNN/common.pyc in _record(self, variable, to_file)
    684         else:
    685             if not self.can_record(variable):
--> 686                 raise errors.RecordingError(variable, self.celltype)
    687             logger.debug("%s.record('%s')", self.label, variable)
    688             if variable not in self.recorders:

RecordingError: Cannot record V_m from cell type iaf_psc_exp_ps


In NEST, one can record membrane potentials from this model just fine.

Is anyone familiar with this problem and/or know a solution? My idea for the moment is to use nest.sli_run to create a voltmeter via native NEST commands, but this is more complex than it should be.

I can create a ticket if you think it is useful.

Best regards,
Sacha


Andrew Davison

unread,
Apr 16, 2015, 7:11:55 AM4/16/15
to neurale...@googlegroups.com
Hi Sacha,

Sorry for the delay in replying.
`native_cell_type` tries to introspect the model using `nest.GetDefaults(model_name).get("recordables", [])`. Many NEST models have a "recordables" entry in the defaults dict, but `iaf_psc_exp_ps` does not.

As a workaround you can set the `recordable` attribute directly:
```
nrn = sim.Population(1, model)
nrn.celltype.recordable = ['V_m', 'spikes']
nrn._record('V_m')
```

All the best,

Andrew


 
Reply all
Reply to author
Forward
0 new messages