From 9e02e76930b7b275d8498157f3b7244b99a45b8e Mon Sep 17 00:00:00 2001 From: JanThorbecke <janth@xs4all.nl> Date: Thu, 16 Jan 2020 17:45:56 +0100 Subject: [PATCH] time reverse for plane wave output file --- marchenko/marchenko_primaries.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/marchenko/marchenko_primaries.c b/marchenko/marchenko_primaries.c index 45ba4f5..d893a33 100644 --- a/marchenko/marchenko_primaries.c +++ b/marchenko/marchenko_primaries.c @@ -617,7 +617,15 @@ int main (int argc, char **argv) if (plane_wave) { writeDataIter("SRCplane.su", SRC, hdrs_out, ntfft, nxs, d2, f2, n2out, Nfoc, xsyn, zsyn, ixpos, npos, 0, NINT(src_angle)); - writeDataIter("DDplane.su", DD, hdrs_out, ntfft, nxs, d2, f2, n2out, Nfoc, xsyn, zsyn, ixpos, npos, 0, NINT(src_angle)); + /* make DD causal again and undo the -1 multplication */ + for (l=0; l<nshots; l++) { + j=0; + SRC[l*nts+j] = -1.0*DD[l*nts+j]; + for (j = 1; j < nts; j++) { + SRC[l*nts+j] = -1.0*DD[l*nts+nts-j]; + } + } + writeDataIter("DDplane.su", SRC, hdrs_out, ntfft, nxs, d2, f2, n2out, Nfoc, xsyn, zsyn, ixpos, npos, 0, NINT(src_angle)); } free(SRC); -- GitLab