Skip to content

Commit

Permalink
Add note on projecting a grid to geographic coords
Browse files Browse the repository at this point in the history
  • Loading branch information
santisoler committed Feb 11, 2023
1 parent 1554a71 commit e812e34
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion doc/user_guide/transformations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ Harmonica offers some functions to apply FFT-based (Fast Fourier Transform)
transformations to regular grids of gravity and magnetic fields located at
a constant height.

In order to apply these grid transformations, we first need a regular grid.
In order to apply these grid transformations, we first need a **regular grid in
Cartesians coordinates**.
Let's download a magnetic anomaly grid over the Lightning Creek Sill Complex,
Australia, readily available in :mod:`ensaio`.
We can load the data file using :mod:`xarray`:
Expand All @@ -33,6 +34,13 @@ And plot it:
plt.colorbar(tmp, label="nT")
plt.show()

.. seealso::

In case we have a regular grid defined in geographic coordinates (longitude,
latitude) we can project them to Cartesian coordinates using the
:func:`verde.project_grid` function and a map projection like the ones
available in :mod:`pyproj`.

Since all the grid transformations we are going to apply are based on FFT
methods, we usually want to pad them in order their increase the accuracy.
We can easily do it through the :func:`xrft.pad` function.
Expand Down

0 comments on commit e812e34

Please sign in to comment.