function[y]=wave(tstep,trise,tfall,t0max,i0);
%
% Silicon [y]=wave_02_07(1e-10,5e-9,20e-9,400,50000,2.5e-7);
% MCP
% MCP signal: trise=200ps, tfall=200ps, amplitude=i0
%  
[tstep,trise,tfall,gain,NPE,Ishot,G,nadc,bw,tau,T,R,fs,ts,apjit]=params();
% n=round(20*tau);
n=round(10*tau);
trise=floor(trise); 
if trise==0
   trise=1;
end
tfall=floor(tfall);
if tfall==0
   tfall=1;
end
t0max=floor(t0max);
yrise=zeros(1,n); 
yrise(t0max:t0max+trise)=(0:i0/trise:i0);
yfall=zeros(1,n); 
yfall(t0max+trise+1:t0max+trise+tfall+1)=fliplr(0:i0/tfall:i0);
y=yrise+yfall;
% plot(y,'b'); size(y);
end