From f8cc8e90c655d3f8ec5b18fbc8bccc16a661199e Mon Sep 17 00:00:00 2001 From: Amir Mardan <46511946+AmirMardan@users.noreply.github.com> Date: Fri, 13 Dec 2024 11:13:47 -0500 Subject: [PATCH 1/3] when `sampling` is not given, it's calculated based on `spataxis` and `taxis` --- pylops/waveeqprocessing/seismicinterpolation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pylops/waveeqprocessing/seismicinterpolation.py b/pylops/waveeqprocessing/seismicinterpolation.py index 7fb22433..68b3e323 100644 --- a/pylops/waveeqprocessing/seismicinterpolation.py +++ b/pylops/waveeqprocessing/seismicinterpolation.py @@ -272,8 +272,8 @@ def SeismicInterpolation( ) else: sampling = ( - np.abs(spataxis[1] - spataxis[1]), - np.abs(taxis[1] - taxis[1]), + np.abs(spataxis[1] - spataxis[0]), + np.abs(taxis[1] - taxis[0]), ) Pop = FFT2D(dims=dims, nffts=nffts, sampling=sampling) Pop = Pop.H From 86c38dbdb35d6a4209ee459cd9e48420e653c68b Mon Sep 17 00:00:00 2001 From: Amir Mardan <46511946+AmirMardan@users.noreply.github.com> Date: Fri, 13 Dec 2024 11:15:55 -0500 Subject: [PATCH 2/3] instead of recalculation, we use the precalculated sampling values --- pylops/waveeqprocessing/seismicinterpolation.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pylops/waveeqprocessing/seismicinterpolation.py b/pylops/waveeqprocessing/seismicinterpolation.py index 68b3e323..67c17f48 100644 --- a/pylops/waveeqprocessing/seismicinterpolation.py +++ b/pylops/waveeqprocessing/seismicinterpolation.py @@ -271,10 +271,7 @@ def SeismicInterpolation( f"and taxis for kind={kind}" ) else: - sampling = ( - np.abs(spataxis[1] - spataxis[0]), - np.abs(taxis[1] - taxis[0]), - ) + sampling = (dspat, dt) Pop = FFT2D(dims=dims, nffts=nffts, sampling=sampling) Pop = Pop.H SIop = Rop * Pop From dfc2c7a1278b912009aaab33e3b290968a2d9528 Mon Sep 17 00:00:00 2001 From: Amir Mardan <46511946+AmirMardan@users.noreply.github.com> Date: Tue, 17 Dec 2024 11:53:10 -0500 Subject: [PATCH 3/3] fix the sampling issue for 3D --- pylops/waveeqprocessing/seismicinterpolation.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pylops/waveeqprocessing/seismicinterpolation.py b/pylops/waveeqprocessing/seismicinterpolation.py index 67c17f48..e1159d4a 100644 --- a/pylops/waveeqprocessing/seismicinterpolation.py +++ b/pylops/waveeqprocessing/seismicinterpolation.py @@ -256,11 +256,7 @@ def SeismicInterpolation( f"spat1axis and taxis for kind=%{kind}" ) else: - sampling = ( - np.abs(spataxis[1] - spataxis[1]), - np.abs(spat1axis[1] - spat1axis[1]), - np.abs(taxis[1] - taxis[1]), - ) + sampling = (dspat, dspat1, dt) Pop = FFTND(dims=dims, nffts=nffts, sampling=sampling) Pop = Pop.H else: