Skip to content
Snippets Groups Projects
Commit c7081108 authored by JanThorbecke's avatar JanThorbecke
Browse files

cleaning

parent 0c744ccc
No related branches found
No related tags found
No related merge requests found
...@@ -283,7 +283,7 @@ int getParameters(modPar *mod, recPar *rec, snaPar *sna, wavPar *wav, srcPar *sr ...@@ -283,7 +283,7 @@ int getParameters(modPar *mod, recPar *rec, snaPar *sna, wavPar *wav, srcPar *sr
/* Check stability and dispersion setting */ /* Check stability and dispersion setting */
if (cp_max > dx*stabfactor/dt) { if (cp_max > (dx*stabfactor)/dt) {
vwarn("************ ! Stability ! ****************"); vwarn("************ ! Stability ! ****************");
vwarn("From the input file maximum P-wave velocity"); vwarn("From the input file maximum P-wave velocity");
vwarn("in the current model is %f !!", cp_max); vwarn("in the current model is %f !!", cp_max);
......
...@@ -41,7 +41,7 @@ int getWaveletInfo(char *file_src, int *n1, int *n2, float *d1, float *d2, float ...@@ -41,7 +41,7 @@ int getWaveletInfo(char *file_src, int *n1, int *n2, float *d1, float *d2, float
off_t bytes; off_t bytes;
int ret, one_shot, ntraces; int ret, one_shot, ntraces;
int optn, nfreq, i, iwmax; int optn, nfreq, i, iwmax;
float *trace; float *trace, df;
float ampl, amplmax, tampl, tamplmax; float ampl, amplmax, tampl, tamplmax;
complex *ctrace; complex *ctrace;
segy hdr; segy hdr;
...@@ -73,8 +73,9 @@ int getWaveletInfo(char *file_src, int *n1, int *n2, float *d1, float *d2, float ...@@ -73,8 +73,9 @@ int getWaveletInfo(char *file_src, int *n1, int *n2, float *d1, float *d2, float
/* check to find out number of traces in shot gather */ /* check to find out number of traces in shot gather */
optn = optncr(*n1); optn = optncr(*n1);
nfreq = optn/2 + 1; nfreq = optn/2 + 1;
df = 1.0/(optn*(*d1));
ctrace = (complex *)malloc(nfreq*sizeof(complex)); ctrace = (complex *)malloc(nfreq*sizeof(complex));
one_shot = 1; one_shot = 1;
trace = (float *)malloc(optn*sizeof(float)); trace = (float *)malloc(optn*sizeof(float));
...@@ -107,12 +108,13 @@ int getWaveletInfo(char *file_src, int *n1, int *n2, float *d1, float *d2, float ...@@ -107,12 +108,13 @@ int getWaveletInfo(char *file_src, int *n1, int *n2, float *d1, float *d2, float
iwmax = i; iwmax = i;
} }
} }
/* from the maximum amplitude position look for the largest frequency /* from the maximum amplitude position look for the largest frequency
* which has an amplitude 400 times weaker than the maximum amplitude */ * which has an amplitude 400 times weaker than the maximum amplitude */
for (i=iwmax;i<nfreq;i++) { for (i=iwmax;i<nfreq;i++) {
ampl = sqrt(ctrace[i].r*ctrace[i].r+ctrace[i].i*ctrace[i].i); ampl = sqrt(ctrace[i].r*ctrace[i].r+ctrace[i].i*ctrace[i].i);
if (400*ampl < amplmax) { if (400*ampl < amplmax) {
*fmax = (i-1)*(1.0/(optn*(*d1))); *fmax = (i-1)*df;
break; break;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment