-
Notifications
You must be signed in to change notification settings - Fork 0
/
Mtest2.c
45 lines (29 loc) · 1.05 KB
/
Mtest2.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/* AVF Forward Program Using Convolution Model in Frequency Domain. */
/**************************************************************************
* Copyright(C), SINOPEC Geophysical Research Institute, Nanjing, CN
*
* History
***************************************************************************/
#include <rsf.h>
#include "su_alloc.h"
#include "lh_readwrite.h"
#include "lh_wavelet.h"
#include "lh_bayesian.h"
int main( int argc , char* argv[] )
{
sf_init( argc , argv );
float *wavelet, *hwave, *fre;
wavelet = alloc1float( 200 );
hwave = alloc1float( 200 );
fre = alloc1float( 200 );
lh_unit_ricker_nonzero_phase( wavelet , 200 , 0.002 , 25 , 0.2 , 330 );
lh_write_1d_float_bin( wavelet , 200 , "waveler.bin" );
lh_signal_phase( wavelet , hwave , 1 , 200 );
lh_write_1d_float_bin( hwave , 200 , "phase.bin" );
lh_signal_frequency( hwave , fre , 0.002 , 200 );
int i;
for( i=0 ; i<200 ; i++)
fre[i] = fre[i]*sqrt(SF_PI)*0.5;
lh_write_1d_float_bin( fre , 200 , "freq.bin" );
exit( 0 );
}