Skip to content
Open
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
1 change: 0 additions & 1 deletion .github/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ dependencies:
- numba>=0.57
- xarray>=2022.03
- verde>=1.9.0
- xrft>=1.0
- choclo>=0.1
- boule>=0.6.0
- bordado>=0.4.0
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,8 @@ Things that will *not* be covered in Harmonica:
- Multi-physics partial differential equation solvers. Use
[SimPEG](http://www.simpeg.xyz/) or [PyGIMLi](https://www.pygimli.org/)
instead.
- Generic grid processing methods (like FFT and standard interpolation).
We'll rely on [Verde](https://www.fatiando.org/verde),
[xrft](https://xrft.readthedocs.io/en/latest/) and
- Generic grid processing methods (like standard interpolation).
We'll rely on [Verde](https://www.fatiando.org/verde) and
[xarray](https://xarray.dev) for those.
- Data visualization.
- GUI applications.
Expand Down
11 changes: 9 additions & 2 deletions doc/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,15 @@ Define filters in the frequency domain.
filters.gaussian_highpass_kernel
filters.reduction_to_pole_kernel

Use :func:`xrft.xrft.fft` and :func:`xrft.xrft.ifft` to apply Fast-Fourier
Transforms and its inverse on :class:`xarray.DataArray`.
FFT and padding functions that can be used with 2D :class:`xarray.DataArray`:

.. autosummary::
:toctree: generated/

filters.fft
filters.ifft
filters.pad
filters.unpad

Equivalent Sources
------------------
Expand Down
1 change: 0 additions & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
"scipy": ("https://docs.scipy.org/doc/scipy/reference", None),
"pandas": ("http://pandas.pydata.org/pandas-docs/stable/", None),
"xarray": ("http://xarray.pydata.org/en/stable/", None),
"xrft": ("https://xrft.readthedocs.io/en/stable/", None),
"pooch": ("https://www.fatiando.org/pooch/latest/", None),
"ensaio": ("https://www.fatiando.org/ensaio/latest/", None),
"verde": ("https://www.fatiando.org/verde/latest/", None),
Expand Down
3 changes: 1 addition & 2 deletions doc/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ Required:
* `verde <http://www.fatiando.org/verde/>`__
* `bordado <http://www.fatiando.org/bordado/>`__
* `boule <http://www.fatiando.org/boule/>`__
* `xrft <https://xrft.readthedocs.io/>`__
* `choclo <http://www.fatiando.org/choclo/>`__
* `boule <http://www.fatiando.org/boule/>`__

Expand All @@ -98,4 +97,4 @@ The examples in the :ref:`gallery` also use:
* `ensaio <http://www.fatiando.org/ensaio/>`__ for downloading sample datasets
* `pygmt <https://www.pygmt.org/>`__ and `matplotlib <https://matplotlib.org/>`__ for plotting maps and figures
* `pyproj <https://jswhit.github.io/pyproj/>`__ for cartographic projections
* `bordado <http://www.fatiando.org/bordado/>`__ for working with geographic coordinates
* `bordado <http://www.fatiando.org/bordado/>`__ for working with geographic coordinates
3 changes: 1 addition & 2 deletions doc/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ Harmonica *will not* provide:
instead.
- Generic processing methods like grid transformations (use `Verde
<https://www.fatiando.org/verde>`__ or `Xarray <https://docs.xarray.dev>`__
instead) or multidimensional FFT calculations (use `xrft
<https://xrft.readthedocs.io>`__ instead).
instead).
- Reference ellipsoid representations and computations like normal gravity. Use
`Boule <https://www.fatiando.org/boule>`__ instead.
- Data visualization functions. Use `matplotlib <https://matplotlib.org/>`__
Expand Down
1 change: 1 addition & 0 deletions env/requirements-tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ coverage
pyvista
vtk>=9
numba_progress
xrft
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ dependencies:
- scikit-learn
- verde>=1.8.1
- xarray
- xrft>=1.0
- choclo>=0.1
- boule>=0.6
- bordado>=0.4.0
Expand All @@ -27,6 +26,7 @@ dependencies:
- pytest
- pytest-cov
- coverage
- xrft
# Documentation requirements
- sphinx==7.2.*
- numpydoc==1.7.*
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ dependencies = [
"numba >= 0.57",
"xarray >= 2022.03",
"verde >= 1.8.1",
"xrft >= 1.0",
"choclo >= 0.1",
"boule >= 0.6.0",
"bordado >= 0.4.0",
Expand Down
3 changes: 2 additions & 1 deletion src/harmonica/_transformations.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import numpy as np

from .filters._filters import (
apply_filter,
derivative_easting_kernel,
derivative_northing_kernel,
derivative_upward_kernel,
Expand All @@ -19,7 +20,7 @@
reduction_to_pole_kernel,
upward_continuation_kernel,
)
from .filters._utils import apply_filter, grid_sanity_checks
from .filters._utils import grid_sanity_checks


def derivative_upward(grid, *, order=1, pad=True, pad_kwargs=None):
Expand Down
2 changes: 2 additions & 0 deletions src/harmonica/filters/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
Frequency domain filters meant to be applied on regular grids.
"""

from ._fft import fft, ifft
from ._filters import (
derivative_easting_kernel,
derivative_northing_kernel,
Expand All @@ -17,3 +18,4 @@
reduction_to_pole_kernel,
upward_continuation_kernel,
)
from ._padding import pad, unpad
Loading
Loading