var a,b,c,d,e,f,g,h,i,j,k,l,m,n; 'script measures neg and positive amplitude of spikes ' and sorts them according to which peak is bigger (multiplied by factor) a:=input("triggerchannel?",401); n:=input("channel to investigate?",10); f:=input("size factor?",1.1); m:=Memchan(3); 'new memchannel for spikes l:=Memchan(3); Chanshow(m); Chanshow(l); interact("set Cursors around area to analyze",1023); b:=Cursor(1); Repeat 'g:=0; 'testing only b:=nexttime(a,b); c:=chanmeasure(n,8,b-0.015,b+0.015); 'find maximum of spupike d:=chanmeasure(n,9,b-0.015,b+0.015); ' find minimum of spike if f*abs(c)=abs(d) then 'oberes ist groesser als unteres*factor 1.1 Memsetitem(l,0,b); endif; 'Printlog("time ",b," max ",1.2*c," min ",d," ",g); until b>Cursor(2); 'until b<0;