Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: fix sampling when not given #631

Merged
merged 3 commits into from
Dec 17, 2024

Conversation

AmirMardan
Copy link
Contributor

For trace interpolation, it is necessary to define either sampling or both taxis and spataxis. In case of using the latter, the function SeismicInterpolation is supposed to calculate the sampling. However, the calculated sampling was always [0, 0].

This PR fixes this problem.

@AmirMardan
Copy link
Contributor Author

Please note that this modification is applied only for 2D problems. It seems, the same modification should be applied to 3D, here

@mrava87
Copy link
Collaborator

mrava87 commented Dec 17, 2024

@AmirMardan oh yeah, good spot 😄 it should have been

 sampling = (
                        np.abs(spataxis[1] - spataxis[0]),
                        np.abs(taxis[1] - taxis[0]),
                    )

but since these are pre-computed above, your fix is actually better. Do you mind push the same change for the 3D case before I merge the PR?

@AmirMardan
Copy link
Contributor Author

AmirMardan commented Dec 17, 2024

@mrava87 It's done

@mrava87 mrava87 merged commit bbc5bd2 into PyLops:dev Dec 17, 2024
13 checks passed
@AmirMardan AmirMardan deleted the bug-fix_sampling_when_not_given branch December 17, 2024 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants