Changeset 440

Show
Ignore:
Timestamp:
08/12/08 14:29:40 (3 months ago)
Author:
apdavison
Message:

Fixed bug #109, although I'm not sure I've tested all the possible scenarios.

The bug arose because copying the input spikes to the recorded spikes vector only occurred during set() if record() had been called previously. Now we set a flag, and do the copying during record() if it has not been previously done.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/hoc/standardCells.hoc

    r359 r440  
    220220        source.play(input_spiketimes) 
    221221        source.ping = 1.0 
    222         spiketimes.append(input_spiketimes) 
    223       } 
     222      } 
     223      recorded_current_input_spikes = 0 
    224224      has_input_spikes = 1 
    225225    } else { 
     
    254254    } 
    255255    recording = $1 
     256    if (recording && !recorded_current_input_spikes) { 
     257        spiketimes.append(input_spiketimes) 
     258    } 
    256259  } 
    257260   
     
    269272      source.ping = 1.0 
    270273      if (recording == 1) { 
    271         spiketimes.append(input_spiketimes) 
    272       } 
     274          spiketimes.append(input_spiketimes) 
     275          recorded_current_input_spikes = 1 
     276      } else { 
     277          recorded_current_input_spikes = 0 
     278      } 
     279        
    273280    } else { 
    274281      source.start = start