#! /bin/sh

# no velocity variations 
# 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

## split-step (SPlit Step)
sumigpresp < 1shot_spike.su nxo=200 nxshot=1 nz=1024 \
dx=8 dz=1.0 fmax=50 vfile=vfile2 > prestack_mig_sp.su

# migration output 
suximage < prestack_mig_sp.su title="Prestack migration with sumigpresp" \
xbox=10 ybox=10 wbox=350 hbox=350 &

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

# theoretical K-domain aperture
kaperture x0=640 z0=768 nshot=1 sxmin=0 szmin=0 both=1 \
ngeo=200 dgx=8 dsx=1 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, 1 shotgather data" &

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

exit 0
