-
Notifications
You must be signed in to change notification settings - Fork 71
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
Forward models of prisms gravity fields with Choclo #400
Conversation
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.
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.
Redesign the checker for singular points to make it simpler and fix the issue with Numba that made some tests to fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks great @santisoler 👍
Run checks for singular points using Numba jitted functions to speed up the for loops.
Thanks @LL-Geo! I just pushed a few fixes. We can ignore codecov failing: we have less code now, since was moved to Choclo, so codecov sees that we are running less coverage percentage, but we are actually testing everything we want to test. I'm merging this! |
Add a section to the prism forward modelling page in the user guide showing how we can compute all gravitational acceleration and tensor components of a single prism.
Replace the prisms gravity kernels for Choclo functions. Extend the capabilities of the
prism_gravity
function allowing to compute all the gravitational acceleration and tensor components. Add tests that compare Harmonica results against dumb Choclo calls and a Laplacian equation test for the diagonal components of the tensor. Ditch symmetry tests that were already covered by Choclo. Improve docstrings. Raise warning if any computation point falls in a singular point for the tensor components. Add tests for these new checks and warnings.