Changeset 571
- Timestamp:
- 05/06/09 14:20:07 (4 years ago)
- Location:
- trunk
- Files:
-
- 5 modified
-
src/brian/__init__.py (modified) (1 diff)
-
src/common.py (modified) (1 diff)
-
src/nest2/__init__.py (modified) (1 diff)
-
src/neuron2/__init__.py (modified) (1 diff)
-
test/unittests/generictests.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/brian/__init__.py
r569 r571 125 125 Private method called by record() and record_v(). 126 126 """ 127 if record_what not in self.celltype.recordable: 128 raise common.RecordingError(record_what, self.celltype) 127 129 fixed_list=False 128 130 if isinstance(record_from, list): #record from the fixed list specified by user -
trunk/src/common.py
r569 r571 52 52 class NothingToWriteError(Exception): pass 53 53 class InvalidWeightError(Exception): pass 54 55 class RecordingError(Exception): 56 57 def __init__(self, variable, cell_type): 58 self.variable = variable 59 self.cell_type = cell_type 60 61 def __str__(self): 62 return "Cannot record %s from cell type %s" % (self.variable, self.cell_type.__class__.__name__) 54 63 55 64 # ============================================================================== -
trunk/src/nest2/__init__.py
r567 r571 280 280 def _record(self, variable, record_from=None, rng=None,to_file=True): 281 281 if variable not in self.celltype.recordable: 282 raise Exception("Cannot record %s from cell type %s" % (variable, self.celltype.__class__.__name__))282 raise common.RecordingError(variable, self.celltype) 283 283 # create list of neurons 284 284 fixed_list = False -
trunk/src/neuron2/__init__.py
r567 r571 167 167 Private method called by record() and record_v(). 168 168 """ 169 if record_what not in self.celltype.recordable: 170 raise common.RecordingError(record_what, self.celltype) 169 171 fixed_list=False 170 172 if isinstance(record_from, list): #record from the fixed list specified by user -
trunk/test/unittests/generictests.py
r569 r571 610 610 self.assert_( max(spikes) == 100.0, str(spikes) ) 611 611 612 612 def testRecordVmFromSpikeSource(self): 613 self.assertRaises(common.RecordingError, self.pop1.record_v) 614 615 613 616 #=============================================================================== 614 617 class SynapticPlasticityTest(unittest.TestCase):
