-
Notifications
You must be signed in to change notification settings - Fork 72
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
Warn for prism gravity tensor on singular points #401
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add Choclo as a required dependency of Harmonica and replace the current kernels for prisms gravity with the ones in Choclo.
Allow the `prism_gravity` function to compute the easting and northing components of the gravitational acceleration of prisms, using Choclo kernels for it. Add tests that compare with bare Choclo results. Remove the dispatcher and replace it with and `if`/`else` statement for selecting the parallelized or serialized jitted function.
Add tests against dumb Choclo calls and a Laplace equation test for the diagonal tensor components. Improve the warning on the docstring explaining the direction of `z`.
The tests in Choclo already cover those and they are more extensive.
Check if the gravity tensor components of a prism are being computed at any singular point. Choclo will return a ``np.nan`` on those points, but it's worth warning the user about it before they get the results. Add tests that check if the warnings are being raised on those cases.
7 tasks
Update the expected values after we updated the gravitational constant in Choclo.
Modify the test function that compares prism forward model with the analytic solution for an infinite slab: locate the observation point on top of the slab.
Rename forward_func variable to avoid confusion with the forward_func argument of the jit functions.
Move some details to a new Notes section, improve some definition of the parameters, improve the warning regarding the upward direction, add a References section.
Closing this, since I merged this branch into #400 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check if the gravity tensor components of a prism are being computed at any singular point. Choclo will return a
np.nan
on those points, but it's worth warning the user about it before they get the results. Add tests that check if the warnings are being raised on those cases.Relevant issues/PRs:
Merge after #400 is merged.
Await until fatiando/choclo#30 is merged and released.