GENBHOD

This is an program that generates bash script to conduct Principle Component Analysis (PCA) on down-hole data (Michaels, 2001b). A down-hole tool will rotate as it comes up the hole, and there is a need to determine the horizontal component orientations. This is an interactive program. The following is an example log of a run for a single station (normally, the last file will reflect many stations in a survey):
 genbhod 
 |---------------------------------|
 | Copyright (C) 2009  P. Michaels |
 |       All rights reserved       |
 |see GNU General Public License   |
 |---------------------------------|
  
 WARNING: !! 
 See Source Code, genbhod.f, or BSU documentation 
 (man pages and BSU user Guide)                    
 before you use this program. It is hardwired for
 a specific type of acquisition.
  
 enter 1char_ALPHA PREFIX 
c
  enter FIRST FILE NUMBER (<=3digits)
  for which source polarization is 270 deg.
009
  enter LAST FILE NUMBER (<=3digits)
  for which source polarization is 270 deg.
009
  enter UP/DOWN SWITCH
    -1= 90 Azimuth File Number 1 LESS than 270 Az
    +1= 90 Azimuth File Number 1 MORE than 270 Az
1
  enter azimuth of bowspring(R-comp)
180
  OUTPUT====> Downhole: gobhodo
  OUTPUT====> Reference: gobhodoR
  OUTPUT====> Downhole: gorunbhod
  OUTPUT====> Reference: gorunbhodR
  ----------------------------------------
 REMEMBER to change permissions on the    
 above files to execute. 
  ----------------------------------------
  IF examining the Down-hole Phone        
                                          
  1. Run gobhodo in directory with 6 chan 
  records (3 down, 3 reference phones)    
                                          
  2. Run gorunbhod in directory with files
  that are named hxxxyyy.seg              
                                          
  ----------------------------------------
  IF examining the Reference Phone        
                                          
  1. Run gobhodoR in the directory with   
  the 6 channel records.                  
                                          
  2. Run gorunbhodR in the directory with 
  files that are named rxxxyyy.seg        
                                          
  ----------------------------------------
After running the interactive program, change permissions of the generated scripts. For example, chmod +x go*. One can analyze either the fixed reference phone (scripts gobhodoR and gorunbhodR) or the down-hole phone (scripts gobhodo and gorunbhod). Because of a $180^o$ ambiguity in the result of the PCA analysis, one must observe and recored the tool orientation when it comes out of the hole. It is assumed that one starts logging the data with the first station at the deepest depth in the hole, pulling the tool up to the surface. For tools with a clamping bowspring, determine the orientation of the horizontal components relative to the bowspring and observe the bowspring orientation when the tool is at the last station. This PCA procedure is for horizontal sources where there are two source efforts at each subsurface station. These are of opposite polarity and recorded in separate files which can be subtracted to enhance SH-waves (Michaels, 1998).

The procedure is to run the gobhodo script which will scale and then subtract the two source efforts. For example, at a station where the *.seg files are c009.seg and c010.seg, the result will be a file, h010009.seg. For the single station example above, the gobhodo script is:

bscl c010.seg 1 1 3
bscl c009.seg 1 1 3
bsum bsclc010.seg  bsclc009.seg -1.0
mv bsumbscl.seg h010009.seg

Next, the script gorunbhod is run. It consists of BHOD program commands like this:

 bhod h010009.seg 2 3 50 90.0 180.0 +90.0
See program BHOD 10.1.11 for more. The final result is a file bhod.lst which contains the horizontal component orientations that will be applied to data headers (BTOR 12.2.2) and later rotate the data as desired BROT 12.2.4. In addition to the bhod.lst file, the gorunbhod script calls to BHOD produces Postcript files showing the analysis results (see Figure 59).

Figure 59: BHOD: plot produced showing PCA results for a geophone at about 19.39 meters depth. File bhod.lst: (00010 196.8 286.8) = (seq. R-azi, T-azi)
\includegraphics[scale=.55]{Figurebhod.pdf}