Skip to content

DOC: Improve docs of grdmask#4524

Draft
yvonnefroehlich wants to merge 10 commits intomainfrom
improve-docs-grdmask
Draft

DOC: Improve docs of grdmask#4524
yvonnefroehlich wants to merge 10 commits intomainfrom
improve-docs-grdmask

Conversation

@yvonnefroehlich
Copy link
Copy Markdown
Member

@yvonnefroehlich yvonnefroehlich commented Apr 9, 2026

Description of proposed changes

Some improvements of the documentation of pygmt.grdmask.

Fixes: #4528, #4463 (comment)

Preview:

Guidelines

Slash Commands

You can write slash commands (/command) in the first line of a comment to perform
specific operations. Supported slash command is:

  • /format: automatically format and lint the code

@yvonnefroehlich yvonnefroehlich added this to the 0.19.0 milestone Apr 9, 2026
@yvonnefroehlich yvonnefroehlich self-assigned this Apr 9, 2026
@yvonnefroehlich yvonnefroehlich added documentation Improvements or additions to documentation skip-changelog Skip adding Pull Request to changelog labels Apr 9, 2026
Comment thread doc/api/index.rst
grdhisteq.equalize_grid
grdhisteq.compute_bins
grdlandmask
grdmask
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

grdmask operates on tabular data and produces grid data. I think the old version is correct

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. What is the difference to grdlandmask?

My understanding is that the region parameter defines the area. This area can be considered as a grid with nodes based on the given spacing. The provided polygons (in tabular data format) defines which nodes are inside, outside, and on the edges.

Just looking at the GMT docs and there grdmask is listed under "Grid operations" (https://docs.generic-mapping-tools.org/dev/modules.html#grid-operations) similar to grdlandmask.

@seisman seisman added the skip-changelog Skip adding Pull Request to changelog label Apr 11, 2026
Comment thread pygmt/src/grdmask.py
@yvonnefroehlich yvonnefroehlich marked this pull request as draft April 16, 2026 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation skip-changelog Skip adding Pull Request to changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pygmt.grdmask: Improve docs for "inside", "outside" and "edge" parameters

2 participants