The seismic amplitudes are usually strongest nearest the source and at early times. Consequently, the raw records usually show very weak or non-existent reflections at the far-offset traces. To display these important signals we gain the data in some fashion. This gain procedure can be a combination of several methods:

- Backing
out the geometric spreading by multiplying each trace with the
reciprocal
of the geometric spreading factor
*v*(*t*)**t*, where*v*(*t*) is velocity at time*t*and*t*is the 2-way traveltime. The attenuation can also be backed out by multiplying the trace with , where is the attenuation constant. - Automatic gain control (AGC) of the data. Here the data within a specified time window is gained to a constant energy level. The window is slid down the trace so the energy is equilibrated. Shorter windows boost everything while longer windows tend to show true relative amplitudes.

% % MATLAB 5.0 script for applying AGC to CSG traces in a CSG. % For each trace, the energy within a moving window of length % np is computed and the sample in the center part of this window % is divided by this energy. % % data(x,t) - input - nx x nt CSG matrix % np - input - length of AGC window % out1 - output- traces with AGC applied % [nx,nt]=size(data); inn=[fliplr(data(:,1:np)) data fliplr(data(:,nt-np:nt))]; inn=inn.^2; f=ones(np,1)/np; out=conv2(inn,f'); start=round(np+np/2);endd=start+nt-1; outt=out(:,start:endd); out1=data./(sqrt(outt)+.000001);