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

Normal gravity formulae and numerical values for reference ellipsoids #133

Merged
leouieda merged 9 commits intomasterfrom
normal-gravity
Oct 24, 2014
Merged

Normal gravity formulae and numerical values for reference ellipsoids #133
leouieda merged 9 commits intomasterfrom
normal-gravity

Conversation

@leouieda
Copy link
Copy Markdown
Member

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
Copy link
Copy Markdown

Coverage Status

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

@leouieda
Copy link
Copy Markdown
Member Author

@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
Copy link
Copy Markdown
Contributor

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
Copy link
Copy Markdown
Member Author

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

@eusoubrasileiro
Copy link
Copy Markdown
Contributor

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

@coveralls
Copy link
Copy Markdown

Coverage Status

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

@coveralls
Copy link
Copy Markdown

Coverage Status

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

@leouieda
Copy link
Copy Markdown
Member Author

@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.

@leouieda
Copy link
Copy Markdown
Member Author

@birocoles posso dar um merge?

@eusoubrasileiro
Copy link
Copy Markdown
Contributor

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
Copy link
Copy Markdown
Member Author

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
Copy link
Copy Markdown
Contributor

heehe :-( sorry

@eusoubrasileiro
Copy link
Copy Markdown
Contributor

Show!

@leouieda
Copy link
Copy Markdown
Member Author

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
Copy link
Copy Markdown
Contributor

Sim, perfeitamente!

@eusoubrasileiro
Copy link
Copy Markdown
Contributor

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
Normal gravity formulae and numerical values for reference ellipsoids
@leouieda leouieda merged commit 851c327 into master Oct 24, 2014
@leouieda leouieda deleted the normal-gravity branch November 8, 2014 13:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants