SYNOPSIS

PERL PROGRAM NAME:

AUTHOR: Juan Lorenzo (Perl module only)

DATE:

DESCRIPTION:

Version:

USE

NOTES

Examples

SYNOPSIS

SEISMIC UNIX NOTES SURESAMP - Resample in time

suresamp <stdin >stdout  [optional parameters]                    



Required parameters:                                              

    none                                                          



Optional Parameters:                                              

   nt=tr.ns    number of time samples on output                   

   dt=         time sampling interval on output                   

               default is:                                        

               tr.dt/10^6     seismic data                        

               tr.d1          non-seismic data                    

   tmin=       time of first sample in output                     

               default is:                                        

               tr.delrt/10^3  seismic data                        

               tr.f1          non-seismic data                    

   rf=         resampling factor;                                 

               if defined, set nt=nt_in*rf and dt=dt_in/rf        

   verbose=0   =1 for advisory messages                           





Example 1: (assume original data had dt=.004 nt=256)              

   sufilter <data f=40,50 amps=1.,0. |                            

   suresamp nt=128 dt=.008 | ...                                  

Using the resampling factor rf, this example translates to:       

   sufilter <data f=40,50 amps=1.,0. | suresamp rf=0.5 | ...      



Note the typical anti-alias filtering before sub-sampling!        



Example 2: (assume original data had dt=.004 nt=256)              

   suresamp <data nt=512 dt=.002 | ...                            

or use:                                                           

   suresamp <data rf=2 | ...                                      



Example 3: (assume original data had d1=.1524 nt=8192)            

   sufilter <data f=0,1,3,3.28 amps=1,1,1,0 |                     

   suresamp <data nt=4096 dt=.3048 | ...                          



Example 4: (assume original data had d1=.5 nt=4096)               

   suresamp <data nt=8192 dt=.25 | ...                            





Credits:

   CWP: Dave (resamp algorithm), Jack (SU adaptation)

   CENPET: Werner M. Heigl - modified for well log support

   RISSC: Nils Maercklin 2006 - minor fixes, added rf option



Algorithm:

   Resampling is done via 8-coefficient sinc-interpolation.

   See "$CWPROOT/src/cwp/lib/intsinc8.c" for technical details.



Trace header fields accessed:  ns, dt, delrt, d1, f1, trid

Trace header fields modified:  ns, dt, delrt (only when set tmin)

                               d1, f1 (only when set tmin)

User's notes (Juan Lorenzo) untested

CHANGES and their DATES

Import packages

instantiation of packages

Encapsulated hash of private variables

sub Step

collects switches and assembles bash instructions by adding the program name

sub note

collects switches and assembles bash instructions by adding the program name

sub clear

sub d1

sub dt

sub f

sub nt

sub rf

sub tmin

sub verbose

sub get_max_index

max index = number of input variables -1