App-SeismicUnixGui
view release on metacpan or search on metacpan
lib/App/SeismicUnixGui/developer/Stripped/filter/sulfaf.su.main.filters view on Meta::CPAN
SULFAF - Low frequency array forming ",
sulfaf < stdin > stdout [optional parameters]
Optional Parameters:
key=ep header keyword describing the gathers
f1=3 lower frequency cutof
f2=20 high frequency cutof
fr=5 frequency ramp
vel=1000 surface wave velocity
dx=10 trace spacing
maxmix=tr.ntr default is the entire gather
adb=1.0 add back ratio 1.0=pure filtered 0.0=origibal
tri=0 1 Triangular weight in mixing window
Notes:
The traces transformed into the freqiency domain
where a trace mix is performed in the specifed frequency range
as Mix = ve l/(freq*dx)
This program uses "get_gather" and "put_gather" so requires that
the data be sorted into ensembles designated by "key", with the ntr
field set to the number of traces in each respective ensemble.
Example:
susort ep offset < data.su > datasorted.su
suputgthr dir=Data verbose=1 < datasorted.su
sugetgthr dir=Data verbose=1 > dataupdated.su
sulfaf < dataupdated.su > ccfiltdata.su
(Work in progress, editing required)
define LOOKFAC 1 /* Look ahead factor for npfaro
define PFA_MAX 720720 /* Largest allowed nfft */
define PIP2 PI/2.0 /* IP/2 */
int
main( int argc, char *argv[] )
{
cwp_String key; /* header key word from segy.h */
cwp_String type; /* ... its type */
Value val; /* ... its value */
segy **rec_o; /* trace header+data matrix */
int first=0; /* true when we passed the first gather
int ng=0;
float dt; /* time sampling interval */
int nt; /* num time samples per trace */
int ntr; /* num of traces per ensemble */
int nfft=0; /* lenghth of padded array */
float snfft; /* scale factor for inverse fft
int nf=0; /* number of frequencies */
float d1; /* frequency sampling interval. */
float *rt=NULL; /* real trace */
complex *ct=NULL; /* complex trace */
float **ffdr=NULL; /* frequency domain data */
float **ffdi=NULL; /* frequency domain data */
float **ffdrm=NULL; /* frequency domain mixed data */
float **ffdim=NULL; /* frequency domain mixed data */
int verbose; /* flag: =0 silent; =1 chatty */
float f1; /* minimum frequency */
int if1; /* ... ... integerized */
float f2; /* maximum frequency */
int if2; /* ... ... integerized */
float fr; /* slope of frequency ramp */
int ifr; /* ... ... integerized */
float vel; /* velocity of guided waves */
float dx; /* spatial sampling intervall */
int maxmix; /* size of mix */
int tri; /* flag: =1 trianglular window */
float adb; /* add back ratio */
/* Initialize
initargs(argc, argv);
requestdoc(1);
if (!getparstring("key", &key)) key = "ep";
if (!getparfloat("f1", &f1)) f1 = 3.0;
if (!getparfloat("f2", &f2)) f2 = 20.0;
if (!getparfloat("dx", &dx)) dx = 10;
if (!getparfloat("vel", &vel)) vel = 1000;
if (!getparfloat("fr", &fr)) fr = 5;
if (!getparint("maxmix", &maxmix)) maxmix = -1;
if (!getparint("tri", &tri)) tri = 0;
if (!getparfloat("adb", &adb)) adb = 1.0;
( run in 2.827 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )