function [data]=model1(migi,time_table,nx,nxx,nz,ntrace,ntime,dt,app,rick,tshift,dx,c)
data=zeros(ntrace,ntime);
nl=length(rick);
data1=zeros(ntrace,nl+ntime-1);
for ixtrace=1:ntrace;
  ixtrace
  istart=1 + (ixtrace-1)-app;iend=1+ (ixtrace-1)+app;
  if istart<1;istart=1;end;
  if iend>nxx;iend=nxx;end;
    for ixs=istart:iend;
    for izs=1:nz;
      r = sqrt((ixtrace*dx-ixs*dx)^2+(izs*dx)^2);
      time = 1 + round( r/c/dt );
      data(ixtrace,time) = migi(ixs,izs)/r + data(ixtrace,time);
    end;
    end;
data1(ixtrace,:)=conv2(data(ixtrace,:),rick);
end; data(:,1:ntime)=data1(:,1:ntime);
