#! /bin/sh
WIDTH=350
XOFF1=380
XOFF2=660
HEIGHT=450
XOFF1=520

echo
echo
echo
echo "Not making data---it is made by running Xselect1"
sleep 2

# Window to full fold cdp region and sort by cdp
# See the Sort Tutorial for an illustration of using sugethw and susort
# to determine the full fold region.
suwind <modeldata key=cdp min=1100 max=1480 >tmp
susort<tmp cdp offset |
suximage perc=99 title="Full Fold CDPs"\
	label1="Time (sec)" label2="CDP Gather" f2=1 d2=0.333333 \
	wbox=${WIDTH} hbox=${HEIGHT} xbox=0 ybox=0 &

# Get near and far offset sections
# See the Sort Tutorial for determining that the near offsets in the
# full-fold portion of the data vary between 0 and 40 and the fars
# between 160 and 200.
# The count parameter is not important here, but if the data set is
# large (e.g., a tape), then without count set, you search the entire
# tape, so use count when you know how many traces to expect.
suwind <modeldata key=offset min=40 max=80 count=24 |
suxwigb perc=99 title="Near Offsets"\
	label1="Time (sec)" label2="CDP Location" f2=1020 d2=20 \
	wbox=$WIDTH hbox=$HEIGHT xbox=$XOFF1 ybox=0 &

suwind <modeldata key=offset min=200 max=240 |
suxwigb perc=99 title="Far Offsets"\
	label1="Time (sec)" label2="CDP Location" f2=1100 d2=20 \
	wbox=$WIDTH hbox=$HEIGHT xbox=$XOFF2 ybox=0 &

# The near and far offsets exhibit two step "jitter", let's use
# every other gather to get true common offset sections.  Again
# use count parameter for illustrative purposes.
suwind <modeldata key=offset min=40 max=40 count=12 |
suxwigb perc=99 title="True Common Offset=40"\
	label1="Time (sec)" label2="CDP Location" f2=1020 d2=40 \
	wbox=$WIDTH hbox=$HEIGHT xbox=0 ybox=$YOFF1 &

suwind <modeldata key=offset min=240 max=240 |
suxwigb perc=99 title="True Common Offset=240"\
	label1="Time (sec)" label2="CDP Location" f2=1120 d2=40 \
	wbox=$WIDTH hbox=$HEIGHT xbox=$XOFF1 ybox=$YOFF1 &

# Sometimes you know a value is bad and want to reject it.  Let's reject
# the first and last cdp in the last example:
suwind <modeldata key=offset min=240 max=240 |
suwind key=cdp reject=1120,1560 |
suxwigb perc=99 title="Reject Offsets 1120,1560"\
	label1="Time (sec)" label2="CDP Location" f2=1160 d2=40 \
	wbox=$WIDTH hbox=$HEIGHT xbox=$XOFF2 ybox=$YOFF1 &

exit
