Changeset 426
- Timestamp:
- 07/22/08 16:28:09 (1 month ago)
- Files:
-
- trunk/src/nest2/__init__.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/nest2/__init__.py
r425 r426 133 133 134 134 device_name = nest.GetStatus(self._device, "model")[0] 135 original_synapse_context = nest.GetSynapseContext() 136 if original_synapse_context != 'static_synapse': 137 nest.SetSynapseContext('static_synapse') 135 138 if device_name == "spike_detector": 136 139 nest.ConvergentConnect(new_ids, self._device) … … 139 142 else: 140 143 raise Exception("%s is not a valid recording device" % device_name) 144 if original_synapse_context != 'static_synapse': 145 nest.SetSynapseContext(original_synapse_context) 141 146 142 147 def get(self, gather=False): … … 590 595 self.cell = numpy.reshape(self.cell, self.dim) 591 596 if self.cellparams: 592 nest.SetStatus(self.cell_local, [self.cellparams]) 597 try: 598 nest.SetStatus(self.cell_local, [self.cellparams]) 599 except nest.hl_api.NESTError: 600 print "NEST error when trying to set the following dictionary: %s" % self.cellparams 601 raise 593 602 self._local_ids = self.cell_local 594 603
