Changeset 417

Show
Ignore:
Timestamp:
08/17/09 21:27:28 (3 years ago)
Author:
lestebanez
Message:

interval.py : fix interval based spike selection

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/interval/src/signals/intervals.py

    r413 r417  
    107107        """ 
    108108        Shift all stop times of the interval by shift (ms). If from_start is 
    109         true, use start times as the reference to compute the new stop times   
     109        true, use start times as the reference to compute the new stop times   
    110110        """ 
    111111        interval_array = numpy.array(self.interval_data) 
     
    162162        return tot_duration 
    163163 
    164     def slice_times(self, times): 
     164    def slice_times(self, times) : 
     165        if times.__class__.__name__ == 'SpikeTrain' : 
     166            times = numpy.array(times.spike_times) 
     167        else : 
     168            times = numpy.array(times) 
    165169        spikes_selector = numpy.zeros(len(times), dtype=numpy.bool) 
    166170        if HAVE_INTERVAL: