Skip to content

pygmt.blockmean/blockmedian/blockmode: Add the center parameter (-C) - #4780

Merged
seisman merged 2 commits into
GenericMappingTools:mainfrom
Aayush7788:add-block-center-alias
Aug 1, 2026
Merged

pygmt.blockmean/blockmedian/blockmode: Add the center parameter (-C)#4780
seisman merged 2 commits into
GenericMappingTools:mainfrom
Aayush7788:add-block-center-alias

Conversation

@Aayush7788

@Aayush7788 Aayush7788 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Description of proposed changes

This PR adds a center parameter to pygmt.blockmean, pygmt.blockmedian, and pygmt.blockmode.

The parameter maps to GMT's -C option using AliasSystem. When center=True, the center of each block is used as the output location.

This change is needed for the gallery example in #4771.

Related to #4771

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

Comment thread pygmt/tests/test_blockm.py Outdated
@seisman seisman added enhancement Improving an existing feature final review call This PR requires final review and approval from a second reviewer labels Jul 31, 2026
@seisman seisman added this to the 0.20.0 milestone Jul 31, 2026
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Aug 1, 2026
@seisman seisman changed the title pygmt.blockmean/blockmedian/blockmode: Add the center parameter pygmt.blockmean/blockmedian/blockmode: Add the center parameter (-C) Aug 1, 2026
@seisman
seisman merged commit a5154d4 into GenericMappingTools:main Aug 1, 2026
22 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improving an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants