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

Add more FFT-based transformations and filters #299

Merged
merged 71 commits into from
Feb 10, 2023
Merged
Show file tree
Hide file tree
Changes from 65 commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
e50a8fe
Draft of FFT Filter
LL-Geo Jan 17, 2022
ba82c85
Some minor edits
RichardScottOZ Jan 17, 2022
b8f3c03
Merge pull request #1 from RichardScottOZ/patch-1
LL-Geo Jan 19, 2022
5a077da
Update environment
LL-Geo Jan 19, 2022
3e4d141
Rename function to isostatic_moho_airy
LL-Geo May 29, 2022
1d92cbb
Revert "Rename function to isostatic_moho_airy"
LL-Geo Jun 16, 2022
5a837d2
Add new filter
LL-Geo Jun 23, 2022
42239ad
Squashed commit of the following:
LL-Geo Jun 23, 2022
c9adca8
Merge branch 'main' into main
LL-Geo Jun 23, 2022
7f613f9
Reformat
LL-Geo Jun 23, 2022
df77b13
Update test for filter
LL-Geo Jul 14, 2022
2bfa108
Merge branch 'main' into main
LL-Geo Jul 14, 2022
c8760e2
Update test kernel
LL-Geo Jul 14, 2022
5416778
Change Vn and Ve tolerance
LL-Geo Jul 14, 2022
4c49ecb
Add missing return in pseudo_gravity_kernel
santisoler Sep 23, 2022
b2cafc2
Merge branch 'main' into main
LL-Geo Sep 27, 2022
9671392
fix pseudo gravity
LL-Geo Sep 27, 2022
8c5dd71
update filter and kernel test
LL-Geo Nov 21, 2022
7c674d8
Merge branch 'main' into main
LL-Geo Nov 21, 2022
c3e5d58
Update test_filters.py
LL-Geo Nov 21, 2022
79bf5c9
Merge branch 'main' of https://github.com/LL-Geo/harmonica
LL-Geo Nov 21, 2022
44eb40a
Update test_filters.py
LL-Geo Nov 21, 2022
a7e59dc
deal with nan to 0
LL-Geo Nov 21, 2022
b4e2faf
Rework test filter kernel
LL-Geo Nov 21, 2022
d4ce28c
upload filter test file
LL-Geo Nov 21, 2022
2bc07bf
Update harmonica/filters/_filters.py
LL-Geo Nov 26, 2022
a9b9ae0
Update harmonica/filters/_filters.py
LL-Geo Nov 26, 2022
b559e9e
Update harmonica/filters/_filters.py
LL-Geo Nov 26, 2022
9ffd38e
Update harmonica/filters/_filters.py
LL-Geo Nov 26, 2022
2ed424e
Update docstring and add test
LL-Geo Nov 26, 2022
703531c
Update test file from netcdf4 to netcdf3
LL-Geo Nov 27, 2022
cef807c
remove about test
LL-Geo Nov 27, 2022
c8cc2e5
Add drop coordinate in test and change atol in filter
LL-Geo Nov 27, 2022
524559d
use xrt.assert_allclose for test_laplace
LL-Geo Nov 27, 2022
ccca3d4
Merge branch 'main' into main
LL-Geo Nov 27, 2022
6b61e95
Improve math of horizontal derivative and bandpass filters
santisoler Nov 28, 2022
8235a50
Add new transformation and filter functions to API reference
santisoler Nov 28, 2022
c58ae11
Run make format
santisoler Nov 28, 2022
480f6ce
Update test for filter_kernel
LL-Geo Dec 15, 2022
e667f17
fix starred expression error
LL-Geo Dec 15, 2022
90b6260
change xrt to npt
LL-Geo Dec 15, 2022
de761fc
Increase rtol
LL-Geo Dec 15, 2022
65fbdfe
change height_displacement to positive
LL-Geo Dec 15, 2022
d98916c
Refactor reduction to the pole and pseudogravity filters
santisoler Dec 16, 2022
6e7753c
Improve docstring for reduction to the pole
santisoler Dec 16, 2022
3b56e45
Fix missing magnetization_declination argument
santisoler Dec 16, 2022
329caca
Merge branch 'main' into main
santisoler Dec 16, 2022
cb87af9
Add test for invalid magnetization angles
santisoler Dec 16, 2022
d3d0146
Merge branch 'main' of github.com:LL-Geo/harmonica into LL-Geo/main
santisoler Dec 16, 2022
e6bbfca
Refactor kernel and add test
LL-Geo Dec 20, 2022
8e20937
Update test for pseudo_gravity_kernel
LL-Geo Dec 20, 2022
599ff84
Minor improvements to docstrings of rtp and pseudogravity
santisoler Dec 20, 2022
087ce02
Refactor pseudogravity kernel
santisoler Dec 20, 2022
5ec084c
Solve issue with casting floats and complex xarray objects
santisoler Dec 20, 2022
98ae716
Change pseudo_gravity from cgs unit to SI unit
LL-Geo Dec 22, 2022
3b8da5f
Improvements to docstrings of and pseudogravity
LL-Geo Dec 24, 2022
3efbbd5
Remove PG filter for future
Feb 3, 2023
0516fc5
Merge branch 'main' into main
LL-Geo Feb 3, 2023
7e48a05
Update __init__.py
Feb 3, 2023
0631dc1
Update test_filters.py
Feb 3, 2023
d44e6ec
Increase rtol of test_equivalent_sources_spherical
Feb 3, 2023
8517463
Remove unwantes files in .gitignore
santisoler Feb 10, 2023
316628c
Remove pseudo_gravity from index.rst
santisoler Feb 10, 2023
c816db6
Remove pseudo_gravity_kernel from index.rst
santisoler Feb 10, 2023
cb0ab49
Rename return in reduce_to_pole docstring
santisoler Feb 10, 2023
c8e6b7b
Fix docstring for gaussian_highpass_kernel
santisoler Feb 10, 2023
e865d6e
Minor change in docstring style
santisoler Feb 10, 2023
df59d82
Improve description of wavelength in filters
santisoler Feb 10, 2023
7dbd949
Fix error in description of wavelength parameters
santisoler Feb 10, 2023
d114dd8
Remove citation of Salem et al.
santisoler Feb 10, 2023
9d430a9
Capitilize "Gaussian filter" in docstrings
santisoler Feb 10, 2023
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: 12 additions & 0 deletions doc/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@ Apply well known transformations regular gridded potential fields data.
.. autosummary::
:toctree: generated/

derivative_easting
derivative_northing
derivative_upward
upward_continuation
gaussian_lowpass
gaussian_highpass
reduction_to_pole

Frequency domain filters
------------------------
Expand All @@ -35,7 +41,13 @@ Define filters in the frequency domain.
.. autosummary::
:toctree: generated/

filters.derivative_easting_kernel
filters.derivative_northing_kernel
filters.derivative_upward_kernel
filters.upward_continuation_kernel
filters.gaussian_lowpass_kernel
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`.
Expand Down
2 changes: 2 additions & 0 deletions doc/references.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ References
.. [Dampney1969] Dampney, C. N. G. (1969). The equivalent source technique. Geophysics, 34(1), 39–53. doi:`10.1190/1.1439996 <https://doi.org/10.1190/1.1439996>`__
.. [Forste_etal2014] Förste, Christoph; Bruinsma, Sean.L.; Abrikosov, Oleg; Lemoine, Jean-Michel; Marty, Jean Charles; Flechtner, Frank; Balmino, G.; Barthelmes, F.; Biancale, R. (2014): EIGEN-6C4 The latest combined global gravity field model including GOCE data up to degree and order 2190 of GFZ Potsdam and GRGS Toulouse. GFZ Data Services. doi:`10.5880/icgem.2015.1 <http://doi.org/10.5880/icgem.2015.1>`__
.. [Fukushima2020] Fukushima, T. (2020). Speed and accuracy improvements in standard algorithm for prismatic gravitational field. Geophysical Journal International. doi:`10.1093/gji/ggaa240 <https://doi.org/10.1093/gji/ggaa240>`__
.. [Geosoft1999] Geosoft Incorporated. (1999). Montaj MAGMAP filtering; 2–D frequency domain of potential field data extension for Oasis Montaj v. 6.1.
.. [Grombein2013] Grombein, T., Seitz, K., Heck, B. (2013), Optimized formulas for the gravitational field of a tesseroid, Journal of Geodesy. doi:`10.1007/s00190-013-0636-1 <https://doi.org/10.1007/s00190-013-0636-1>`__
.. [Hofmann-WellenhofMoritz2006] Hofmann-Wellenhof, B., & Moritz, H. (2006). Physical Geodesy (2nd, corr. ed. 2006 edition ed.). Wien ; New York: Springer.
.. [LiGotze2001] Li, X. and H. J. Gotze, 2001, Tutorial: Ellipsoid, geoid, gravity, geodesy, and geophysics, Geophysics, 66(6), p. 1660-1668, doi:`10.1190/1.1487109 <https://doi.org/10.1190/1.1487109>`__
.. [Nagy2000] Nagy, D., Papp, G. & Benedek, J.(2000). The gravitational potential and its derivatives for the prism. Journal of Geodesy 74: 552. doi:`10.1007/s001900000116 <https://doi.org/10.1007/s001900000116>`__
.. [Nagy2002] Nagy, D., Papp, G. & Benedek, J.(2002). Corrections to "The gravitational potential and its derivatives for the prism". Journal of Geodesy. doi:`10.1007/s00190-002-0264-7 <https://doi.org/10.1007/s00190-002-0264-7>`__
.. [Oliveira2021] Oliveira Jr, Vanderlei C. and Uieda, Leonardo and Barbosa, Valeria C. F.. Sketch of three coordinate systems: Geocentric Cartesian, Geocentric Geodetic, and Topocentric Cartesian. figshare. doi: `10.6084/m9.figshare.15044241.v1 <https://doi.org/10.6084/m9.figshare.15044241.v1>`__
.. [Salem2014] Salem, A., Green, C., Cheyney, S., Fairhead, J. D., Aboud, E., & Campbell, S. (2014). Mapping the depth to magnetic basement using inversion of pseudogravity: Application to the Bishop model and the Stord Basin, northern North Sea. Interpretation, 2(2), T69-T78. doi: `10.1190/INT-2013-0105.1 <https://doi.org/10.1190/INT-2013-0105.1>`__
.. [Soler2019] Soler, S. R., Pesce, A., Gimenez, M. E., & Uieda, L. (2019). Gravitational field calculation in spherical coordinates using variable densities in depth, Geophysical Journal International. doi: `10.1093/gji/ggz277 <https://doi.org/10.1093/gji/ggz277>`__
.. [Soler2021] Soler, S. R. and Uieda, L. (2021). Gradient-boosted equivalent sources, Geophysical Journal International. doi:`10.1093/gji/ggab297 <https://doi.org/10.1093/gji/ggab297>`__
.. [Uieda2015] Uieda, Leonardo (2015). A tesserioid (spherical prism) in a geocentric coordinate system with a local-North-oriented coordinate system. figshare. Figure. doi: `10.6084/m9.figshare.1495525.v1 <https://doi.org/10.6084/m9.figshare.1495525.v1>`_
Expand Down
10 changes: 9 additions & 1 deletion harmonica/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,15 @@
from .forward.tesseroid_layer import DatasetAccessorTesseroidLayer, tesseroid_layer
from .gravity_corrections import bouguer_correction
from .isostasy import isostasy_airy, isostatic_moho_airy
from .transformations import derivative_upward
from .transformations import (
derivative_easting,
derivative_northing,
derivative_upward,
gaussian_highpass,
gaussian_lowpass,
reduction_to_pole,
upward_continuation,
)


def test(doctest=True, verbose=True, coverage=False, figures=False):
Expand Down
10 changes: 9 additions & 1 deletion harmonica/filters/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,12 @@
"""
Frequency domain filters meant to be applied on regular grids
"""
from ._filters import derivative_upward_kernel
from ._filters import (
derivative_easting_kernel,
derivative_northing_kernel,
derivative_upward_kernel,
gaussian_highpass_kernel,
gaussian_lowpass_kernel,
reduction_to_pole_kernel,
upward_continuation_kernel,
)
Loading