Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mdtanker committed Nov 19, 2023
1 parent 11a397e commit b7d3849
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 31 deletions.
7 changes: 4 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ py -m install -v -e .[dev]

If mamba isn't installed:

```python
```
conda install mamba
```

Then create the environment with the inclused Makefile commands:

```python
```
make create
conda activate invert4geom
make install
Expand All @@ -75,7 +75,8 @@ pip install pre-commit # or brew install pre-commit on macOS
pre-commit install # Will install a pre-commit hook into the git repo
```

You can also/alternatively run `make lint` to check even without installing the hook.
You can also/alternatively run `make lint` to check even without installing the
hook.

# Testing

Expand Down
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# invert4geom


[![Actions Status][actions-badge]][actions-link]
[![Documentation Status][rtd-badge]][rtd-link]

Expand All @@ -10,14 +9,20 @@

[![GitHub Discussion][github-discussions-badge]][github-discussions-link]


<!-- SPHINX-START -->

**Invert4geom** is a Python library for performing 3D geometric gravity inversions, where the aim is to recover the geometry of a density contrast.
**Invert4geom** is a Python library for performing 3D geometric gravity
inversions, where the aim is to recover the geometry of a density contrast.

Typical use cases include modeling the topography of the Moho, the sediment-basement contact, or bathymetry. These density contrasts are represented by a layer of vertical right-rectangular prisms. Since we use vertical prisms, they don't take the curvature of the Earth into account. For large-scale applications, such as continental studies, it would be better to use tesseroids instead of prisms.
Typical use cases include modeling the topography of the Moho, the
sediment-basement contact, or bathymetry. These density contrasts are
represented by a layer of vertical right-rectangular prisms. Since we use
vertical prisms, they don't take the curvature of the Earth into account. For
large-scale applications, such as continental studies, it would be better to use
tesseroids instead of prisms.

See the [overview](overview.md) for further description of this package and what it can be used for.
See the [overview](overview.md) for further description of this package and what
it can be used for.

The tutorials

Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@

add_module_names = False

add_function_parentheses = False
add_function_parentheses = False
21 changes: 11 additions & 10 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,32 +28,33 @@ Source code on GitHub <https://github.com/mdtanker/invert4geom>
:start-after: <!-- SPHINX-START -->
```

::::{grid} 2
:::{grid-item-card} {octicon}`rocket` Getting started?
:text-align: center
New to Invert4geom? Start here!
::::{grid} 2 :::{grid-item-card} {octicon}`rocket` Getting started? :text-align:
center New to Invert4geom? Start here!

```{button-ref} overview
:click-parent:
:color: primary
:outline:
:expand:
```

:::

:::{grid-item-card} {octicon}`comment-discussion` Need help?
:text-align: center
:::{grid-item-card} {octicon}`comment-discussion` Need help? :text-align: center
Start a discussion on GitHub!

```{button-link} https://github.com/mdtanker/invert4geom/discussions
:click-parent:
:color: primary
:outline:
:expand:
Discussions
```

:::

:::{grid-item-card} {octicon}`file-badge` Reference documentation
:text-align: center
:::{grid-item-card} {octicon}`file-badge` Reference documentation :text-align:
center

A list of modules and functions

Expand All @@ -63,6 +64,7 @@ A list of modules and functions
:outline:
:expand:
```

:::

:::{grid-item-card} {octicon}`bookmark` Using Invert4geom for research?
Expand All @@ -76,6 +78,7 @@ Citations help support our work
:outline:
:expand:
```

:::

::::
Expand All @@ -102,8 +105,6 @@ how you can contribute to the project.
*Many parts of this documentation was adapted from the* [Fatiando project](https://www.fatiando.org/).
```



## Indices and tables

- {ref}`genindex`
Expand Down
2 changes: 1 addition & 1 deletion docs/install.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# Install
# Install
2 changes: 1 addition & 1 deletion docs/overview.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# Overview
# Overview
2 changes: 1 addition & 1 deletion docs/template/module.rst_t
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
.. automodule:: {{ qualname }}
{%- for option in automodule_options %}
:{{ option }}:
{%- endfor %}
{%- endfor %}
2 changes: 1 addition & 1 deletion docs/template/package.rst_t
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ Module contents
---------------

{{ automodule(pkgname, automodule_options) }}
{% endif %}
{% endif %}
2 changes: 1 addition & 1 deletion docs/template/toc.rst_t
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
:maxdepth: {{ maxdepth }}
{% for docname in docnames %}
{{ docname }}
{%- endfor %}
{%- endfor %}
14 changes: 7 additions & 7 deletions src/invert4geom/inversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,19 +103,19 @@ def jacobian_annular(
jac: NDArray,
) -> NDArray:
"""
Function to calculate the Jacobian matrix using the annular cylinder approximation
The resulting Jacobian is a matrix (numpy array) with a row per gravity observation
and a column per prism. This approximates the prisms as an annulus, and calculates
it's vertical gravity derivative.
Takes arrays from `jacobian`, feeds them into `grav_column_der`, and returns
the jacobian.
Function to calculate the Jacobian matrix using the annular cylinder
approximation. The resulting Jacobian is a matrix (numpy array) with a row per
gravity observation and a column per prism. This approximates the prisms as an
annulus, and calculates it's vertical gravity derivative. Takes arrays from
`jacobian`, feeds them into `grav_column_der`, and returns the jacobian.
Parameters
----------
grav_easting, grav_northing, grav_upward : NDArray
coordinates of gravity observation points.
prism_easting, prism_northing, prism_top, : NDArray
coordinates of prism's center in northing, easting, and upward directions, respectively
coordinates of prism's center in northing, easting, and upward directions,
respectively
prism_density : NDArray
density of prisms, in kg/m^3
prism_spacing : float
Expand Down

0 comments on commit b7d3849

Please sign in to comment.