#! /bin/sh
# Purpose: Continue the theme of zapping spatially aliased data from
#	suplane, doing a more difficult case
demo=dip2

amps=1,0,0,1	# In this demo, we try to kill a reflector of given slope

###MODEL###
# We make some simple data with suplane.  Here, in units of
# trace/timesample the slopes are -1, 1, 2, so
# that again the steepest reflector is spatially aliased.
suplane dip1=-4 | sushw key=d2 a=0.016 >suplane.data

# Again, "fool the program" (see the sudipfilt self-doc)
# by using nominal units in sudipfilt.  The data is created with
# "physical" parameters of dt=4ms and (nominally) dx=d2=0.015km=15m:
dt=1
dx=1



# Plot the model 
supswigp <suplane.data title="Data: 3 sloping reflectors--Use dt=dx=1" \
	label1="Samples" label2="Trace" f1=1 d1=1 f2=1 d2=1 >${demo}.1.eps
 
# Look at the F-K spectrum; note crossing of transformed reflectors
suspecfk <suplane.data |
supswigp title="F-K Spectrum of Data" \
	label1="Frequency" label2="K" >${demo}.2.eps

# Zap steep reflector by biasing actual slope 2 to slope 0
slopes=1.5,1.75,2.25,2.5
bias=2.0
sudipfilt <suplane.data dt=$dt dx=$dx \
	 slopes=$slopes amps=$amps bias=$bias |
supswigp title="slope=$slopes amps=$amps bias=$bias" \
	label1="Samples" label2="Trace" f1=1 d1=1 f2=1 d2=1 >${demo}.3.eps
 
echo 
echo "Output PostScript files:"

echo -n "     "
for i in ${demo}.*.eps
do
	 echo -n "$i "
done
echo
echo "You may view these with your PostScript Previewer"

exit 0

