Changeset 978 for trunk

Show
Ignore:
Timestamp:
06/09/11 13:47:12 (12 months ago)
Author:
pierre
Message:

Optimization in Brian. If only a sub population is recorded, then we do not want to record the whole population and then sort after. This is very inefficient in memory for lon simulations. Should be better. The point is that now, long simulations in Brian are consumming a very large amount of memory, and there should be a problem somewhere...

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/brian/recording.py

    r957 r978  
    3131        clock = simulator.state.simclock 
    3232        if self.variable == 'spikes': 
    33             devices = [brian.SpikeMonitor(group, record=True)] 
     33            devices = [brian.SpikeMonitor(group, record=self.recorded)] 
    3434        elif self.variable == 'v': 
    3535            devices = [brian.StateMonitor(group, 'v', record=True, clock=clock)] 
     
    4242            devices = [device1, device2] 
    4343        else: 
    44             devices = [brian.StateMonitor(group, self.variable, record=True, clock=clock)] 
     44            devices = [brian.StateMonitor(group, self.variable, record=self.recorded, clock=clock)] 
    4545        for device in devices: 
    4646            simulator.state.add(device)