This repository was archived by the owner on Dec 22, 2021. It is now read-only.
Prism gravity consistent around the prism - #113
Merged
Merged
Conversation
Looping over field names and using getattr.
There is a singularity in the formula if the computation point is aligned with one of the vertices of the prism. The test now uses a grid that has points that coincide with the prism edges so that it catches this kind of error.
Implemented a test to check if this passes. Fails for now.
Made safe_atan2 and safe_log functions that correct the arctan2 quadrant and log(0) limit for the formula. Only test failing now if for tensor cross-components when points align with the prism edges in some faces.
There was a singularity when the computation point was aligned with one the corners of the prism on a certain side. Hacky fix by just moving the point slightly when that happens. Not the best fit but works reasonably. Had to reduce the accuracy of tests for these cases.
This is just a test module and doesn't need all the assertions for corner cases.
Conflicts: fatiando/gravmag/_prism_numpy.py test/test_gravmag_prism.py
leouieda
added a commit
that referenced
this pull request
Jul 18, 2014
Prism gravity consistent around the prism
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The gravitational fields of a prism should be consistent around it. There was a problem with the arctan2 quadrants and log(0)s. There is also a problem with the tensor cross-components when the computations point is aligned with one of the edges of the prism on a certain face. This last one was fixed by moving the point slightly when it happens. This doesn't give the best results and I had to reduce the accuracy of the tests for this.
Checklist: