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

Prism gravity consistent around the prism #113

Merged
merged 11 commits into from Jul 18, 2014

Conversation

Projects
None yet
2 participants
@leouieda
Member

leouieda commented Jul 17, 2014

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:

  • Create/update docstrings
  • Make tests for new code
  • All tests pass
  • Can be merged
  • Changelog entry

leouieda added some commits Jul 17, 2014

Condensed gravmag.prism tests into a single func
Looping over field names and using getattr.
Bx component for prism fails in point on vertices
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.
Prism gravity must be consistent around prism
Implemented a test to check if this passes. Fails for now.
Fix prism around tests and most tests pass
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.

@leouieda leouieda added the bug label Jul 17, 2014

@leouieda leouieda self-assigned this Jul 17, 2014

@leouieda leouieda added this to the 0.3 milestone Jul 17, 2014

Fix prism tensor cross-components
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.
@coveralls

This comment has been minimized.

coveralls commented Jul 17, 2014

Coverage Status

Coverage decreased (-0.57%) when pulling 0565fd6 on prism-around into 8d73fdd on master.

@coveralls

This comment has been minimized.

coveralls commented Jul 17, 2014

Coverage Status

Coverage decreased (-0.57%) when pulling 0565fd6 on prism-around into 8d73fdd on master.

Removed unused assertions from _prism_numpy
This is just a test module and doesn't need all the assertions for
corner cases.
@coveralls

This comment has been minimized.

coveralls commented Jul 18, 2014

Coverage Status

Coverage decreased (-0.8%) when pulling 1b94c53 on prism-around into 8d73fdd on master.

Merge branch 'master' into prism-around
Conflicts:
	fatiando/gravmag/_prism_numpy.py
	test/test_gravmag_prism.py
@coveralls

This comment has been minimized.

coveralls commented Jul 18, 2014

Coverage Status

Coverage decreased (-0.8%) when pulling 44f863c on prism-around into c04a6a5 on master.

@coveralls

This comment has been minimized.

coveralls commented Jul 18, 2014

Coverage Status

Coverage decreased (-0.8%) when pulling 5a89ac9 on prism-around into c04a6a5 on master.

@coveralls

This comment has been minimized.

coveralls commented Jul 18, 2014

Coverage Status

Coverage decreased (-0.8%) when pulling 5a89ac9 on prism-around into c04a6a5 on master.

@coveralls

This comment has been minimized.

coveralls commented Jul 18, 2014

Coverage Status

Coverage increased (+0.32%) when pulling 9aa6506 on prism-around into c04a6a5 on master.

@coveralls

This comment has been minimized.

coveralls commented Jul 18, 2014

Coverage Status

Coverage increased (+0.46%) when pulling 4c49a15 on prism-around into c04a6a5 on master.

leouieda added a commit that referenced this pull request Jul 18, 2014

Merge pull request #113 from leouieda/prism-around
Prism gravity consistent around the prism

@leouieda leouieda merged commit 0b1b429 into master Jul 18, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details

@leouieda leouieda deleted the prism-around branch Jul 21, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment