Skip to content

Reset header zmin and zmax before getting grid subregion - #5940

Merged
PaulWessel merged 1 commit into
masterfrom
fix-cpt-range
Nov 3, 2021
Merged

PaulWessel merged 1 commit into
masterfrom
fix-cpt-range

Conversation

@maxrjones

Copy link
Copy Markdown
Member

Description of proposed changes

This is a partial fix for the bug reported in #5294. Previously the header zmin and zmax were not reset prior to comparing to data values in the grid subregion, such that the min/max for the entire grid was always chosen.

There's still an additional issue where the region extracted for a virtual file might be offset by one row relative to the region extracted for an actual file, leading to a slight difference in the z-range:

grdimage [INFORMATION]: Auto-stretching CPT file geo to fit data range -3893 to 3195.5

grdimage [INFORMATION]: Auto-stretching CPT file geo to fit data range -3824.5 to 3195.5

Addresses #5294

Reminders

  • Make sure that your code follows our style. Use the other functions/files as a basis.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Describe changes to function behavior and arguments in a comment below the function declaration.
  • If adding new functionality, add a detailed description to the documentation and/or an example.

@PaulWessel PaulWessel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yep, good one.

@PaulWessel
PaulWessel merged commit f6c54c2 into master Nov 3, 2021
@PaulWessel
PaulWessel deleted the fix-cpt-range branch November 3, 2021 20:49
@maxrjones maxrjones added the bug Something isn't working label Nov 12, 2021

This branch was previously deployed

1 inactive deployment
Preview — e8cea63c Deployed Nov 3, 2021 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants