Go to the list of seismic processes.      Go to SIOSEIS introduction.      Go to SIOSEIS examples.
                              PROCESS DISKIN

Parameters, alphabetically:
allno     alt       decimf    delay     fday      fgmt
fno       fntodo    forgat    format    fsec      ftr
gmtinc    ifmt      ipath     ipath2    lno       lntodo
lday      lgmt      lsec      ltr       mintrs    no
noinc     nsamps    ntrcs     ntrgat    random    renum
retrac    rewind    secinc    secs      si        set
sort      spath     tr        trinc

Document Date:  5 Nov. 2015
modifications:
ver 2015.4.2 (5 Nov. 2015) - Add FORMAT NIUST
ver 2014.2.6 (29 Apr. 2014) - Honor SEGY Rev 1 deep water delay scalar.
          - Set trace header short integer 108 to 0 if rev. 0
          - Create error if TRINC is used and process SORT is in procs.
17 Oct 2012 - Make FNO default (rather than preset) to first in file.
ver 2011.2.14 (6 June 2011) - FORMAT KNUDSEN does swap16 rather than 
       swap32 on trace header 180-240
22 March 2011 - Add parameters FNTODO and LNTODO
February 2011 - zero end of trace when secs is longer than input
6 December 11 - >2GB failed the random check on Mac PPC
7 June 2010 - Add format ASCII and format BINARY
25 Aug 2009 - Use 64bit disk address for random when file > 2GB
25 June 2009 - Change ALLNO preset to NO
             - Remove alltr documentation - was never implemented!
             - Add parameter RANDOM
11 December 2008 - Add format WAV
28 November 2007 - Make retrac 1 if given.
6 July 2007 - ipath /dev/null inserts dead shots.
11 August 2004 - Put Edgetech course and speed into SEGY words 63 and 64.
14 June 2004 - Honor renum and retrac only on the first fno/lno/end list.

DISKIN reads SEG-Y disk files.  The file may be in any SEG-Y data
format ( IEEE floating point, IBM floating point, 32 bit integer,
16 bit integer ).

Data in multiple files may be read by using multiple ipath lists,
each list ending with the word  end.  e.g.  
input
   ipath file1 end
   ipath file2 end
end

DISKIN "corrects" several sample intervals used in academia that are
not integers because there are thought of as a sample rate.  All other
processes in SIOSEIS use this floating point representation created by
DISKIN.  7812ns becomes 1./128., 488ns becomes 1./2048., 
67ns becomes 1/15000., 63ns becomes 1./16000., 31ns becomes 1./32000.


PARAMETER DICTIONARY
--------- ----------

IPATH  - The input SEG-Y pathname (filename).  200 characters maximum.
         The special Unix filename /dev/null may be used to create
         null (dead) shots.  fno, lno, ftr, ltr are honored.  /dev/null
         may not be the first file read.
         Required. e.g. ipath /seis/vel.123


shot/rp parameters:
------- -----------
FNO    - The first shot/rp number the parameter list applies to.
         NO is a shot if SEG-Y word 7 is zero and an RP if non-zero.
         Default = the first shot/rp in file IPATH.  e.g.   FNO 101

LNO    - The last shots/rp number the parameter list applies to.
         Default = the last shot/rp in file IPATH.   e.g LNO 101

NOINC  - The increment between FNO and LNO.  Only honored when FNO
         and LNO are used.  A NOINC of 99999 indicates that any 
         and all shots/rps will be used in any order as long as it
         is between FNO and LNO.  NOINC 99999 is useful when there
         are missing shots/rps. 
         Preset = 99999 e.g   noinc 2

FTR    - The first trace of each shot/rp to read from disk file 
         IPATH.  Traces less than FTR will not be read.
         Preset = the first trace of every shot/rp   e.g.  ftr  11

LTR    - The last trace of each shot/rp to read from disk file 
         IPATH.  Traces greater than LTR will not be read.
         Preset = the last trace of each shot/rp    e.g.  ltr 11

TRINC  - The trace increment between FTR and LTR.  FTR and LTR 
         must be given when TRINC is used.  A TRINC of 99999 
         indicates that any and all traces will be used in any 
         order as long as it is between FTR and LTR.  TRINC 99999
         is useful when there are missing traces or out of order 
         traces.
         Preset = 99999      e.g.  trinc 1

FNTODO - First number of traces TO DO.  A useful parameter when doing
         quality control and only the first FNTODO traces should be read.
         Similar to the Unix head command.
         Preset = 0    e.g. fntodo 300

LNTODO - Last number of traces TO DO.  Takes the last LNTODO traces in
         the input file.  This will only work on files where all traces
         are a fixed length.  Similar to the Unix tail command.  This
         was intended for realtime processing for display the last stacked
         traces.
         Preset = 0    e.g. lntodo 300


Time parameters:
---- -----------
FDAY   - The Julian day of the first data to read from disk file 
         IPATH.  Data before FDAY will not be read.
         Preset = 0      e.g.  fday 123

LDAY   - The day of year of the last data to read from disk file 
         IPATH.  Data in IPATH after LDAY will be ignored.
         Preset = 366     e.g.  lday 123

FGMT   - The GMT (in HHMM, or hours and minutes based on a 24 hour
         clock) of the first data in file IPATH to read.  FGMT is
         set to 0 after the first data are found (default).
         Default = 0    e.g.  fgmt 0800

LGMT   - The GMT of the last data to read from disk file IPATH.
         Data in file IPATH after LDAY will be ignored.
         Default = 2500     e.g.  lgmt 1300

GMTINC - The increment between FGMT and LGMT.
         Preset = 1        e.g. gmtinc 2

FSEC   - The second of the minute of FGMT of the first shot/rp in
         IPATH to read.  Data before FSEC of FGMT will be ignored.
         Preset = 0       e.g.  fsec 20

LSEC   - The second of the minute of LGMT of the last data to read
         from disk file IPATH.  Data after LSEC of LGMT will be 
         ignored.
         Preset = 60     e.g.   lsec 30

SECINC - The increment in seconds between shots.  After FSEC is 
         found, successive shots must be in exact increments of
         SECINC.  e.g. the first shot is at FSEC, the next is at
         FSEC + SECINC.  (Modulo 60).
         Preset = 0      e.g.    secinc 15

FTR    - The first trace of each shot/rp to read from disk file 
         IPATH.  Traces less than FTR will not be read.
         Preset = the first trace of every shot/rp   e.g.  ftr  11

LTR    - The last trace of each shot/rp to read from disk file 
         IPATH.  Traces greater than LTR will not be read.
         Preset = the last trace of each shot/rp e.g.  ltr 11

TRINC  - The trace increment between FTR and LTR.  FTR and LTR 
         must be given when TRINC is used.
         Preset = 1     e.g.   trinc 2


OTHER USEFUL PARAMETERS:
----- ------ -----------
RANDOM - Use disk positioning (lseek) rather than sequential reads to
         find the first shot (FNO).  This is only available for disk
         files conforming to SEG-Y Rev 1 standards and has the SEG-Y
         "fixed trace length" flag set.  In addition, shot and/or RP
         numbers must be monotonically increasing by 1.
         Preset = 1    e.g.    random 0

RENUM  - Renumber the shots/rps consecutively, starting with the 
         number given.  Useful when there are duplicate shot/rp 
         numbers in the job.  RENUM increments the shot number 
         after the shot trace number is equal to the number of 
         traces per shot, which comes from the SEG-Y tape header
         unless it is specified via DISKIN parameter NTRCS.
         Honored on the first fno/lno/end list only.
         Preset = none. e.g.    renum 101

RETRAC - Renumber the trace numbers within each shot/rp so that the
         first trace of each shot/rp is 1. 
         Honored on the first fno/lno/end list only.
         Preset = none. e.g.     retrac 1

SECS   - The number of seconds of data to process in file IPATH.  
         Data later than delay+secs will be omitted.
         Preset = none.

DECIMF - The decimation factor used to resample the data while 
         reading from disk.  No anti-alias filter is applied
         before decimation.
         Preset = 1 e.g. decimf 2 (every other sample is discarded)

IFMT   - The data format of the input disk file.  IFMT should be 
         used only when it is necessary to override the value in the
         SEG-Y header of the data file IPATH.
       =1,  IBM floating point.
       =2,  32 bit 2's complement integer.
       =3,  16 bit integer.
       =4,  16 bit UTIG floating point (not IEEE)
       =5,  IEEE floating point (host computer)
         Preset = taken from the disk file.

SI     - The sample interval, in seconds, of the data in file 
         IPATH.  SI overrides the value in the SEG-Y header.
         Preset = disk  e.g.   si .004

DELAY  - The deep water delay, in seconds, of the data in IPATH.
         DELAY overrides the value in the SEG-Y trace header read from disk.
         Preset = none  e.g.  delay 3.0

NTRCS  - The number of traces in each shot in disk file IPATH.  NTRCS
         overrides the value in the SEG-Y header in file IPATH.
         Preset = none. e.g.   ntrcs 1

NSAMPS - The number of samples in each trace,  NSAMPS overrides the
         value in the SEG-Y trace header.
         Preset = none. e.g.   nsamps 2560

NTRGAT - The number of traces in every rp.  Every NTRGAT trace 
         will contain an "end of gather" flag in header word 51.  
         Used to convert shot sorted files into rp sorted files 
         without going through processes geom or gather.  Shot/rp
         boundaries are ignored when counting traces for ntrgat.  
         NTRGAT 0 sets the flag to 0 on every trace.
         Preset = -1       e.g.    ntrgat 24

FORGAT - Foreign gather switch.  The use of FORGAT indicates that
         the input gathers were not generated by SIOSEIS and do not
         have the end-of-gather convention used by SIOSEIS (a -1 in
         SEG-Y header word 51).  FORGAT is similar to NTRGAT but
         allows each gather to have a different number of traces.
         The end-of-gather is detected when the next trace has a
         different rp number or is equal to LTR (when ltr is given).
         The value of FORGAT indicates the number of rps to concatenate
         into a single gather which is terminated by the -1 
         end-of-gather flag.  LDGO gathers start with the largest
         trace number first, which breaks the SIOSEIS 
         monotonically increasing assumption; LDGO gathers may be
         read using forgat 1 and ftr 99999, in which case SIOSEIS 
         will use all traces within the gather.
         Preset = 0     e.g. forgat 1

MINTRS - The minimum number of traces each gather must have.  If 
         an input rp does not have the specified minimum number of
         traces, DISKIN will create dead traces so that there are
         MINTRS traces.
         Preset = 0     e.g.  mintrs 24

SET    - The start and end times of the data to read from disk.  
         SET is a pair of times in seconds. The use of SET causes
         the deep water delay and the number of samples to be 
         changed.  If either SET is outside of the data, the data 
         is padded with zeroes.  The data will always be 
         SET(2) - SET(1) long.
         Preset = none  e.g.   set 2.0 3.0

SORT   - The use of this parameter overrides the automatic 
         determination of the data sort for DISKIN.  SORT does not
         change any part of the SEG-Y header, so other SIOSEIS
         processes are not affected by this parameter (i.e. 
         successive processes in the process list will receive the
         data with the original sort).   The choices are 'shot' or
         'cdp' or 'stack'
         Preset = none  e.g.  sort shot

REWIND - A YES/NO switch indicating whether the input file should be
         rewound before reading the first shot, FNO, of the fno-lno
         list.  The data on disk may not be accessed in reverse order,
         so the only way to get a shot/rp that has already been passed 
         is to start searching from the beginning of the disk file.
         REWIND is reset to NO immediately after use; rewind only
         occurs at FNO and only occurs on the list specified.
         Default = YES    e.g   rewind no

FORMAT - The type of seismic format of the file IPATH.
       = SEGY,  An SEG-Y disk file with all headers.
       = KNUDSEN.  Does a 16 bit byte swap on trace header bytes 180-240
         rather than the default 32 bit byte swap.
       = SSC, The Seimographic Services Corporation' Phoenix format.
       = IRIS, The IRIS PASSCAL format is like SEGY but omits both file
         headers and the data format code is in the trace header.  SIOSEIS
         can only handle 64k data samples.  There is only one trace in
         each Passcal file.
       = SU, the Colorado School of Mines Center for Wave Phenomena's
         Seismic Unix file format; no file headers and the data are
         host floating point.
       = NOHEAD, No SEG-Y file headers.  Parameter IFMT must be given.
       = SWAPPED, SEG-Y files written on Intel or DEC machines that
         are still in little-endian byte order (low byte first). SIOSEIS
         written SEG-Y files are in the correct order (big-endian).
       = ODEC, The ODEC 3.5 format which is byte swapped and has a
         320 byte trace trailer.
       = EDGETECH.  Edgetech uses a pseudo-SEGY format.  Edgetech puts the
         shot number and trace number in different locations.  It also
         uses the cpu time instead of the GPS time for the time of shot.
         This format precludes the use of parameters FNO, LNO, NOINC, FTR,
         LTR, and TRINC.  Process XSTAR should be used on ALL Edgetech data.
         GeoSTAR data must be converted to XSTAR format prior to use by
         sioseis since GeoSTAR data do not have the first two SEG-Y headers
         and is in SEG-Y byte order.  Course and speed are saved in SEGY
         words 63 and 64.
       = UTIG-OBS.  UTIG uses a 32 bit integer for the delay.
       = WAV.  A WAV file (44 byte header and 16 or 32 bit little endian int)
       = ASCII.  Each IPATH file should contain an ASCII list of trace
         amplitudes.  The length of the trace is the number of ASCII values
         read.  The shot number will be 1.  The first IPATH will be trace 1
         and successive IPATH will increment the trace number.  Parameter
         SI is honored.
       = BINARY.  Each IPATH file should contain a binary string of trace
         amplitudes.  The binary file must be IEEE floating point words in
         the byte order of the host computer.  The length of the trace is 
         the number of values read.  The shot number will be 1.  The first
         IPATH will be trace 1 and successive IPATH will increment the trace
         number.  Parameter SI is honored.
       = NIUST,  NIUST puts the delay in ms in bytes 91&92 with us in 181&182.
	 Diskin converts the delay t0 SEGY Rev. 1

         Preset = SEGY           e.g. format edgetech

IPATH2 - The pathname of a second data file that will be merged with
         the data of IPATH.  The merging is done by alternate reads
         from IPATH and IPATH2.  See parameter ALT for whether the
         merge is by trace or record (shot/rp).  e.g. When ALT is 2,
         the first trace comes from IPATH, the second comes from
         IPATH2, the third from IPATH, the fourth from IPATH2, etc
         Preset = none    e.g.  ipath2 datafile2

ALT    - The type of interleaving when using IPATH2.
       =1, Alternate records (shots or rps) are read from IPATH and
         IPATH2.  Both files MUST contain the same shot/rp numbers.
         e.g. ipath shot 1, ipath2 shot 1, ipath shot 2, ipath2 shot 2.
       =2, Alternate traces are read from IPATH and IPATH2.  e.g.
         ipath shot 1 trace 1, ipath2 shot 1 trace 1, ipath shot 2
         trace 2, ipath2 shot 2 trace 2
         Preset = 2

SPATH  - The pathname of the "sort" file.  When SPATH is given, 
         process DISKIN reads the seismic traces in the order 
         specified by SPATH rather than the order actually in IPATH.
         Preset = none  e.g. /usr/users/joe/data/sort.line1

NO  XN - The word type and the index of the SEG-Y trace header to use
         for searching rather than the shot or rp number.  FNO and
         LNO no longer refer to shot or rp number, but to the new
         SEG-Y word.
     X = I, means short integer (16 bit integer trace header)
       = L, means long integer (32 bit integer trace header)
       = R, means real word (host floating point)
     N = the index with the SEGY trace header.
         Example:  no l5 will use the SEG-Y "Energy source point number"            rather than the shot number.
         Preset = none

TR  XN - The word type and the index of the SEG-Y trace header to use
         for searching rather than the shot/rp trace number.
     X = I, means short integer (16 bit integer trace header)
       = L, means long integer (32 bit integer trace header)
       = R, means real word (host floating point)
     N = the index with the SEGY trace header.
         Example:  tr l10  ftr -500 ltr 500 will read all traces with
                   ranges between -500 and +500.
         Preset = none

ALLNO  - A YES/NO switch that indicates that the entire file will be
         searched for additional shots/rps that might be in the
         fno-lno range.  ALLNO NO will cause the sioseis job to end
         faster when LNO is not at the end of the file.  ALLNO governs
         LNO only.  It is impossible to skip data before FNO.  DISKOX
         parameter FLINC may be used to create small files for velocity
         analysis.
         Preset = yes

END    - Terminates each parameter list.

EXAMPLE:
          procs diskin prout end
          diskin
          renum 1
          FNO 1 LNO 10 ipath dataset1 end
          FNO 1 LNO 10 ipath dataset2 end
          end
          prout
          FNO 1 LNO 9999 ftr 1 ltr 999 end
          end
          end

OBSOLETE and HIDDEN PARAMETERS:
ASCII  - Some processing packages (e.g. LDGO) violate the SEG-Y 
         standard by writing the first SEG-Y header in ASCII 
         rather than EBCDIC.   The use of this parameter 
         indicates that the header is in ASCII.   An ASCII header
         usually manifests itself in SIOSEIS in the plot header as
         bad characters ( usually ?????'s).
         Preset = 0     e.g.  ascii 1

LPRINT - A debugging parameter.
   
Copyright (C) by The Regents of The University of California, 1988
Written by Paul Henkart, Scripps Institution of Oceanography, La Jolla, Ca.
All Rights Reserved.
Go to the list of seismic processes.      Go to SIOSEIS introduction.