Changeset 373

Show
Ignore:
Timestamp:
06/18/08 14:57:35 (5 months ago)
Author:
apdavison
Message:

Fixed a couple of bugs introduced in recent commits.

Note, in nest2, recording devices only have an interval parameter for analog recorders, not for spike recorders. This is of course entirely sensible, once one switches on ones brain.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/nest2/__init__.py

    r372 r373  
    118118        self._device = nest.Create(device_name) 
    119119        device_parameters = {"withgid": True, "withtime": True, 
    120                              "to_file": True, "to_memory": False, 
    121                              "interval": get_time_step()} 
     120                             "to_file": True, "to_memory": False} 
     121        if self.variable != 'spikes': 
     122            device_parameters["interval"] = get_time_step() 
    122123        if file is False: 
    123124            device_parameters.update(to_file=False, to_memory=True) 
  • trunk/src/recording.py

    r372 r373  
    101101        elif data.shape[1] == 2: # spike files 
    102102            for idx in xrange(len(data)): 
    103                 result.write("%g\t%d\n" % (data[idx][t_column], data[idx][id_column])) # time id 
     103                result.write("%g\t%d\n" % (data[idx][time_column], data[idx][id_column])) # time id 
    104104        else: 
    105105            raise Exception("Data file should have 2,3 or 4 columns, actually has %d" % data.shape[1])