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
5 changes: 3 additions & 2 deletions pygmt/datasets/earth_age.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from collections.abc import Sequence
from typing import Literal

import xarray as xr
from pygmt.datasets.load_remote_dataset import _load_remote_dataset

__doctest_skip__ = ["load_earth_age"]
Expand All @@ -19,7 +20,7 @@ def load_earth_age(
] = "01d",
region: Sequence[float] | str | None = None,
registration: Literal["gridline", "pixel"] = "gridline",
):
) -> xr.DataArray:
r"""
Load the Earth seafloor crustal age dataset in various resolutions.

Expand Down Expand Up @@ -65,7 +66,7 @@ def load_earth_age(

Returns
-------
grid : :class:`xarray.DataArray`
grid
The Earth seafloor crustal age grid. Coordinates are latitude and
longitude in degrees. Age is in millions of years (Myr).

Expand Down
5 changes: 3 additions & 2 deletions pygmt/datasets/earth_free_air_anomaly.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from collections.abc import Sequence
from typing import Literal

import xarray as xr
from pygmt.datasets.load_remote_dataset import _load_remote_dataset

__doctest_skip__ = ["load_earth_free_air_anomaly"]
Expand All @@ -19,7 +20,7 @@ def load_earth_free_air_anomaly(
] = "01d",
region: Sequence[float] | str | None = None,
registration: Literal["gridline", "pixel", None] = None,
):
) -> xr.DataArray:
r"""
Load the IGPP Earth free-air anomaly dataset in various resolutions.

Expand Down Expand Up @@ -67,7 +68,7 @@ def load_earth_free_air_anomaly(

Returns
-------
grid : :class:`xarray.DataArray`
grid
The Earth free-air anomaly grid. Coordinates are latitude and
longitude in degrees. Units are in mGal.

Expand Down
5 changes: 3 additions & 2 deletions pygmt/datasets/earth_geoid.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from collections.abc import Sequence
from typing import Literal

import xarray as xr
from pygmt.datasets.load_remote_dataset import _load_remote_dataset

__doctest_skip__ = ["load_earth_geoid"]
Expand All @@ -19,7 +20,7 @@ def load_earth_geoid(
] = "01d",
region: Sequence[float] | str | None = None,
registration: Literal["gridline", "pixel"] = "gridline",
):
) -> xr.DataArray:
r"""
Load the EGM2008 Earth geoid dataset in various resolutions.

Expand Down Expand Up @@ -58,7 +59,7 @@ def load_earth_geoid(

Returns
-------
grid : :class:`xarray.DataArray`
grid
The Earth geoid grid. Coordinates are latitude and
longitude in degrees. Units are in meters.

Expand Down
5 changes: 3 additions & 2 deletions pygmt/datasets/earth_magnetic_anomaly.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from collections.abc import Sequence
from typing import Literal

import xarray as xr
from pygmt.datasets.load_remote_dataset import _load_remote_dataset
from pygmt.exceptions import GMTInvalidInput

Expand All @@ -21,7 +22,7 @@ def load_earth_magnetic_anomaly(
region: Sequence[float] | str | None = None,
registration: Literal["gridline", "pixel", None] = None,
data_source: Literal["emag2", "emag2_4km", "wdmam"] = "emag2",
):
) -> xr.DataArray:
r"""
Load the Earth magnetic anomaly datasets in various resolutions.

Expand Down Expand Up @@ -93,7 +94,7 @@ def load_earth_magnetic_anomaly(

Returns
-------
grid : :class:`xarray.DataArray`
grid
The Earth magnetic anomaly grid. Coordinates are latitude and
longitude in degrees. Units are in nano Tesla (nT).

Expand Down
5 changes: 3 additions & 2 deletions pygmt/datasets/earth_mask.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from collections.abc import Sequence
from typing import Literal

import xarray as xr
from pygmt.datasets.load_remote_dataset import _load_remote_dataset

__doctest_skip__ = ["load_earth_mask"]
Expand All @@ -31,7 +32,7 @@ def load_earth_mask(
] = "01d",
region: Sequence[float] | str | None = None,
registration: Literal["gridline", "pixel"] = "gridline",
):
) -> xr.DataArray:
r"""
Load the GSHHG Earth mask dataset in various resolutions.

Expand Down Expand Up @@ -69,7 +70,7 @@ def load_earth_mask(

Returns
-------
grid : :class:`xarray.DataArray`
grid
The Earth mask grid. Coordinates are latitude and
longitude in degrees. The node values in the mask grids are all in
the 0-4 range and reflect different surface types:
Expand Down
5 changes: 3 additions & 2 deletions pygmt/datasets/earth_relief.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from collections.abc import Sequence
from typing import Literal

import xarray as xr
from pygmt.datasets.load_remote_dataset import _load_remote_dataset
from pygmt.exceptions import GMTInvalidInput

Expand Down Expand Up @@ -36,7 +37,7 @@ def load_earth_relief(
registration: Literal["gridline", "pixel", None] = None,
data_source: Literal["igpp", "gebco", "gebcosi", "synbath"] = "igpp",
use_srtm: bool = False,
):
) -> xr.DataArray:
r"""
Load the Earth relief datasets (topography and bathymetry) in various resolutions.

Expand Down Expand Up @@ -106,7 +107,7 @@ def load_earth_relief(

Returns
-------
grid : :class:`xarray.DataArray`
grid
The Earth relief grid. Coordinates are latitude and longitude in
degrees. Relief is in meters.

Expand Down
5 changes: 3 additions & 2 deletions pygmt/datasets/earth_vertical_gravity_gradient.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from collections.abc import Sequence
from typing import Literal

import xarray as xr
from pygmt.datasets.load_remote_dataset import _load_remote_dataset

__doctest_skip__ = ["load_earth_vertical_gravity_gradient"]
Expand All @@ -19,7 +20,7 @@ def load_earth_vertical_gravity_gradient(
] = "01d",
region: Sequence[float] | str | None = None,
registration: Literal["gridline", "pixel", None] = None,
):
) -> xr.DataArray:
r"""
Load the IGPP Earth vertical gravity gradient dataset in various resolutions.

Expand Down Expand Up @@ -67,7 +68,7 @@ def load_earth_vertical_gravity_gradient(

Returns
-------
grid : :class:`xarray.DataArray`
grid
The Earth vertical gravity gradient grid. Coordinates are latitude and
longitude in degrees. Units are in Eotvos.

Expand Down
4 changes: 3 additions & 1 deletion pygmt/datasets/load_remote_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
from pygmt.src import which

if TYPE_CHECKING:
from collections.abc import Sequence

import xarray as xr


Expand Down Expand Up @@ -333,7 +335,7 @@ def _load_remote_dataset(
name: str,
prefix: str,
resolution: str,
region: str | list,
region: Sequence[float] | str | None,
registration: Literal["gridline", "pixel", None],
) -> xr.DataArray:
r"""
Expand Down
5 changes: 3 additions & 2 deletions pygmt/datasets/mars_relief.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from collections.abc import Sequence
from typing import Literal

import xarray as xr
from pygmt.datasets.load_remote_dataset import _load_remote_dataset

__doctest_skip__ = ["load_mars_relief"]
Expand All @@ -32,7 +33,7 @@ def load_mars_relief(
] = "01d",
region: Sequence[float] | str | None = None,
registration: Literal["gridline", "pixel", None] = None,
):
) -> xr.DataArray:
r"""
Load the Mars relief dataset in various resolutions.

Expand Down Expand Up @@ -79,7 +80,7 @@ def load_mars_relief(

Returns
-------
grid : :class:`xarray.DataArray`
grid
The Mars relief grid. Coordinates are latitude and longitude in degrees. Relief
is in meters.

Expand Down
5 changes: 3 additions & 2 deletions pygmt/datasets/mercury_relief.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from collections.abc import Sequence
from typing import Literal

import xarray as xr
from pygmt.datasets.load_remote_dataset import _load_remote_dataset

__doctest_skip__ = ["load_mercury_relief"]
Expand All @@ -30,7 +31,7 @@ def load_mercury_relief(
] = "01d",
region: Sequence[float] | str | None = None,
registration: Literal["gridline", "pixel", None] = None,
):
) -> xr.DataArray:
r"""
Load the Mercury relief dataset in various resolutions.

Expand Down Expand Up @@ -77,7 +78,7 @@ def load_mercury_relief(

Returns
-------
grid : :class:`xarray.DataArray`
grid
The Mercury relief grid. Coordinates are latitude and longitude in degrees.
Relief is in meters.

Expand Down
5 changes: 3 additions & 2 deletions pygmt/datasets/moon_relief.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from collections.abc import Sequence
from typing import Literal

import xarray as xr
from pygmt.datasets.load_remote_dataset import _load_remote_dataset

__doctest_skip__ = ["load_moon_relief"]
Expand All @@ -32,7 +33,7 @@ def load_moon_relief(
] = "01d",
region: Sequence[float] | str | None = None,
registration: Literal["gridline", "pixel", None] = None,
):
) -> xr.DataArray:
r"""
Load the Moon relief dataset in various resolutions.

Expand Down Expand Up @@ -79,7 +80,7 @@ def load_moon_relief(

Returns
-------
grid : :class:`xarray.DataArray`
grid
The Moon relief grid. Coordinates are latitude and longitude in degrees. Relief
is in meters.

Expand Down
5 changes: 3 additions & 2 deletions pygmt/datasets/pluto_relief.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from collections.abc import Sequence
from typing import Literal

import xarray as xr
from pygmt.datasets.load_remote_dataset import _load_remote_dataset

__doctest_skip__ = ["load_pluto_relief"]
Expand All @@ -30,7 +31,7 @@ def load_pluto_relief(
] = "01d",
region: Sequence[float] | str | None = None,
registration: Literal["gridline", "pixel", None] = None,
):
) -> xr.DataArray:
r"""
Load the Pluto relief dataset in various resolutions.

Expand Down Expand Up @@ -77,7 +78,7 @@ def load_pluto_relief(

Returns
-------
grid : :class:`xarray.DataArray`
grid
The Pluto relief grid. Coordinates are latitude and longitude in degrees. Relief
is in meters.

Expand Down
2 changes: 1 addition & 1 deletion pygmt/datasets/samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ class GMTSampleData(NamedTuple):
}


def list_sample_data() -> dict:
def list_sample_data() -> dict[str, str]:
"""
Report datasets available for tests and documentation examples.

Expand Down
3 changes: 2 additions & 1 deletion pygmt/datasets/tile_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"""

import contextlib
from collections.abc import Sequence
from typing import Literal

from packaging.version import Version
Expand All @@ -28,7 +29,7 @@


def load_tile_map(
region: list,
region: Sequence[float],
zoom: int | Literal["auto"] = "auto",
source: TileProvider | str | None = None,
lonlat: bool = True,
Expand Down
5 changes: 3 additions & 2 deletions pygmt/datasets/venus_relief.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from collections.abc import Sequence
from typing import Literal

import xarray as xr
from pygmt.datasets.load_remote_dataset import _load_remote_dataset

__doctest_skip__ = ["load_venus_relief"]
Expand All @@ -19,7 +20,7 @@ def load_venus_relief(
] = "01d",
region: Sequence[float] | str | None = None,
registration: Literal["gridline", "pixel"] = "gridline",
):
) -> xr.DataArray:
r"""
Load the Venus relief dataset in various resolutions.

Expand Down Expand Up @@ -64,7 +65,7 @@ def load_venus_relief(

Returns
-------
grid : :class:`xarray.DataArray`
grid
The Venus relief grid. Coordinates are latitude and longitude in degrees. Relief
is in meters.

Expand Down