Go to the list of seismic processes.      Go to SIOSEIS introduction.
                               PROCESS GEOM

Parameters, alphabetically:
bin_h     bgp       bin_off   cgp       cknav     dbrps
declin    dfls      epath     fbinx     fbiny     fs        
ggx       gxp       lbinx     lbiny     lprint    ls        
mindfls   maxdfls   navfil    ntrcs     offset    offset2   
rpadd     setback   smear     type      writexy   yoffa     

Document Date: 13 Apr. 2016
Updates:
    13 Apr 2016 - Changed reovery from BAD DFLS when doing type 9
    6 Dec 2010 - Add Type 20 - Use UKOOA for gxp & ggx and ldeo for dfls.
               - If rpadd is not given and rp is < 0, set rp
    14 Sep 2010 - Add type 19 - get source lat/long from ukooa
    7 Sep 2009 - lprint 1024 print dfls and heading
    30 Aug 2009 - Add CKNAV
    June 2008 - GXP group 0 means use the SEG-Y number of trace per shot.
    Add TYPE 18 for entering ASCII nav into SEG-Y headers - Nov 2007
    Add parameter SETBACK - February 2007
    Add MINDFLS and MAXDFLS for determing bad fixes for type 9 - Jan 2007
    Add type 17 (range as distance along ship track) - August 2006
    Add NAVFIL2 - July 2006
    Add type 16 (Healy06) - July 2006
    Add lprint 256 and 512 - September 2005
    Add type 14 & 15 (Healy0503) - August 2005
    Add fbinx, fbiny, lbinx, lbiny, bin_off - Mar. 2005
    Changed the units of the cross-line offset to meters. - Mar. 2005
    Add TYPE 13 to calculate the crossline offset and feathering angle
        from the UKOOA file. - Jan. 2004
    Removed TYPE 12 - Jan. 2004
    Add TYPE 11 to calculate the range and rp number from the SEG-Y
        header x/y coordinates. - Aug 03
    Add TYPE 10 to write the UKOOA coordinates into the SEG-Y trace
         header. - Jun 03
    Add parameter WRITEXY to write in SEGY words 19 & 21 - May 2003
    Do all math in float even though SEGY is integer. - Oct 2002
    Type 9 calculates DFLS from lat/long in SEGY header. - Sep 2000
        

Process GEOM is used to describe the shot and cable geometries and to
calculate the reflection point (rp) numbers used to gather the seismic
line.  Process GEOM sets the shot-receiver distance into the trace
header of every trace.  Likewise, every trace is assigned an rp number.
Thus, process GEOM must precede processes NMO and GATHER, which assume
that the shot-receiver range and rp numbers are in the trace headers.

GEOM assumes the seismic line is shot in a straight line; there are
no crooked line adjustments.

GEOM utilizes many different methods of calculating the shooting 
geometry.  In marine shooting a source is usually fired every few
seconds (rep rate or repetion rate) according to either a set time
interval or distance interval.

Most surveys since GPS provide a navigation file that includes the
shot time and shot position.  Process GEOM uses it's own format
(see below) and perl script ts2sio exists on the
web to convert LDEO's TS files to SIOSEIS NAVFIL files.

Older seismic surveys often did not include a shot position for EVERY
shot, so it was easier to describe the shooting "rule" and the
exceptions to the rule.  The biggest reason for an exception was
when a shot was missed and the ship kept going.

The first two TYPES of describing the shooting pattern differ only in
the method of handling missing shot point numbers.  The first method
allows adjacent shots to have different shot point numbers (the shot
number incremented even though there was not shot) whereas the second
method assumes adjacent shots have consecutive numbers.  TYPEs 3, 4, 5
use an LDGO navigation file.  TYPE 6 needs a navigation file in
SIOSEIS format.  TYPE 8 needs a UKOOA navigation file.  TYPE 9 uses
the SEG-Y header x/y location (on Ewing SEGDIN uses the realtime
lat/long).

The shot is assigned an X-coordinate by adding (type 1) or multiplying 
(type 2) DFLS (distance from the last shot) to the X-coordinate of the
shot.  Each receiver is assigned an X-coordinate by adding the 
shot-receiver distance to the shot X-coordinate.  The  RP X-coordinate 
is calculated by assuming the RP is halfway between the shot and
receiver.  The RP number is the RP X-coordinate divided by DBRPS 
(distance between RPs) and truncating to an integer.  The coordinate of
the first shot of the job is the shot number (from the header) times the
distance from the previous shot.  i.e.
      xs = FLOAT(lhead(3)) * dfls
      rx = FLOAT(lhead(10))
      xr = xs + rx
      xrp = (xr + xs) / 2.
      lhead(6) = NINT( xrp/dbrps )


Older versions of GEOM (prior to Oct 2000) wrote the shot (source)
x coordinate in SEG-Y header word 19 and the receiver x coordinate
in word 21, which clobbered the existing navigation in those positions.

THE PARAMETER DICTIONARY
--- --------- ----------

FS     - The first shot to apply the parameters of this parameter list.
         Preset=1.

LS     - The last shot to apply the parameters of this parameter list. 
         Preset=FS.

GXP    - Group-range-pairs.  A list of cable group numbers and 
         shot-receiver distances.  Ranges not specified are calculated 
         by interpolation or extrapolation using ggx.  Group numbers must
         be strictly increasing. A maximum of 100 pairs may be given.  Ranges
         are normally negative in marine shooting since the ship always
         goes forward, in the positive direction.
         Not honored on UKOOA nav files.
         Preset=required.    e.g. gxp 18 -1350 24 -450  ggx 300
       = 0 and ggx is given, If the first group number is 0, then the number
         of traces per shot from the SEG-Y trace header is used as the
         instead of the 0.  This is useful when the streamer length may
         change between deployments but the streamer leader (distance from
         the guns to the first group) is the same.    
         e.g.  gxp 0 -142 ggx -12.5  can be used with the 630 channel streamer
         (same as giving gxp 630 -142) or the 480 channel streamer (same as
         giving gxp 480 -142).

GGX    - The constant distance between groups.  Used for calculating
         ranges outside of those given via gxp.  The sign of ggx implies
         the direction of the unknown ranges relative to the closest 
         group given.  Not honored on UKOOA nav files.
         ((Group given - group wanted) * ggx + (range of group given)).
         Preset=-300.
         E.G.   gxp 480 -250 ggx 12.5
                gxp 1 -250 ggx 12.5

DFLS   - The distance from the last shot.  The sign of dfls implies the
         direction the shot moved relative to the last shot.
         Not honored on UKOOA nav files.
         Preset = 150, types 1, 2, 6.
         Preset = 1, type 9.

MINDFLS - The minimum and maximum allowable distances between shots 
MAXDFLS  when using TYPE 9 (dfls computed from the fixes in the SEG-Y header).
         If the absolute value of computed distance (ABS(dfls)) is less than
         MINDFLS or greater than MAXDFLS, then the fix is considered bad.
         As of 2016.2.3, geom computes delta_lat and delta_long between good
         fixes and applies them to the last good fix when dfls is bad.
         Presets:   mindfls = 0, maxdfls = not given.
         e.g.  mindfls .1 maxdfls 500

CKNAV  - Similar to MAXDFLS, but good for ALL TYPES.  If the distance
         between shots exceeds CKNAV, the last good fix replaces the
         bad fix in the SEG-Y header.
         Preset = 99999.

SETBACK - The distance between the GPS antenna and the source.  This is
         always a positive number.  Often, this is the sum of the
         distance of the GPS to the stern and the distance of the guns
         from the stern.  The source coordinates in the SEG-Y header
         (words 19 and 20) are modified by SETBACK and the receiver
         coordinates (words 21 and 22) are computed using the source
         coordinates and the range (word 10) determined by GXP.  Valid
         with TYPE 9 only since the ship's course must be known.
         Preset = 0   e.g.  setback 140
        
DBRPS  - The distance between rps.
         Preset:   ABS(ggx)/2

SMEAR  - The subsurface smear factor.  The distance from a rp in which 
         to look for a trace.  The smear is centered about the rp.
         Not honored on UKOOA nav files.
         Preset=DBRPS

RPADD  - A scalar to add to every rp number.  Sometimes GEOM calculates
         a neagtive rp number, which might cause other sioseis processes
         problems.  Sometimes it might be useful to identify different
         seismic lines by having different rp number on each line.
         Preset = 0        e.g.   rpadd 1000

YOFFA  - The y-offset (perpendicular) of the shot from the seismic line
         (the x-axis).  The y-offset results in the shot-receiver 
         distance being the hypotenuse of the triangle of the in-line
         shot-receiver distance and the y-offset.  The y-offset is 
         applied to the range after the rp computation is performed.
         Preset = 0        e.g.   yoffa 100

TYPE   - The type of missing shot geometry.  Also see a discussion of TYPE
         above in the description of the algorithm.
         Preset = 2

      1, Missing shots must be explicitly described by using multiple
         GEOM lists.  e.g.
               fs 1 ls 1 dfls 50 type 1 end 
               fs 2 ls 2 dfls 100 end 
               fs 3 ls 99999 dfls 50 end 
         describes a situation where there is a missing shot between shot
         point numbers 1 and 2.  The x-coordinate of the shot is obtained
         by ADDING DLFS to the previous shot x-coordinate.

      2, Missing shot points are assumed to occur whenever a shot 
         point number is missing.  e.g. fs 1 ls 999999 dfls 50 type 2 end
         will cause the geometry to jump ahead when a shot is missing.
         The x-coordinate of the shot is obtained by MULTIPLYING the shot
         number by DLFS.

3, 4, 5, LDGO navigation method. CDP = 3, WAP = 4 and ESP = 5,
         When LDGO method is used, NAVFIL and NTRCS must be given. GXP is
         used to find the range from the guns to the closest receiver
         (assumed to be the highest channel number), with the rest of the
         cable to be defined in the navigation file.
             LDGO binary nav files may come from Lamont or  may be
         generated by Graham Kent's 'navcmp' program which reads the
         Ewing 'ts.n*' file.
             This method creates both the shot and receiver x and y
         coordinates in SEGY-Y header words 19-22.

      6, SIOSEIS navigation file method.  GEOM will compute a DLFS
         on each shot based of the shot time in the SEG-Y trace header
         and the navigation in an ASCII file named via the parameter
         NAVFIL.  The format of the SIOSEIS navigation file is:
         year day hour minute second lat/deg lat/min long/deg long/min
         e.g.     1997 67 12 0 0 -69 43.2954 170 23.646
         Each quantity must be separated by a space or tab.  The year
         is ignored by the program, so it may be any number of digits.
         South latitude and west longitude must be negative.  If the
         shot is not at exactly the same time as a shot in SIOFIL, it's
         position is computed by interpolation between adjacent points.
         The lat & long arc seconds are written into the source and
         receiver spots (19, 20, 21, 22) of the SEG-Y header.
         Parameter NAVFIL must be given.

      7, Elevations are inserted into the SEG-Y trace header with no
         other geometry done.

  8, 10, UKOOA file input (implied when parameter NAVFIL is a UKOOA
         file).  The shot-receiver range and rp bin number are computed
         and stored in the SEG-Y trace header.  The receiver (streamer)
         depth and the water depth at the receiver are also transferred
         to the SEG-Y trace header.  SEG-Y word 45 (Coordinate units)
         is set to 1 (Length).  Parameter NAVFIL must be given.  The
         X and Y coordinates of the first shot are used as the origin.
        8, TYPE 8 writes the distance from the origin into SEG-Y long
           words 19, 20, 21, 22 (Source and Group coordinates).
        10, TYPE 10 writes the UKOOA eastings and northings into SEG-Y long
           words 19, 20, 21, 22 (Source and Group coordinates).

      9, Parameter DFLS is calculated from the SEGY trace header
         longitude and latitude (SEGY bytes 73-76 and 77-80 respectively)
         and the coordinates scalar in bytes 17-18.  Bowditch's formula
         for determining the number of meters per degree of latitude
         and longitude is used, so it is imperative that the longitude
         be in SEGY order and precede the latitude (x,y vs lat/long).
         The distance computed is a simple distance; earth curvature is
         not considered.  This method should be very useful when the 
         ship's navigation is in differential mode.  The computed DFLS
         will always be positive, so set GXP appropriately.  This will
         NOT work on data that has already been through process GEOM since
         GEOM writes in word 19.

     11, The trace range (word 10) and rp number (word 6) are computed
         from SEG-Y long words 19, 20, 21, 22 (Source and Group 
         coordinates).  The coordinate of the receiver of the first 
         trace is used as the origin.  TYPE 11 works ONLY on "normal"
         marine geometry where trace 1 is furthest from the source
         and the streamer is pulled.  

     13, Marine feathered streamer geometry using UKOOA navigation file.
         The CMP bin number, feathering angle, and cross-line offset
         are written into the SEG-Y header.  The angle is in tenths of
         a degree in short word 48.  The offset is in units of meters
         in short word 49.

     14, Healy05 where NAVFIL is for the  Geometrics Log file which had
         the only shot number (trigger count).  It also contains the
         "true time" of the shot and the Ashtech navigation.  EPATH
         is use for the Healy SeaBeam centerbeam water depth.  The
         Geometrics FFID is moved to word 5 (SEGY energy source number)
         and the log file shot number is place in word 3, the "original
         field record number".  ***  No longer available ***

     17, The range (SEG-Y word 10) is the distance of the current shot
         along the ship's track using the first trace as the origin.
         SEG-Y words 19 & 20, source x and y, must be in arcseconds.
         When DBRPS is given, the SIOSEIS "gather" convention is 
         implemented so that traces within DBRPS of each other may be
         stacked with process stack (this is similar to process gather).
         Traces that are more than a 90 degree angle from the previous
         trace is "killed" by setting the SEG-Y trace id (word 15) to 2.
         This represents a "back and ram".  Trace angles less than 90
         are considered a turn.  The rp number (word 6) is 
         range / dbrps + 1.  
             Type 17 was designed to stack Knudsen chirp data where the
         ping rate (distance between pings) is variable.

     18, Read a SIO NAVFIL and insert the lat/long into the SEG-Y trace
         headers.  The ASCII navigation is associated with the SEG-Y
         using the timestamps.  If the navigation file timestamps are
         zero, then the "record" field is used.  The record number is
         assumed to be the SEG-Y shot number (word 3) unless the SEG-Y
         the rp trace number (SEG-Y word 7) is non-zero, in which case
         the record number is assumed to be the SEG-Y rp number (word 6).

     19, Get the source lat/long from the UKOOA file and insert into
         SEGY words 20/19 as real numbers.

     20, Determine the streamer geometry (GXP, GGX, DBRPS) from the first
         shot in the UKOOA file given in NAVFIL and get the navigation
         (DFLS) from the LDEO trace header.  The intent is provide a
         method of automatically detecting the number of traces in the
         streamer, yet not depend on the UKOOA file for the actual
         ship navigation.  In real-time processing, the UKOOA file may
         not be available as quickly as the shot data.  The UKOOA H0900
         (Offset from ship positioning) is NOT used, thus the S (source)
         and R (receiver) positions are used directly/unmodified.

BGP    - Bird-group-pairs.  A list of bird numbers (ids) and streamer
         group numbers so that the bird (which have the depth sensors)
         location can be associated with the group range (GXP).  The
         depth is placed in SEG-Y trace header long word 11 as a
         negative number since it is an elevation relative to sea level.
         Preset = none    e.g. bgp 1 5 3 9 4 17 5 25 6 33 7 41 9 45 10 53
          11 65 12 73 13 85 14 98 15 106 16 118 17 125 18 133 8 141 2 149
   
DECLIN - The magnetic declination to add to the compasses to convert 
         the readings to true north.
         Preset = 0.   e.g.   declin -14.5

BIN_H  - Bin height.  When using type 13 geometry (streamer feathering
         from UKOOA files), traces with a crossline midpoint offset
         larger than bin_h are flagged as dead (and thus dropped by
         process gather).

EPATH  - The pathname of a file containing the elevations that GEOM
         will insert into the SEG-Y header locations for shot and
         receiver elevations.  PROCESS SHIFT parameters DATUME and
         DATUMV may be used do elevation shifts.  The format of the
         elevation file is a surface location and elevation pair on
         a single line.  Each pair must be on a separate line and
         the location values must increase from line to line.  The
         surface location values may be obtained using processes GEOM
         and PROUT.  e.g. procs geom prout end
         geom  writexy yes ........
         prout   fno 0 lno 999999 ftr 1 ltr 99999
                 indices l3 l4 l19 l21 end
         Locations not specified in the file are obtained through
         interpolation or extrapolation.
         Preset = none    e.g.  /data/vol3/henkart/cats/elevations
         
WRITEXY - A yes/no switch indicating whether geom should write the
         the calculated source x and y coordinates into SEG-Y trace
         words 19 and 21.
         Preset = no        e.g. writexy yes

ADDITIONAL TYPE 3 PARAMETERS
---------- ------ ----------

NAVFIL - Navigation filename.  LDGO binary files and UKOOA P1 files
         may be used (SIOSEIS determines it's a UKOOA file if the
         first byte of the file is an ASCII letter H).
         Required for TYPEs 3, 4, 5, 6, 8, 16 geometry.
NAVFIL2 - A second navigation file for type 16 geom.  Needed when the
         navigation is in multiple files (there may be a new nav file
         at midnight every night).

NTRCS  - The number of traces per shot.  Required for LDGO navigation 
         since the number of traces per shot in the SEG-Y file includes
         the auxiliary channels.

OFFSET - The offset between the guns and the navigation antenna.  (On 
         the recording ship).  Used with LDGO navigation only.
         Required when TYPE 3 geometry is used.

OFFSET2 - The offset between the guns and the navigation antenna on the 
          "shooting" ship on 2 ship experiments.  Used with LDGO 
          navigation only.

CROSS-LINE OFFSET
---------- ------ 
Definitions:
    Shot-line - The straight line between the first shot (FS) and the
        last shot (LS).  The x,y coordinates for the shot-line
        endpoints are taken from the UKOOA file for shots FS and LS.
    Midpoint - The (x,y) point halfway between the shot and the
        receiver.
    Bin - A rectangular box with height BIN_H and width DBRPS.
    Bin center - The center of the box.  A point around which the bin
        is constructed.
    Bin center-line - The straight line between (FBINX,FBINY) and
        (LBINX,LBINY).  The center of the first bin is (FBINX,FBINY)
        and successive bincenters are DBRPS away along the line.
    CMP = Common midpoint - The bin that is common (the same)
        for multiple traces.
    Feathering angle - The angle between the streamer (a line between
        the shot and the receiver) and the shot-line. 
    Processing-line = Meaningful only when defined by the user with
        parameters fbinx,fbiny and lbinx,lbiny so that the bin
        cross-line offset can be calculated.  Without user definition,
        the processing line lies along the shot-line.
    Cross-line offset - The perpendicular distance between the receiver
        and the shot-line.
Parameters:
BIN_OFF - The offset of the bin center-line from the shot-line.  This
        assumes the bin center-line is parallel to the shot-line and
        starts and ends with the bins computed from the shot and 
        streamer geometry.
        Preset = 0.
FBINX - The X coordinate of the first bin.  Used when the bin center-line
        is not parallel to the shot-line.
        Preset = 0.
FBINY - The Y coordinate of the first bin.  Used when the bin center-line
        is not parallel to the shot-line.
        Preset = 0.
LBINX - The X coordinate of the last bin.  Used when the bin center-line
        is not parallel to the shot-line.
        Preset = 0.
LBINY - The Y coordinate of the last bin.  Used when the bin center-line
        is not parallel to the shot-line.
        Preset = 0.
    
         

HIDDEN PRINT PARAMETER:
------ ----- ---------

LPRINT - Print switch.  Intended as programmer debug information.
         PROCESS PROUT parameter TRLIST is also a convenient method of printing
         the geometry (e.g. lat/long ) information within the SEG-Y trace
         headers.
       = 2, Every trace will print a line containing various geometry
         variables such as the cdp number.  USE CAUTION when using
         this parameter since the print output may be LARGE.
       = 4, The Ewing/Digicon trace 0 is printed.
       = 8, The streamer depth and compasses are printed.
       = 16, More Ewing/Digicon trace 0 navigation.
       = 32, Print the source and receiver location and elevations.
       = 128, Print the information needed for type 13 (crossdip analysis).
       = 256, Print the shot number, date/time, lat/long, depth        e.g.
         133709 2005+254:07:05:24 N 88 59 26.052 W 179 00 47.516 2179
         This is suitable for the LGL Marine Mammal Observer's Report.
       = 512, Print the shot number, DFLS, lat/long          e.g.
         Shot:  133709 dfls:     1.00 lat:   88 59 26.052 long: -179  0 47.516
       = 1024, Print dfls and the heading.
         e.g. lprint 1026    does lprint 2 and lprint 1024


CGP    - Compass-group-pairs.  A list of compass numbers (ids) and
         streamer group numbers so that the compass location can be
         associated with the group range (GXP).  The compass data are
         not saved in the SEG-Y header nor used by any SIOSEIS process.
         The compasses may be printed by using LPRINT 8.
         Preset = none    e.g. cgp 1 4 6 44 11 84 16 140




Alistair Harding's version of ts2sio (in Perl) is:
# usage:   ts2sio  tsfile
# e.g. ts2sio  /data/processed/0008/ts.n255 > sioseis_nav_file
# 2000+255:01:08:36.112 017382 N 32 13.2870 W 075 29.1645 test
#
while (<>)
{
  my ($timestamp,$shotno,$ns,$latdeg,$latmin,$ew,$longdeg,$longmin) 
                          = split /\s+/;     
  my ($year,$jday,$hour,$minute,$second) = split /\+|-|:/, $timestamp;
  
  $latdeg  = -$latdeg  if ($ns eq "S");
  $longdeg = -$longdeg if ($ew eq "W");

  $, = " ";  # separate output with a space
  $\ = "\n"; # append newline
  print($year,$jday,$hour,$minute,$second,
         $latdeg,$latmin,$longdeg,$longmin,$shotno);
}

Written and copyrighted by:
Paul Henkart, Scripps Institution of Oceanography, March 1980 
ALL RIGHTS RESERVED
Go to the list of seismic processes.      Go to SIOSEIS introduction.