From 8f9150c2a46fae7a5d84b96acafa01ea4fd35ab4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= Date: Thu, 9 Apr 2026 18:03:46 +0200 Subject: [PATCH 1/3] Improve docs of grdmask --- pygmt/src/grdmask.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/pygmt/src/grdmask.py b/pygmt/src/grdmask.py index d1ad20e6bb8..4bf3c6fae8e 100644 --- a/pygmt/src/grdmask.py +++ b/pygmt/src/grdmask.py @@ -128,14 +128,13 @@ def grdmask( """ Create mask grid from polygons or point coverage. - Reads one or more files containing polygon or data point coordinates, and creates a - grid where nodes that fall inside, on the edge, or outside the polygons (or within - the search radius from data points) are assigned values based on the ``outside``, - ``edge``, and ``inside`` parameters. + Takes one or more polygons or data point coordinates, and creates a grid where nodes + that fall inside, on the edge, or outside the polygons or within the search radius + from data points are assigned values based on the ``outside``, ``edge``, and + ``inside`` parameters. - The mask grid can be used to mask out specific regions in other grids using - :func:`pygmt.grdmath` or similar tools. For masking based on coastline features, - consider using :func:`pygmt.grdlandmask` instead. + The mask grid can be used to mask out specific regions from an grid. For masking + based on coastline features, consider using :func:`pygmt.grdlandmask` instead. Full GMT docs at :gmt-docs:`grdmask.html`. @@ -156,7 +155,7 @@ def grdmask( Pass in either a file name to an ASCII data table, a 2-D $table_classes containing the polygon(s) or data points. Input can be: - - **Polygon mode**: One or more files containing closed polygon coordinates + - **Polygon mode**: One or more polygons with closed coordinates - **Point coverage mode**: Data points (used with ``search_radius`` parameter) $outgrid $spacing From df07559f10aa734322357246a99bccecf9708c48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= Date: Thu, 9 Apr 2026 18:08:33 +0200 Subject: [PATCH 2/3] Add missing word --- pygmt/src/grdmask.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pygmt/src/grdmask.py b/pygmt/src/grdmask.py index 4bf3c6fae8e..d2262ef5aa2 100644 --- a/pygmt/src/grdmask.py +++ b/pygmt/src/grdmask.py @@ -133,8 +133,9 @@ def grdmask( from data points are assigned values based on the ``outside``, ``edge``, and ``inside`` parameters. - The mask grid can be used to mask out specific regions from an grid. For masking - based on coastline features, consider using :func:`pygmt.grdlandmask` instead. + The mask grid can be used to mask out specific regions from another grid. For + masking based on coastline features, consider using :func:`pygmt.grdlandmask` + instead. Full GMT docs at :gmt-docs:`grdmask.html`. From 722da1884b32fd38757563300c295c9e83b0313f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= Date: Thu, 9 Apr 2026 18:25:57 +0200 Subject: [PATCH 3/3] Move to raster data in api index --- doc/api/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/index.rst b/doc/api/index.rst index 5f67d019399..3e6dbe8f5cf 100644 --- a/doc/api/index.rst +++ b/doc/api/index.rst @@ -126,7 +126,6 @@ Operations on tabular data blockmedian blockmode filter1d - grdmask nearneighbor project select @@ -156,6 +155,7 @@ Operations on raster data grdhisteq.equalize_grid grdhisteq.compute_bins grdlandmask + grdmask grdpaste grdproject grdsample