#! /bin/sh

# no velocity variation
# make background wavespeed
makevel nx=200 nz=1024 v000=2000.0 dx=8 dz=1.0 dvdx=0.0 dvdz=0.0 >vfile1
transp <vfile1 n1=200>vfile2

## now migrate with a collection of shotpoints
sumigprepspi < 10shots_spike.su nxo=200 nxshot=10 nz=1024 \
dx=8 dz=1.0 fmax=50 vfile=vfile2 > prestack_mig_pspi.su

# migration output
suximage < prestack_mig_pspi.su  \
title="Prestack migration, 10 shot gathers, with sumigprepspi" \
xbox=10 ybox=10 wbox=350 hbox=350 &

# K domain aperture
suspeck1k2 < prestack_mig_pspi.su |
suximage x1beg=-.2 x2beg=-.2 x2end=.2 x1end=.2 \
xbox=400 ybox=10 wbox=350 hbox=350 \
legend=1 cmap=hsv4 \
title="K-domain aperture 10 shotgathers, PSPI" &


# theoretical K-domain aperture
kaperture x0=640 z0=768 nshot=10 sxmin=0 szmin=0 both=1 \
ngeo=200 dgx=8 dsx=160 c=2000 nstep=0 nfreq=100 fmin=20 fmax=50 |
xgraph n=400000,0 mark=1,0 marksize=1,0 linewidth=0,1 style=normal \
width=350 height=350 \
title="Theoretical K-domain aperture, 10 shotgathers" &

##  end of 2d prestack migration, single shotgather
####

exit 0
exit 0
