Skip to content
Snippets Groups Projects
Commit b87fb15f authored by Jan Thorbecke's avatar Jan Thorbecke
Browse files

added optional Q correction

parent b7246c2f
No related branches found
No related tags found
No related merge requests found
No preview for this file type
......@@ -16,7 +16,8 @@ int optncr(int n);
void cc1fft(complex *data, int n, int sign);
void rc1fft(float *rdata, complex *cdata, int n, int sign);
int readShotData(char *filename, float *xrcv, float *xsrc, float *zsrc, int *xnx, complex *cdata, int nw, int nw_low, int nshots, int nx, int nxs, float fxsb, float dxs, int ntfft, int mode, float scale, float tsq, int reci, int *nshots_r, int *isxcount, int *reci_xsrc, int *reci_xrcv, float *ixmask, int verbose)
int readShotData(char *filename, float *xrcv, float *xsrc, float *zsrc, int *xnx, complex *cdata, int nw, int nw_low, int nshots,
int nx, int nxs, float fxsb, float dxs, int ntfft, int mode, float scale, float tsq, float Q, float f0, int reci, int *nshots_r, int *isxcount, int *reci_xsrc, int *reci_xrcv, float *ixmask, int verbose)
{
FILE *fp;
segy hdr;
......@@ -102,6 +103,13 @@ int readShotData(char *filename, float *xrcv, float *xsrc, float *zsrc, int *xnx
}
}
/* Q-correction */
if (Q != 0.0 && f0 != 0.0) {
for (iw=0; iw<nt; iw++) {
trace[iw] *= expf(((dt*iw)*M_PI*f0)/Q);
}
}
/* transform to frequency domain */
if (ntfft > hdr.ns)
memset( &trace[nt-1], 0, sizeof(float)*(ntfft-nt) );
......
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