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 function to read Oasis Montaj© grd files #348

Merged
merged 32 commits into from
Nov 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
f3be2a0
Create new _io submodule and move load_icgem_gdf function
santisoler Aug 29, 2022
35403cd
Add load_oasis_montaj_grid function
santisoler Aug 29, 2022
9db9ac2
Improve function docstring
santisoler Aug 29, 2022
412d722
Move every not implemented check to their own function
santisoler Aug 29, 2022
ff47e1b
Split tests for uncompressed grids and invalid n_bytes_per_element
santisoler Aug 29, 2022
aa2a804
Upload test grd file and fix error (remove_dummies)
LL-Geo Oct 19, 2022
6064b06
Fix typo
santisoler Nov 2, 2022
38625f4
Don't read map number nor map label
santisoler Nov 2, 2022
eea2000
Convert to floats when creating numpy array
santisoler Nov 2, 2022
2b6ea82
Remove parenthesis in parameter description
santisoler Nov 2, 2022
b6a429a
Add test for new function
santisoler Nov 2, 2022
52ec63f
Merge branch 'main' into grd-oasis-montaj
santisoler Nov 2, 2022
c3ad104
Save the expected netCDF grid using scipy engine
santisoler Nov 2, 2022
62a4734
Add test for _check_rotation
santisoler Nov 2, 2022
e16af7a
Update order=-1
LL-Geo Nov 3, 2022
92135c4
Update rotate gird
LL-Geo Nov 3, 2022
ab5d468
Update compressed grd file
LL-Geo Nov 14, 2022
967d6ca
Update check and test
LL-Geo Nov 14, 2022
3c8b6e3
Refactor _get_data_type function
santisoler Nov 15, 2022
bfe9ffe
Refactor decompression of grid
santisoler Nov 15, 2022
29fe1eb
Move dummies to a global variable
santisoler Nov 15, 2022
3af3e72
Fix bad refactor
santisoler Nov 15, 2022
d8016d6
Acknowledge Loop3D in the source file and docstring
santisoler Nov 15, 2022
84ee1f1
Configure flake8 to ignore spaces before a colon
santisoler Nov 15, 2022
2444d78
Add support for rotated grids
santisoler Nov 17, 2022
96042a9
Simplify how header variables are read
santisoler Nov 17, 2022
66e0a4e
Merge branch 'main' into grd-oasis-montaj
santisoler Nov 17, 2022
a9c3522
Include om_byte.grd in the test suite
santisoler Nov 17, 2022
cbceadf
Removed unused sample grd files
santisoler Nov 17, 2022
09854a7
Merge branch 'grd-oasis-montaj' of github.com:fatiando/harmonica into…
santisoler Nov 17, 2022
256b615
Fix bug in creation of the rotated coordinates
santisoler Nov 21, 2022
53a5e23
Add missing docstring for rotation_deg parameter
santisoler Nov 25, 2022
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: 1 addition & 0 deletions doc/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ Input and Output
:toctree: generated/

load_icgem_gdf
load_oasis_montaj_grid

Visualization
-------------
Expand Down
3 changes: 2 additions & 1 deletion harmonica/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#
# Import functions/classes to make the public API
from . import datasets, synthetic
from ._io.icgem_gdf import load_icgem_gdf
from ._io.oasis_montaj_grd import load_oasis_montaj_grid
from ._version import __version__
from .equivalent_sources.cartesian import EQLHarmonic, EquivalentSources
from .equivalent_sources.gradient_boosted import EquivalentSourcesGB
Expand All @@ -17,7 +19,6 @@
from .forward.tesseroid import tesseroid_gravity
from .forward.tesseroid_layer import DatasetAccessorTesseroidLayer, tesseroid_layer
from .gravity_corrections import bouguer_correction
from .io import load_icgem_gdf
from .isostasy import isostasy_airy, isostatic_moho_airy
from .transformations import derivative_upward

Expand Down
10 changes: 10 additions & 0 deletions harmonica/_io/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright (c) 2018 The Harmonica Developers.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
#
# This code is part of the Fatiando a Terra project (https://www.fatiando.org)
#
"""
Functions for interacting with standarized data files that contain gravity or
magnetic geophysical data.
"""
3 changes: 1 addition & 2 deletions harmonica/io.py → harmonica/_io/icgem_gdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
# This code is part of the Fatiando a Terra project (https://www.fatiando.org)
#
"""
Functions for interacting with standarized data files that contain gravity or
magnetic geophysical data.
Function to read ICGEM .gdf file
"""
import contextlib

Expand Down
Loading