ba2s

This C-language program converts an ASCII text file to a binary BSEGY file. It converts in the opposite direction of the above programs seg2txt and seg2csv. The online help shows how one can read either a row or column order text file. Only minimal headers are generated. The user can employ the program bhed to edit the headers.


{vlist63}
   ba2s  infile iorder ncol nrow dt 
 
     infile   =  input file name
     iorder   =  1 each row is a trace, columns are time axis (int)
              =  0 each col is a trace, rows are time axis (int) 
     ncol     =  number of columns in matrix (int)
     nrow     =  number of rows in matrix (int)
     dt       =  sample interval in micro seconds (int)
     
From the Man page:
   EXAMPLE:
       ba2s 8800.txt 0  62  5000 1000

       File 8800.txt is processed by ba2s.  Rows are time axis, 62 columns
       (ie. channels).  The number of samples per trace is 5000.  Sample
       interval is 1000 microseconds.
vlist63



The procedure to edit headers includes running program bhed twice. First to download the current headers into a file. This file can be edited, and then the edited file uploaded back into the data. For reference, the bhed help is:


{bhedlisting}
  bhed infile  header_file  iupdn  
  
 infile       =input file name 
 header_file  =file with selected header info 
 iupdn        =1 download headers to header_file
              =0 upload headers to BSEGY data set
bhedlisting



An example flow is as follows:


{bhedrun}
bhed 8800.seg 8800.hed 1
(edit file 8800.hed)
bhed 8800.seg 8800.hed 0
mv bhed8800.seg 8800.seg
bhedrun



Note that the file 8800.hed is created on the first bhed run. Use your favorite text editor to modify this. Then use the modified 8800.hed in the second run. This produces a file bhed8800.seg which can be renamed using the move (mv) command.