#! /bin/sh
# Miggbzo -- apply MIGration by Gaussian Beams for Zero Offset
set -x

demo=4

nt=500 dt=.004 ft=0.0 dtsegy=4000
nx=250 dx=80  fx=0.0
nz=500 dz=20  fz=0.0
#fmin=10 fmax=50    # see param2 in model.dir 

# make velocity function
cd miggbzo.dir

# create the background velocity models
Unisam2

# put su headers on data
suaddhead < demo${demo}traces ns=500  ftn=1 |
sushw key=dt a=$dtsegy > junk.su

# plot background velocity model Marathon model
ximage < junkv n1=$nz n2=$nx -geometry 560x460+0+650 \
title="Background Velocity Demo $demo" \
d1=$dz d2=$dx &

# Gaussian beam migration constant background velocity
sumiggbzo <junk.su >junkmgb2 vfile=junkv verbose=1 \
	 dt=$dt dx=$dx dz=$dz nz=$nz fz=$fz \
	fmin=$fmin fmax=$fmax

# plot output of gb migration with model 2 velocity profile
suximage <junkmgb2  perc=99  -geometry 560x460-0-0 \
	label1="Depth" label2="Distance" \
	title="Gaussian Beam Migration $demo" &

exit 0
