Changeset 352

Show
Ignore:
Timestamp:
11/17/08 14:30:50 (2 months ago)
Author:
emuller
Message:

Bug fixes to shotnoise_fromspikes

Files:

Legend:

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

    r337 r352  
    857857      q - the shot jump for each spike 
    858858      tau - the shot decay time constant in milliseconds 
     859      dt - the resolution of the resulting shotnoise in milliseconds 
    859860      t_start - start time of the resulting AnalogSignal 
    860861                If unspecified, t_start of spike_train is used 
    861862      t_stop  - stop time of the resulting AnalogSignal 
    862863                If unspecified, t_stop of spike_train is used 
    863       dt - the resolution of the resulting shotnoise in milliseconds 
    864864      array - if True, returns (shotnoise,t) as numpy arrays, otherwise an AnalogSignal. 
    865865      eps - a numerical parameter indicating at what value of  
     
    916916    y = numpy.convolve(a,kern)[0:len(t)] 
    917917 
     918    if array: 
     919       signal_t = numpy.arange(window_start,t_stop,dt) 
     920       signal_y = y[-len(t):] 
     921       return (signal_y,signal_t) 
     922 
     923 
    918924    result = AnalogSignal(y,dt,t_start=0.0,t_stop=t_stop-t_start) 
    919925    result.time_offset(t_start)