Skip to content
This repository was archived by the owner on Dec 22, 2021. It is now read-only.

Prism gravity consistent around the prism - #113

Merged
leouieda merged 11 commits into
masterfrom
prism-around
Jul 18, 2014
Merged

Prism gravity consistent around the prism#113
leouieda merged 11 commits into
masterfrom
prism-around

Conversation

@leouieda

Copy link
Copy Markdown
Member

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 4 commits July 17, 2014 15:23
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.
@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
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

Copy link
Copy Markdown

Coverage Status

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

@coveralls

Copy link
Copy Markdown

Coverage Status

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

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

Copy link
Copy Markdown

Coverage Status

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

Conflicts:
	fatiando/gravmag/_prism_numpy.py
	test/test_gravmag_prism.py
@coveralls

Copy link
Copy Markdown

Coverage Status

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

@coveralls

Copy link
Copy Markdown

Coverage Status

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

@coveralls

Copy link
Copy Markdown

Coverage Status

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

@coveralls

Copy link
Copy Markdown

Coverage Status

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

@coveralls

Copy link
Copy Markdown

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
Prism gravity consistent around the prism
@leouieda
leouieda merged commit 0b1b429 into master Jul 18, 2014
@leouieda
leouieda deleted the prism-around branch July 21, 2014 16:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants