Skip to content
Merged
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
12 changes: 9 additions & 3 deletions pygmt/datasets/earth_age.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,20 @@

The grids are available in various resolutions.
"""
from typing import Literal

from pygmt.datasets.load_remote_dataset import _load_remote_dataset
from pygmt.helpers import kwargs_to_strings

__doctest_skip__ = ["load_earth_age"]


@kwargs_to_strings(region="sequence")
def load_earth_age(resolution="01d", region=None, registration=None):
def load_earth_age(
resolution="01d",
region=None,
registration: Literal["gridline", "pixel"] = "gridline",
):
r"""
Load the Earth seafloor crustal age dataset in various resolutions.

Expand Down Expand Up @@ -56,9 +62,9 @@ def load_earth_age(resolution="01d", region=None, registration=None):
Required for grids with resolutions higher than 5
arc-minutes (i.e., ``"05m"``).

registration : str
registration
Grid registration type. Either ``"pixel"`` for pixel registration or
``"gridline"`` for gridline registration. Default is ``"gridline"``.
``"gridline"`` for gridline registration.

Returns
-------
Expand Down
15 changes: 11 additions & 4 deletions pygmt/datasets/earth_free_air_anomaly.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,20 @@

The grids are available in various resolutions.
"""
from typing import Literal

from pygmt.datasets.load_remote_dataset import _load_remote_dataset
from pygmt.helpers import kwargs_to_strings

__doctest_skip__ = ["load_earth_free_air_anomaly"]


@kwargs_to_strings(region="sequence")
def load_earth_free_air_anomaly(resolution="01d", region=None, registration=None):
def load_earth_free_air_anomaly(
resolution="01d",
region=None,
registration: Literal["gridline", "pixel", None] = None,
):
r"""
Load the IGPP Earth Free-Air Anomaly dataset in various resolutions.

Expand Down Expand Up @@ -56,10 +62,11 @@ def load_earth_free_air_anomaly(resolution="01d", region=None, registration=None
Required for grids with resolutions higher than 5
arc-minutes (i.e., ``"05m"``).

registration : str
registration
Grid registration type. Either ``"pixel"`` for pixel registration or
``"gridline"`` for gridline registration. Default is ``"gridline"``
for all resolutions except ``"01m"`` which is ``"pixel"`` only.
``"gridline"`` for gridline registration. Default is ``None``, means
``"gridline"`` for all resolutions except ``"01m"`` which is
``"pixel"`` only.

Returns
-------
Expand Down
12 changes: 9 additions & 3 deletions pygmt/datasets/earth_geoid.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,20 @@

The grids are available in various resolutions.
"""
from typing import Literal

from pygmt.datasets.load_remote_dataset import _load_remote_dataset
from pygmt.helpers import kwargs_to_strings

__doctest_skip__ = ["load_earth_geoid"]


@kwargs_to_strings(region="sequence")
def load_earth_geoid(resolution="01d", region=None, registration=None):
def load_earth_geoid(
resolution="01d",
region=None,
registration: Literal["gridline", "pixel"] = "gridline",
):
r"""
Load the EGM2008 Earth Geoid dataset in various resolutions.

Expand Down Expand Up @@ -49,9 +55,9 @@ def load_earth_geoid(resolution="01d", region=None, registration=None):
Required for grids with resolutions higher than 5
arc-minutes (i.e., ``"05m"``).

registration : str
registration
Grid registration type. Either ``"pixel"`` for pixel registration or
``"gridline"`` for gridline registration. Default is ``"gridline"``.
``"gridline"`` for gridline registration.

Returns
-------
Expand Down
11 changes: 6 additions & 5 deletions pygmt/datasets/earth_magnetic_anomaly.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
def load_earth_magnetic_anomaly(
resolution="01d",
region=None,
registration=None,
registration: Literal["gridline", "pixel", None] = None,
data_source: Literal["emag2", "emag2_4km", "wdmam"] = "emag2",
):
r"""
Expand Down Expand Up @@ -76,11 +76,12 @@ def load_earth_magnetic_anomaly(
Required for grids with resolutions higher than 5
arc-minutes (i.e., ``"05m"``).

registration : str
registration
Grid registration type. Either ``"pixel"`` for pixel registration or
``"gridline"`` for gridline registration. Default is ``"gridline"``
for all resolutions except ``"02m"`` for ``data_source="emag2"`` or
``data_source="emag2_4km"``, which are ``"pixel"`` only.
``"gridline"`` for gridline registration. Default is ``None``, means
``"gridline"`` for all resolutions except ``"02m"`` for
``data_source="emag2"`` or ``data_source="emag2_4km"``, which are
``"pixel"`` only.

data_source
Select the source of the magnetic anomaly data. Available options are:
Expand Down
12 changes: 9 additions & 3 deletions pygmt/datasets/earth_mask.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,20 @@

The grids are available in various resolutions.
"""
from typing import Literal

from pygmt.datasets.load_remote_dataset import _load_remote_dataset
from pygmt.helpers import kwargs_to_strings

__doctest_skip__ = ["load_earth_mask"]


@kwargs_to_strings(region="sequence")
def load_earth_mask(resolution="01d", region=None, registration=None):
def load_earth_mask(
resolution="01d",
region=None,
registration: Literal["gridline", "pixel"] = "gridline",
):
r"""
Load the GSHHG Earth Mask dataset in various resolutions.

Expand Down Expand Up @@ -47,9 +53,9 @@ def load_earth_mask(resolution="01d", region=None, registration=None):
The subregion of the grid to load, in the form of a list
[*xmin*, *xmax*, *ymin*, *ymax*] or a string *xmin/xmax/ymin/ymax*.

registration : str
registration
Grid registration type. Either ``"pixel"`` for pixel registration or
``"gridline"`` for gridline registration. Default is ``"gridline"``.
``"gridline"`` for gridline registration.

Returns
-------
Expand Down
9 changes: 5 additions & 4 deletions pygmt/datasets/earth_relief.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
def load_earth_relief(
resolution="01d",
region=None,
registration=None,
registration: Literal["gridline", "pixel", None] = None,
data_source: Literal["igpp", "gebco", "gebcosi", "synbath"] = "igpp",
use_srtm=False,
):
Expand Down Expand Up @@ -71,10 +71,11 @@ def load_earth_relief(
Required for Earth relief grids with resolutions higher than 5
arc-minutes (i.e., ``"05m"``).

registration : str
registration
Grid registration type. Either ``"pixel"`` for pixel registration or
``"gridline"`` for gridline registration. Default is ``"gridline"``
for all resolutions except ``"15s"`` which is ``"pixel"`` only.
``"gridline"`` for gridline registration. Default is ``None``, means
``"gridline"`` for all resolutions except ``"15s"`` which is
``"pixel"`` only.

data_source
Select the source for the Earth relief data. Available options are:
Expand Down
13 changes: 9 additions & 4 deletions pygmt/datasets/earth_vertical_gravity_gradient.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

The grids are available in various resolutions.
"""
from typing import Literal

from pygmt.datasets.load_remote_dataset import _load_remote_dataset
from pygmt.helpers import kwargs_to_strings

Expand All @@ -12,7 +14,9 @@

@kwargs_to_strings(region="sequence")
def load_earth_vertical_gravity_gradient(
resolution="01d", region=None, registration=None
resolution="01d",
region=None,
registration: Literal["gridline", "pixel", None] = None,
):
r"""
Load the IGPP Earth Vertical Gravity Gradient dataset in various
Expand Down Expand Up @@ -59,10 +63,11 @@ def load_earth_vertical_gravity_gradient(
Required for grids with resolutions higher than 5
arc-minutes (i.e., ``"05m"``).

registration : str
registration
Grid registration type. Either ``"pixel"`` for pixel registration or
``"gridline"`` for gridline registration. Default is ``"gridline"``
for all resolutions except ``"01m"`` which is ``"pixel"`` only.
``"gridline"`` for gridline registration. Default is ``None``, means
``"gridline"`` for all resolutions except ``"01m"`` which is
``"pixel"`` only.

Returns
-------
Expand Down