diff --git a/marchenko/marchenko.c b/marchenko/marchenko.c index 66a8e3975a6d529949ef8c2b7ecbe879f84e8003..1bb2ec0b60187cb726aab23c86967874942c03b6 100644 --- a/marchenko/marchenko.c +++ b/marchenko/marchenko.c @@ -793,7 +793,7 @@ nw, int nw_low, int nw_high, int mode, int reci, int nshots, int *ixpos, int np shared(iRN, dx, npe, nw, verbose) \ shared(Refl, Nfoc, reci, xrcv, xsrc, xsyn, fxsb, fxse, nxs, dxs) \ shared(nx, dxsrc, inx, k, nfreq, nw_low, nw_high) \ - shared(Fop, size, nts, ntfft, scl, ixrcv, ixsrc, stderr) \ + shared(Fop, size, nts, ntfft, scl, ixrcv, ixsrc) \ private(l, ix, j, m, i, sum, rtrace) { /* start of parallel region */ sum = (complex *)malloc(nfreq*sizeof(complex)); @@ -842,14 +842,13 @@ nw, int nw_low, int nw_high, int mode, int reci, int nshots, int *ixpos, int np if (isxcount[k] == 0) continue; ixsrc = k; inx = isxcount[ixsrc]; /* number of traces per reciprocal shot */ -// fprintf(stderr,"inx=%d for k=%d ixsrc=%d\n", inx, k, ixsrc); #pragma omp parallel default(none) \ shared(iRN, dx, nw, verbose) \ shared(Refl, Nfoc, reci, xrcv, xsrc, xsyn, fxsb, fxse, nxs, dxs) \ shared(nx, dxsrc, inx, k, nfreq, nw_low, nw_high) \ shared(reci_xrcv, reci_xsrc, ixmask) \ - shared(Fop, size, nts, ntfft, scl, ixrcv, ixsrc, stderr) \ + shared(Fop, size, nts, ntfft, scl, ixrcv, ixsrc) \ private(l, ix, j, m, i, sum, rtrace, ik, il) { /* start of parallel region */ sum = (complex *)malloc(nfreq*sizeof(complex)); @@ -866,9 +865,6 @@ nw, int nw_low, int nw_high, int mode, int reci, int nshots, int *ixpos, int np il = reci_xrcv[ixsrc*nxs+i]; ik = reci_xsrc[ixsrc*nxs+i]; ix = NINT((xsrc[il] - fxsb)/dxs); - //if (j==nw_low) { - // fprintf(stderr,"ixsrc=%d with il=%d and ik=%d and ix=%d mask=%f\n", ixsrc, il, ik, ix, ixmask[ixsrc]); - //} sum[j].r += Refl[il*nw*nx+m*nx+ik].r*Fop[l*nw*nxs+m*nxs+ix].r - Refl[il*nw*nx+m*nx+ik].i*Fop[l*nw*nxs+m*nxs+ix].i; sum[j].i += Refl[il*nw*nx+m*nx+ik].i*Fop[l*nw*nxs+m*nxs+ix].r + @@ -980,7 +976,7 @@ float fxse, float fxsb, float dxs, float dxsrc, float dx, int nshots, int *ixpos free(count); /* sort ixpos into increasing values */ -// qsort(ixpos, *npos, sizeof(int), compareInt); + qsort(ixpos, *npos, sizeof(int), compareInt); return; diff --git a/marchenko/readShotData.c b/marchenko/readShotData.c index fe6930303d17a5d470f81884a9ce40f019169e98..1e1e33c5aa34be3b35b800b3951f7f89a4213ba8 100644 --- a/marchenko/readShotData.c +++ b/marchenko/readShotData.c @@ -142,9 +142,9 @@ int readShotData(char *filename, float *xrcv, float *xsrc, float *zsrc, int *xnx /* if reci=1 or reci=2 source-receive reciprocity is used and traces are added */ if (reci != 0) { + for (k=0; k<nxs; k++) ixmask[k] = 1.0; for (k=0; k<nshots; k++) { ixsrc = NINT((xsrc[k] - fxsb)/dxs); - ixmask[ixsrc] = 1.0; nxrk = xnx[k]; for (l=0; l<nxrk; l++) { samercv = 0;