Skip to content

psevents: Allow -R to be determined automatically from input data - #9163

Merged
Esteban82 merged 1 commit into
masterfrom
psevents-optional-R
Aug 28, 2026
Merged

psevents: Allow -R to be determined automatically from input data#9163
Esteban82 merged 1 commit into
masterfrom
psevents-optional-R

Conversation

@Esteban82

Copy link
Copy Markdown
Member

Tested with:
printf "1 1 3\n0 0 3\n" | gmt events -T3 -Gred -Sc0.1c -JX3c -Ba -Ra -png lixo

Previously this failed with Must specify -R option since -Ra had no way to determine the region for psevents; now it correctly infers -R from the input data.

Assisted-by: Claude Sonnet 5 (Medium effort)

Change THIS_MODULE_NEEDS from "JR" to "Jd" so that when -R is not
given, gmtinit_determine_R_option_from_data() /
gmtinit_set_missing_R_from_datasets() in gmt_init.c will compute the
bounding box from the input dataset (equivalent to running gmtinfo on
it) and inject it before the module parses options.

This matches the existing behavior of the other plotting modules that
read dataset input, such as psxy, psxyz, pscontour, psclip, pswiggle,
psternary and psmask, all of which already use "Jd".

Assisted-by: Claude Sonnet 5 (Medium effort)
@Esteban82
Esteban82 requested review from joa-quim and seisman August 28, 2026 15:36
@Esteban82 Esteban82 added enhancement Improving an existing feature add-changelog Add PR to the changelog AI-assisted All (or most) of the code was written by Artificial Intelligence. labels Aug 28, 2026
@Esteban82 Esteban82 added this to the 6.8.0 milestone Aug 28, 2026
@Esteban82
Esteban82 requested a review from a team August 28, 2026 15:37
@Esteban82
Esteban82 merged commit 71cf454 into master Aug 28, 2026
11 of 14 checks passed
@Esteban82
Esteban82 deleted the psevents-optional-R branch August 28, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

add-changelog Add PR to the changelog AI-assisted All (or most) of the code was written by Artificial Intelligence. enhancement Improving an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants