def record(self, cell, location_func=None, what=None, user_tags=None, user_tag_functors=None, **kwargs): # Indexable by index of cell reference if isinstance(cell, int): cell = self[cell] assert cell in self._nrns what = what or Cell.Recordables.MembraneVoltage user_tags = user_tags or [] user_tag_functors = user_tag_functors \ or StdTagFunctors.get_record_functors_neuron() location_func = location_func or (lambda cell: cell.soma) cell_location = location_func(cell) kw_utf = { 'cell_location': cell_location, 'neuron_population': self, 'neuron': cell } functor_tags = list( itertools.chain(*[utf(**kw_utf) for utf in user_tag_functors])) r = self.sim.record(cell, cell_location=location_func(cell), what=what, user_tags=user_tags + functor_tags, **kwargs) return r
def record( self, cell, location_func=None, what=None, user_tags=None, user_tag_functors=None, **kwargs ): # Indexable by index of cell reference if isinstance(cell, int): cell = self[cell] assert cell in self._nrns what = what or Cell.Recordables.MembraneVoltage user_tags = user_tags or [] user_tag_functors = user_tag_functors \ or StdTagFunctors.get_record_functors_neuron() location_func = location_func or (lambda cell: cell.soma) cell_location = location_func(cell) kw_utf = {'cell_location': cell_location, 'neuron_population': self, 'neuron': cell} functor_tags = list(itertools.chain(*[utf(**kw_utf) for utf in user_tag_functors])) r = self.sim.record(cell, cell_location=location_func(cell), what=what, user_tags=user_tags + functor_tags, **kwargs) return r