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

Normal gravity formulae and numerical values for reference ellipsoids #133

Merged
merged 9 commits into from Oct 24, 2014

Conversation

Projects
None yet
4 participants
@leouieda
Member

leouieda commented Oct 21, 2014

This PR implements functions to calculate the normal gravity field (gravity of a reference ellipsoid). This includes the "centrifugal" component.

Functions:

  • gamma_somigliana calculates using the Somigliana formula
  • gamma_somigliana_free_air calculates at a height using the Somigliana formula plus the free-air correction
  • gamma_closed_form calculates anywhere using the closed form expression.
  • bouguer_plate calculates the gravitational attraction of the infinite Bouguer plate

The ellipsoid can be passed to the gravity functions as a keyword argument. Ellipsoids are represented by the ReferenceEllipsoid class, which takes a, f, GM, omega as arguments. Other physical parameters of the ellipsoid are computed based on these 4 using properties. Instances of RefereceEllipsoid with the values for WGS84 are present in the module:

>>> from fatiando.gravmag.normal_gravity import WGS84
>>> WGS84.a
6378137
>>> WGS85.gamma_a  # normal gravity at the equator
9.7803253359

Checklist:

  • Make tests for new code
  • Create/update docstrings
  • Changelog entry
  • Documentation builds properly
  • All tests pass
  • Can be merged
@coveralls

This comment has been minimized.

coveralls commented Oct 21, 2014

Coverage Status

Changes Unknown when pulling 4bf840e on normal-gravity into * on master*.

@leouieda

This comment has been minimized.

Member

leouieda commented Oct 22, 2014

@birocoles que tal? Vou começar a usar isso nas aulas. Veja se falta algo. Se quiser adicionar alguma coisa é só fazer commit nesse branch mesmo (assim ele adiciona no pull request).

@leouieda leouieda added this to the 0.3 milestone Oct 22, 2014

@eusoubrasileiro

This comment has been minimized.

Contributor

eusoubrasileiro commented Oct 22, 2014

Humm... tava precisando, obrigado. rs

2014-10-21 22:05 GMT-02:00 Leonardo Uieda notifications@github.com:

@birocoles https://github.com/birocoles que tal? Vou começar a usar
isso nas aulas. Veja se falta algo. Se quiser adicionar alguma coisa é só
fazer commit nesse branch mesmo (assim ele adiciona no pull request).


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

Bem, faça sua escolha. As torturas ocorrem. Se elas são desnecessária,
então não há nenhum Deus, tampouco um Deus mau. Se há um Deus bom, então
torturas são necessárias. Pois nenhum Ser que fosse bom, mesmo de maneira
comedida provavelmente não seria capaz de as infringir ou de as permitir
caso elas não fossem necessárias. C. S. Lewis - A Grief Observed

@leouieda

This comment has been minimized.

Member

leouieda commented Oct 22, 2014

Hahaha de uma olhada aí se acha que falta algo.

@eusoubrasileiro

This comment has been minimized.

Contributor

eusoubrasileiro commented Oct 22, 2014

amanha, vou ver se olho. Uns dados velhos da Petrobras marinhos pra coisar...

@coveralls

This comment has been minimized.

coveralls commented Oct 22, 2014

Coverage Status

Changes Unknown when pulling 7e46212 on normal-gravity into * on master*.

@coveralls

This comment has been minimized.

coveralls commented Oct 22, 2014

Coverage Status

Changes Unknown when pulling 50eebbc on normal-gravity into * on master*.

@leouieda

This comment has been minimized.

Member

leouieda commented Oct 22, 2014

@birocoles @eusoubrasileiro acho que o básico está tudo ai ne? Se achar algo gritante que esteja faltando avisem. Queria dar um merge logo nisso para poder usar em conjunto com o Grid (#128) Podemos adicionar mais coisas depois conforme necessário.

@birocoles

This comment has been minimized.

Member

birocoles commented on f2bcb6b Oct 23, 2014

Perfeito @leouieda !

@leouieda

This comment has been minimized.

Member

leouieda commented Oct 23, 2014

@birocoles posso dar um merge?

@eusoubrasileiro

This comment has been minimized.

Contributor

eusoubrasileiro commented Oct 24, 2014

sire

I am getting this error:

in ()
----> 1 execfile('cookbook/gravmag_normal_gravity.py')

/hd0/DevPython/fatiando/fatiando/cookbook/gravmag_normal_gravity.py in ()
32
33 mpl.figure(figsize=(14, 3.5))
---> 34 bm = mpl.basemap(area, projection='merc')
35 mpl.subplot(131)
36 mpl.title('Gravity (mGal)')

/hd0/DevPython/fatiando/fatiando/fatiando/vis/mpl.pyc in basemap(area, projection, resolution)
497 if Basemap is None:
498 try:
--> 499 from mpl_toolkits.basemap import Basemap
500 except ImportError:
501 raise

ImportError: No module named basemap

Did I miss something?

@leouieda

This comment has been minimized.

Member

leouieda commented Oct 24, 2014

You don't have basemap installed. Run conda install basemap
On Oct 24, 2014 9:15 AM, "André" notifications@github.com wrote:

sire

I am getting this error:

in ()
----> 1 execfile('cookbook/gravmag_normal_gravity.py')

/hd0/DevPython/fatiando/fatiando/cookbook/gravmag_normal_gravity.py in ()
32
33 mpl.figure(figsize=(14, 3.5))
---> 34 bm = mpl.basemap(area, projection='merc')
35 mpl.subplot(131)
36 mpl.title('Gravity (mGal)')

/hd0/DevPython/fatiando/fatiando/fatiando/vis/mpl.pyc in basemap(area,
projection, resolution)
497 if Basemap is None:
498 try:
--> 499 from mpl_toolkits.basemap import Basemap
500 except ImportError:
501 raise

ImportError: No module named basemap

Did I miss something?


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

@eusoubrasileiro

This comment has been minimized.

Contributor

eusoubrasileiro commented Oct 24, 2014

heehe :-( sorry

@eusoubrasileiro

This comment has been minimized.

Contributor

eusoubrasileiro commented Oct 24, 2014

Show!

@leouieda

This comment has been minimized.

Member

leouieda commented Oct 24, 2014

Funcionou?
On Oct 24, 2014 9:24 AM, "André" notifications@github.com wrote:

Show!


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

@eusoubrasileiro

This comment has been minimized.

Contributor

eusoubrasileiro commented Oct 24, 2014

Sim, perfeitamente!

@eusoubrasileiro

This comment has been minimized.

Contributor

eusoubrasileiro commented Oct 24, 2014

very cool, testei também com meu data-set aqui marinho, vou só fazer um quality control melhor com o pandas. show! Quem precisa do OASIS?! Ia fazer no excel.. mesmo mas melhor..

leouieda added a commit that referenced this pull request Oct 24, 2014

Merge pull request #133 from fatiando/normal-gravity
Normal gravity formulae and numerical values for reference ellipsoids

@leouieda leouieda merged commit 851c327 into master Oct 24, 2014

1 check passed

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

@leouieda leouieda deleted the normal-gravity branch Nov 8, 2014

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