Skip to content
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

Make gravity units more explicit #421

Merged
merged 4 commits into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion harmonica/_forward/prism.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def prism_gravity(
progressbar=False,
disable_checks=False,
):
"""
r"""
Gravitational fields of right-rectangular prisms in Cartesian coordinates

Compute the gravitational potential, gravitational acceleration and tensor
Expand All @@ -76,6 +76,14 @@ def prism_gravity(
i.e. the ``g_ez`` is the non-diagonal **easting-downward** tensor
component.

.. important::

- The gravitational potential is returned in
:math:`\text{J}/\text{kg}`.
- The gravity acceleration components are returned in mgal
(:math:`\text{m}/\text{s}^2`).
- The tensor components are returned in Eotvos (:math:`\text{s}^{-2}`).

Parameters
----------
coordinates : list of arrays
Expand Down Expand Up @@ -124,6 +132,8 @@ def prism_gravity(
-------
result : array
Gravitational field generated by the prisms on the computation points.
Gravitational potential is returned in :math:`\text{J}/\text{kg}`,
acceleration components in mgal, and tensor components in Eotvos.

Notes
-----
Expand Down
12 changes: 10 additions & 2 deletions harmonica/_forward/tesseroid.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def tesseroid_gravity(
dtype=np.float64,
disable_checks=False,
):
"""
r"""
Compute gravitational field of tesseroids on computation points.

.. warning::
Expand All @@ -51,6 +51,13 @@ def tesseroid_gravity(
It is equivalent to the opposite of the radial component, therefore
it's positive if the acceleration vector points inside the spheroid.

.. important::

- The gravitational potential is returned in
:math:`\text{J}/\text{kg}`.
- The gravity acceleration components are returned in mgal
(:math:`\text{m}/\text{s}^2`).

Parameters
----------
coordinates : list of arrays
Expand Down Expand Up @@ -102,7 +109,8 @@ def tesseroid_gravity(
-------
result : array
Gravitational field generated by the tesseroids on the computation
points.
points. Gravitational potential is returned in
:math:`\text{J}/\text{kg}` and acceleration components in mgal.

References
----------
Expand Down
Loading