BBAL

Balances two BSEGY files so that their Mean Absolute Values (MAV) are the same. Can be executed in either a trace or profile balancing mode.
  bbal    infile1   infile2   iopt   
 
     infile1   =  input file_1 name
     infile2   =  input file_2 name
        iopt  0=  profile mode 
        iopt  1=  trace   mode
Example that illustrates the concept is taken from down-hole data. There are two 3 component geophones, one at a depth of 19.39 meters, the other is a reference phone fixed at the surface elevation of the hammer.
 -----------------------------------------------------------------------------------
   Length =  2500 samples             |  Shot Elevation =      820.0
   Sample Interval =    0.00020 sec.  |  Shot Depth =        0.0
   Delay Time =    0 msec.            |  Up Hole Time =     0 msec
   Low Cut Filter  =    4 Hz.         |  Shot X-COORD =    9897.04
   High Cut Filter = 1000 Hz.         |  Shot Y-COORD =   10066.29
   Line ID: 18A_                      |  Shot Date (year.moday) = 1996.0604
   Shot Orientation:                  |  Shot Time (hr:min)   = 10:52
   Azimuth= 90 Deg.  Vertical= 90 Deg.|  Charge Size (grams)=     0
 -----------------------------------------------------------------------------------
 TRACE|SHOT| STATION | OFFSET|        RECEIVER          |VERT|1STBRK|K-GAIN|AZI|VER|
   #  |REC.|SHOT  REC|       |  ELEV.  X-COORD   Y-COORD|FOLD|(SEC.)| (dB) |   |   |
 -----|----|---------|-------|----------------------------|--|------|------|---|---|
    1 |  10| 002  517|  19.39|  800.72   9897.04  10067.79|10|0.0000|   60 |  0|  0|
    2 |  10| 002  518|  19.39|  800.72   9897.04  10067.79|10|0.0000|   60 |189| 90|
    3 |  10| 002  519|  19.39|  800.72   9897.04  10067.79|10|0.0000|   60 |279| 90|
    4 |  10| 002  520|   1.59|  819.96   9897.04  10064.70|10|0.0000|   20 |  0|  0|
    5 |  10| 002  521|   1.59|  819.96   9897.04  10064.70|10|0.0000|   20 |  0| 90|
    6 |  10| 002  522|   1.59|  819.96   9897.04  10064.70|10|0.0000|   20 |270| 90|
The first 3 traces are separated to a new file, as are the last 3 traces. In this example, we then do a trace balance between the down-hole and the reference phone traces and recombine as in Figure 83. The commands are:
bplt c010.seg 2 0 0 1 7 0 .25 1 2e4 200
mv bplt.fig c010.fig
bedt c010.seg 0 .5 1 3 1 0
mv bedtc010.seg down.seg
bedt c010.seg 0 .5 4 6 1 0
mv bedtc010.seg refn.seg
bbal down.seg refn.seg 1
cp bbaldown.seg BBAL.seg
cat bbalrefn.seg >> BBAL.seg
bplt BBAL.seg 2 0 0 1 7 0 .25 1 2e4 200
mv bplt.fig BBAL.fig

Figure 83: BBAL: (A) Original data (down-hole barely visible) (B) data after splitting the data into two files, running BBAL, then combining into a second file.
\includegraphics[scale=.7]{Figurebbal.pdf}