Changeset 463 for trunk

Show
Ignore:
Timestamp:
09/02/10 15:48:38 (21 months ago)
Author:
pierre
Message:

Fix documentation of the gamma_generator function

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/stgen.py

    r462 r463  
    257257    def gamma_generator(self, a, b, t_start=0.0, t_stop=1000.0, array=False,debug=False): 
    258258        """ 
    259         Returns a SpikeTrain whose spikes are a realization of a Poisson process 
    260         with the given rate (Hz) and stopping time t_stop (milliseconds). 
     259        Returns a SpikeTrain whose spikes are a realization of a gamma process 
     260        with the given shape a, b and stopping time t_stop (milliseconds).  
     261        (average rate will be a*b) 
    261262 
    262263        Note: t_start is always 0.0, thus all realizations are as if  
     
    271272 
    272273        Examples: 
    273             >> gen.poisson_generator(50, 0, 1000) 
    274             >> gen.poisson_generator(20, 5000, 10000, array=True) 
     274            >> gen.gamma_generator(10, 1/10., 0, 1000) 
     275            >> gen.gamma_generator(20, 1/5., 5000, 10000, array=True) 
    275276          
    276277        See also: 
     
    465466            # find index in "t" time 
    466467            t_i = numpy.searchsorted(t[t_i:],ps[i],'right')-1+t_i 
    467             if rn[i]<gamma_hazard_scipy((ps[i]-t_last)/1000.0,a[t_i],b[t_i])/rmax: 
     468            if rn[i]<gamma_hazard((ps[i]-t_last)/1000.0,a[t_i],b[t_i])/rmax: 
    468469                # keep spike 
    469470                t_last = ps[i]