Vector
v1.trigavg(data,trigger,pre,post)
Vector
v.spikebin(data,thresh)
Vector
vmeanfreq = vdest.psth(vsrchist,dt,trials,size)
For bin i, the corresponding mean frequency f_mean[i] is determined by centering an adaptive square window on i and widening the window until the number of spikes under the window equals size. Then f_mean[i] is calculated as
f_mean[i] = N[i] / (m dt trials)
where
f_mean[i] is in spikes per _second_ (Hz). N[i] = total number of events in the window centered on bin i m = total number of bins in the window centered on bin i dt = binwidth of vsrchist in _milliseconds_ (so m dt is the width of the window in milliseconds) trials = an integer scale factor
trials is used to adjust for the number of traces that were superimposed to compute the elements of vsrchist. In other words, suppose the elements of vsrchist were computed by adding up the number of spikes in n traces
n v1.x[i] = SUMMA # of spikes in bin i of trace j j = 1Then trials would be assigned the value n. Of course, if the elements of vsrchist are divided by n before calling psth(), then trials should be set to 1.
Acknowledgment: The documentation and example for psth was prepared by Ted Carnevale.
VECSIZE = 200 MINSUM = 50 DT = 1000 // ms per bin of v1 (vsrchist) TRIALS = 1 objref v1, v2 v1 = new Vector(VECSIZE) objref r r = new Random() for (ii=0; ii<VECSIZE; ii+=1) { v1.x[ii] = int(r.uniform(0,10)) } v1.plot(g1) v2 = new Vector() v2.psth(v1,DT,TRIALS,MINSUM) v2.plot(g2)
Vector
v.inf(i,dt,gl,el,cm,th,res,[ref])
Vector
v1.resample(v2,rate)