#! /bin/sh
# set -x

# Demos shell for sugoupillaud
# Albena Mateeva, Jan 22, 2001


#---------------------------------------------------------------
# An example reflectivity series in rdemo.asc
#
# 2048 samples corresponding to:
#
# a surface reflection coeficient
# ( r[0]=-1.0 for this example, i.e., free surface )
#
# and 2047 subsurface interfaces (equally spaced in time).
#
#---------------------------------------------------------------

#-------- show example reflectivity ---------------

# in this example the two-way time thickness of each subsurface layer is 2ms

a2b n1=1 < rdemo.asc | suaddhead ns=2048 | sushw key=dt a=2000 > rdemo.su
suxgraph < rdemo.su label1="Two-way traveltime from the surface (s)" \
	 label2="Displacement Reflection Coeficient" \
	 title="REFLECTIVITY SERIES" x2beg=-1 x2end=1 height=600 width=300 &


# compute and graph displacement seismograms for a
# SOURCE BURRIED AT 100 ms (100 LAYERS) BENEATH THE SURFACE: 

#------ surface seismogram --------------------------------------------

sugoupillaud < rdemo.su l=101 | suresamp | \
suxgraph label1="Time (s)" label2="Displacement" \
	 title="SURFACE SEISMOGRAM" x2beg=-1 x2end=1 height=585 width=300  &


#------ receiver burried at 250 ms (250 layers) below the surface ----- 

sugoupillaud < rdemo.su l=101 k=251 | suresamp | \
suxgraph label1="Time (s)" label2="Displacement" \
	 title="RECEIVER DEPTH 250 ms" x2beg=-1 x2end=1 height=549 width=300  &

	 	 
#------ receiver burried at 500 ms (500 layers) below the surface ----- 

sugoupillaud < rdemo.su l=101 k=501 | suresamp | \
suxgraph label1="Time (s)" label2="Displacement" \
	 title="RECEIVER DEPTH 500 ms" x2beg=-1 x2end=1 height=512 width=300  &


# REMARK: The length of these seismograms is defined by the default value
# of tmax. It coinsides with the arrival of the primary reflection from the
# deepest interface. This choice (and any smaller tmax) neutralizes the
# consequences of modelling the earth below the deepest interface as a
# homogeneous half-space.

# SUGGESTED EXERCISE: Change the surface reflection coeficient
# (the first entry in the rdemo.asc file) from -1.0 (free surface)
# to zero (no surface-related multiples) and see what happens to
# the seismograms.

exit 0
