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
6 changes: 3 additions & 3 deletions pygmt/helpers/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@

COMMON_DOCSTRINGS = {
"area_thresh": r"""
area_thresh : float or str
area_thresh
*min_area*\ [/*min_level*/*max_level*][**+a**\[**g**\|\ **i**]\
[**s**\|\ **S**]][**+l**\|\ **r**][**+p**\ *percent*].
Features with an area smaller than *min_area* in km\ :sup:`2` or of
hierarchical level that is lower than *min_level* or higher than
*max_level* will not be plotted [Default is ``"0/0/4"`` (all features)].""",
hierarchical level that is lower than *min_level* or higher than *max_level*
will not be plotted [Default is ``"0/0/4"`` (all features)].""",
"aspatial": r"""
aspatial : bool or str
[*col*\ =]\ *name*\ [,...].
Expand Down
5 changes: 4 additions & 1 deletion pygmt/src/coast.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def _alias_option_C(lakes=None, river_lakes=None): # ruff: ignore[invalid-funct


@fmt_docstring
@use_alias(A="area_thresh", E="dcw")
@use_alias(E="dcw")
def coast(
self,
resolution: Literal[
Expand All @@ -81,6 +81,7 @@ def coast(
shorelines: bool | str | Sequence[int | str] = False,
lakes: str | None = None,
river_lakes: str | None = None,
area_thresh: float | str | None = None,
Comment thread
seisman marked this conversation as resolved.
map_scale: str | None = None,
box: Box | bool = False,
projection: str | None = None,
Expand Down Expand Up @@ -113,6 +114,7 @@ def coast(
Full GMT docs at :gmt-docs:`coast.html`.

$aliases
- A = area_thresh
- B = frame
- C = lakes, river_lakes
- D = resolution
Expand Down Expand Up @@ -320,6 +322,7 @@ def coast(
)

aliasdict = AliasSystem(
A=Alias(area_thresh, name="area_thresh"),
C=_alias_option_C(lakes=lakes, river_lakes=river_lakes),
D=Alias(
resolution,
Expand Down
15 changes: 11 additions & 4 deletions pygmt/src/grdlandmask.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@
from pygmt.alias import Alias, AliasSystem
from pygmt.clib import Session
from pygmt.exceptions import GMTParameterError
from pygmt.helpers import build_arg_list, fmt_docstring, use_alias
from pygmt.helpers import build_arg_list, fmt_docstring

__doctest_skip__ = ["grdlandmask"]


@fmt_docstring
@use_alias(A="area_thresh")
def grdlandmask(
outgrid: PathLike | None = None,
spacing: Sequence[float | str] | None = None,
Expand All @@ -25,14 +24,15 @@ def grdlandmask(
resolution: Literal[
"auto", "full", "high", "intermediate", "low", "crude", None
] = None,
area_thresh: float | str | None = None,
Comment thread
seisman marked this conversation as resolved.
region: Sequence[float | str] | str | None = None,
registration: Literal["gridline", "pixel"] | bool = False,
verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"]
| bool = False,
cores: int | bool = False,
**kwargs,
) -> xr.DataArray | None:
r"""
"""
Create a "wet-dry" mask grid from shoreline database.

Read the selected shoreline database and use that information to decide which nodes
Expand All @@ -43,7 +43,13 @@ def grdlandmask(

Full GMT docs at :gmt-docs:`grdlandmask.html`.

$aliases

**Aliases**

.. hlist::
:columns: 3

- A = area_thresh
- D = resolution
- E = border_values
- G = outgrid
Expand Down Expand Up @@ -116,6 +122,7 @@ def grdlandmask(
raise GMTParameterError(required=["region", "spacing"])

aliasdict = AliasSystem(
A=Alias(area_thresh, name="area_thresh"),
D=Alias(
resolution,
name="resolution",
Expand Down
4 changes: 3 additions & 1 deletion pygmt/src/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

@fmt_docstring
@use_alias(
A="area_thresh",
C="dist2pt",
F="polygon",
G="mask_grid",
Expand All @@ -48,6 +47,7 @@ def select(
resolution: Literal[
"auto", "full", "high", "intermediate", "low", "crude", None
] = None,
area_thresh: float | str | None = None,
Comment thread
seisman marked this conversation as resolved.
projection: str | None = None,
region: Sequence[float | str] | str | None = None,
verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"]
Expand Down Expand Up @@ -78,6 +78,7 @@ def select(
Full GMT docs at :gmt-docs:`gmtselect.html`.

$aliases
- A = area_thresh
- D = resolution
- J = projection
- R = region
Expand Down Expand Up @@ -221,6 +222,7 @@ def select(
column_names = data.columns.to_list()

aliasdict = AliasSystem(
A=Alias(area_thresh, name="area_thresh"),
D=Alias(
resolution,
name="resolution",
Expand Down
Loading