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

2D gravity inversion for the relief of a basin using a polygonal parametrization #149

Merged
merged 4 commits into from Nov 26, 2014

Conversation

Projects
None yet
2 participants
@leouieda
Member

leouieda commented Nov 24, 2014

Implements the PolygonalBasinGravity class in the gravmag.basin2d module. This class performs the inversion for the relief of a basin by representing it as a polygon. The x coordinates of the vertices are evenly spaced and their depths are the parameters inverted for. Fixes two extra vertices to the surface at the edges of the model space.

This class is a good tool to show off and teach gravity inversion and regularization. The different effects of damping, smoothness, and total variation can be clearly seen. It has very rudimentary functionality:

  • The top of the basin is assumed flat at a constant height.
  • The range of the basin in the x dimension is assumed to be xmin and xmax of the data.
  • Density is constant in the whole basin.

Below is the result of the cookbook recipe:

Example

Checklist:

  • Make tests for new code
  • Create/update docstrings
  • Code follows PEP8 style conventions
  • Code and docs have been spellchecked
  • Changelog entry
  • Include new dependencies in docs, requirements.txt, README
  • Documentation builds properly
  • All tests pass
  • Can be merged

leouieda added some commits Nov 24, 2014

PolygonalBasinGravity for 2D gravity inversion
Added a new class for 2D gravity inversion. Parameterizes the basin
relief by a polygon and estimates the z-coordinates of the vertices.

@leouieda leouieda added this to the 0.4 milestone Nov 24, 2014

@leouieda leouieda self-assigned this Nov 24, 2014

leouieda added some commits Nov 24, 2014

Permit setting model x limits
Need to edit the mesher.Polygon class to make .x and .y attributes into
properties.

leouieda added a commit that referenced this pull request Nov 26, 2014

Merge pull request #149 from fatiando/basin-polygon
2D gravity inversion for the relief of a basin using a polygonal parametrization

@leouieda leouieda merged commit 4f24c5e into master Nov 26, 2014

1 check passed

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

@leouieda leouieda deleted the basin-polygon branch Nov 26, 2014

@eusoubrasileiro

This comment has been minimized.

Contributor

eusoubrasileiro commented Nov 26, 2014

How about one of this with density increasing with depth by any function?
Would be difficult to calculate the answer?
On Nov 26, 2014 9:40 AM, "Leonardo Uieda" notifications@github.com wrote:

Merged #149 #149.


Reply to this email directly or view it on GitHub
#149 (comment).

@leouieda

This comment has been minimized.

Member

leouieda commented Nov 28, 2014

@eusoubrasileiro there is even some matlab code for that: http://software.seg.org/2014/0001/index.html Though the license for it is a bit weird, I don't think it restricts any kind of reuse (with attribution). If you want to give that a try, I can help with discussion 😄

One thing to think about: we treat physical properties as floats (or arrays in case of magnetization) in a dictionary, right? So how would we treat depth-varying density? One idea is to pass a function. But that would break all the plotting code for prisms, etc. Maybe pass 'density' as a float (this would be the starting/reference density) and another parameter like 'density-coeff' for the decay coefficient. That wouldn't break any of the existing code and the special functions that calculate with depth-varying density could look for this special property in the prism/polygon/etc.

@leouieda

This comment has been minimized.

Member

leouieda commented Nov 28, 2014

@eusoubrasileiro maybe we could open an issue for this discussion? Would like to do that, or should I?

@eusoubrasileiro

This comment has been minimized.

Contributor

eusoubrasileiro commented Dec 3, 2014

@leouieda master I have not forgotten that, so I opened the issue and copied the discussion #152 to keep track.

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