Closed
Description
This is the central issue to track the implementation of the pygmt.grdclip
method.
- GMT doc: https://docs.generic-mapping-tools.org/6.5/grdclip.html
- PyGMT doc: https://www.pygmt.org/dev/api/generated/pygmt.grdclip.html
- GMT.jl doc: https://www.generic-mapping-tools.org/GMTjl_doc/documentation/modules/grdclip/
GMT options
Checked: Implemented; Unchecked: To be implemented/discussed; Strikethrough: Won't implement.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
4) Gallery|tutorial example
Relationships
Development
No branches or pull requests
Activity
seisman commentedon Mar 29, 2025
grdclip
is one of the simple modules that have very few options. In PR #3883, I've tried to improve thepygmt.grdclip
function, but before that, I'd like to ask your opinion about renaming the parameternew
toreplace
.new
old
ornew
(GMT.jl allows multiple aliases for the same option)replace
ornew
(https://github.com/GenericMappingTools/gmt/blob/23be98456397b75c44f5701d1c47936739f021f7/src/longopt/grdclip_inc.h#L30)I feel
replace
is a better name thannew
.yvonnefroehlich commentedon Mar 29, 2025
For me a renaming to
replace
makes sense, as this alias is more descriptive.seisman commentedon Mar 31, 2025
This option is aliased as
above
, with the Pythonic syntax accepting a two-value sequence (e.g.,above=(100, 200)
). However, there is no direct Pythonic equivalent for the +e modifier. If users need to include equality, a simple workaround is to slightly decrease high (e.g.,above=(99.999, 200)
). In other words, there is no need to implement a dedicated Pythonic solution for +e.The same goes for
-Sb
.For
-Si
and-Sr
, both of them can be repeated for as many intervals as are needed. Currently,between
andreplace
only accept 1-D sequence. PR #3883 will adds 2-D sequence support to these two parameters.