This file describes the code sugoupillaudpo.c

---------------------------------------------------------------------
Note: Standard CWP Makefile used to compile.
---------------------------------------------------------------------

SUGOUPILLAUDPO - calculate primaries-only impulse response of a lossless
             Goupillaud medium for plane waves at normal incidence
                 

EARTH MODEL

The earth is modelled as a Goupillaud-type layered medium, i.e., as a
stack of horizontal layers of equal time-thickness. Below the layers
is a homogeneous half-space. The earth is assumed to be perfectly
elastic (non-absorbing).

Such a medium is fully described by a set of reflection coefficients,
r[0],r[1],...,r[n], where r[0] refers to the earth surface, and r[i]
- to the i-th subsurface interface (the bottom of layer i).

		        impedance[i]-impedance[i+1]
		r[i] = -----------------------------  
	                impedance[i]+impedance[i+1] 

If the number of the layers in the model is n, the corresponding 
reflectivity sequence is of length n+1.

Notes: 
* Thick layers can be simulated by setting some coefficients r[i]=0.
* Reflection coefficient series can be extracted from sonic and
density logs as shown by Walden and Hosken, 1988 [5].


INPUT for SUGOUPILLAUDPO: reflection coefficient series in a SU format, i.e.,
binary floats with a SU header. The sampling interval specified in the 
header is interpreted by the code as two-way traveltime thickness of the 
layers.


WAVEFIELD

Normal incidence of plane waves is assumed. The wavefield can be
either of a vector type, e.g., displacement/velocity/acceleration, or
a scalar, e.g., pressure.

The field type can be specified by the user via the flag pV.
pV=1 (default) indicates a vector field; pV=-1 indicates pressure.


SOURCE

The source is a unit spike at time zero. It can be placed at the top
of any layer l (just below the interface between layers l-1 and l).
The default is l=1 (surface source). The current version of the code
allows 1 <= l <= n+1, where n is the number of the layers in the model
(layer n+1 corresponds to the homogeneous half-space beneath the
layers).

A surface source produces a downgoing spike of amplitude 1 both for
vector and scalar fields. In contrast, a buried source ( l > 1 ) acts
differently for vector and scalar fields and produces two spikes --
downgoing and upgoing. For vector fields, the downgoing spike is of
amplitude 1 while the upgoing spike is of amplitude -1. For scalar
fields both spikes are of amplitude 1.


RECEIVER

The receiver can be placed at the top of any layer k (just below the
interface between layers k-1 and k) or in the homogeneous half-space
below the layers, i.e., any k >= 1 is allowed. The default is k=1
(surface receiver).


OUTPUT

Direct arrival and primary reflections weakened only by transmission
lossess at interfaces.  

The sampling interval of the output is equal to that of the input
reflectivity series (two-way traveltime thickness of the layers).

The number of the output time samples can be specified by the user via
the optional parameter tmax. The default tmax depends on the number of
interfaces and on the source and receiver positions. It is long enough
to capture all primaries (might be longer than needed).
