Changeset 711 for trunk/src/nest/simulator.py
- Timestamp:
- 02/16/10 10:59:22 (2 years ago)
- Files:
-
- 1 modified
-
trunk/src/nest/simulator.py (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/nest/simulator.py
r708 r711 27 27 28 28 import nest 29 from pyNN import common, random 29 from pyNN import common, random, errors 30 30 import logging 31 31 import numpy … … 120 120 exc_type, exc_value, traceback = sys.exc_info() 121 121 if exc_type == 'NESTError' and "Unsupported Numpy array type" in exc_value: 122 raise common.InvalidParameterValueError()122 raise errors.InvalidParameterValueError() 123 123 else: 124 124 raise … … 159 159 cell_gids = nest.Create(nest_model, n) 160 160 except nest.NESTError, errmsg: 161 raise common.InvalidModelError(errmsg)161 raise errors.InvalidModelError(errmsg) 162 162 if cell_parameters: 163 163 try: … … 317 317 assert len(targets) > 0 318 318 if self.synapse_type not in ('excitatory', 'inhibitory', None): 319 raise common.ConnectionError("synapse_type must be 'excitatory', 'inhibitory', or None (equivalent to 'excitatory')")319 raise errors.ConnectionError("synapse_type must be 'excitatory', 'inhibitory', or None (equivalent to 'excitatory')") 320 320 weights = weights*1000.0 # weights should be in nA or uS, but iaf_neuron uses pA and iaf_cond_neuron uses nS. 321 321 # Using convention in this way is not ideal. We should … … 335 335 nest.DivergentConnect([source], targets, weights, delays, self.synapse_model) 336 336 except nest.NESTError, e: 337 raise common.ConnectionError("%s. source=%s, targets=%s, weights=%s, delays=%s, synapse model='%s'" % (337 raise errors.ConnectionError("%s. source=%s, targets=%s, weights=%s, delays=%s, synapse model='%s'" % ( 338 338 e, source, targets, weights, delays, self.synapse_model)) 339 339 self._connections = None # reset the caching of the connection list, since this will have to be recalculated … … 358 358 assert len(sources) > 0, sources 359 359 if self.synapse_type not in ('excitatory', 'inhibitory', None): 360 raise common.ConnectionError("synapse_type must be 'excitatory', 'inhibitory', or None (equivalent to 'excitatory')")360 raise errors.ConnectionError("synapse_type must be 'excitatory', 'inhibitory', or None (equivalent to 'excitatory')") 361 361 weights = weights*1000.0 # weights should be in nA or uS, but iaf_neuron uses pA and iaf_cond_neuron uses nS. 362 362 # Using convention in this way is not ideal. We should … … 376 376 nest.ConvergentConnect(sources, [target], weights, delays, self.synapse_model) 377 377 except nest.NESTError, e: 378 raise common.ConnectionError("%s. sources=%s, target=%s, weights=%s, delays=%s, synapse model='%s'" % (378 raise errors.ConnectionError("%s. sources=%s, target=%s, weights=%s, delays=%s, synapse model='%s'" % ( 379 379 e, sources, target, weights, delays, self.synapse_model)) 380 380 self._connections = None # reset the caching of the connection list, since this will have to be recalculated
