-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Properly allow for either pixel or gridline registered grids #476
Merged
Merged
Changes from 5 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
ebd3e00
Add registration (r) to common options
weiji14 bb7afdc
Allow virtualfile_from_grid to accept a registration argument
weiji14 08edf6f
Try using GMT_GRID_PIXEL_REG as default instead of GMT_GRID_NODE_REG
weiji14 8ce734d
Merge branch 'master' into grid_registration
seisman 47b5b68
Let pygmt know about geographic grids
weiji14 522ceba
Revert back to using Cartesian mode, but be explicit this time
weiji14 d203cd5
Set valid GMT data mode as GMT_IS_OUTPUT
weiji14 90b22a4
Revert "Try using GMT_GRID_PIXEL_REG as default instead of GMT_GRID_N…
weiji14 6d4ece4
Automatically detect grid registration from xarray data source
weiji14 b252b9d
Prevent segfault crash when passing pixel registered grids on GMT < 6.1
weiji14 93881c5
Merge branch 'master' into grid_registration
weiji14 572b499
Have `grdinfo` and `grdtrack` autodetect registration type too
weiji14 0812c50
Put autodetect_registration code directly inside virtualfile_from_grid
weiji14 5cb2cee
Lint
weiji14 16d9240
Autodetect grid type as Cartesian or Geographic coordinate system
weiji14 046a5e3
Merge branch 'master' into grid_registration
weiji14 3215b0c
Patch to fix crash when registration is GMT_GRID_PIXEL_REG in GMT 6.0
weiji14 88ceba2
Separate input and output registration
weiji14 bc2c2f0
Merge branch 'master' into grid_registration
weiji14 bff3254
Remove unused-import, silence redefined-outer-name warning
weiji14 1fc91f8
Expect registration type in dataarray's node_offset attribute
weiji14 6892e4b
Simplify grid region extent calculation
weiji14 d8fd6b5
Merge branch 'master' into grid_registration
weiji14 0e593d8
Expect gtype in dataarray's geocoord_type attribute
weiji14 00a46ca
Merge branch 'master' into grid_registration
weiji14 0f84f04
Refactor virtualfile_from_grid and dataarray_to_matrix to use accessor
weiji14 5c5be94
Fix tests where virtual grid had wrong region, registration and gtype
weiji14 22dfe74
Expect failures from two grdview tests that used wrong coordinate system
weiji14 53dc9c9
Fix test_grdimage_over_dateline by using gridline instead of pixel reg
weiji14 0a73114
Run test_grdimage_over_dateline with debug mode on
weiji14 fe0fbc5
Replace unnecessary comprehension with generator
weiji14 5a0c639
Flip grid array left right in xarray instead of in numpy
weiji14 5a685b2
Deep copy grid using xarray.DataArray.copy instead of numpy.copy
weiji14 40bc7f9
Merge branch 'master' into grid_registration
weiji14 d0be1c5
Reduce image size from 1 inch to 1 cm
weiji14 46c8471
Test with a grid that does not reach the North Pole
weiji14 3499047
Try just running test_grdimage_over_dateline first before other tests
weiji14 bf03e5b
Don't use pytest --no-summary which is a pytest 6.0.0rc1 feature
weiji14 60c791d
Revert "Deep copy grid using xarray.DataArray.copy instead of numpy.c…
weiji14 c411a95
Say why we need to run test_grdimage_over_dateline before other tests
weiji14 217a7d7
Register the custom runfirst pytest marker
weiji14 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. I didn't mean this change. Users can pass both Cartesian and geographic grids to GMT. We need to use
GMT_CONTAINER_ONLY
orGMT_CONTAINER_ONLY|GMT_GRID_IS_GEO
for different grid types.BTW,
GMT_CONTAINER_ONLY
is equivalent toGMT_CONTAINER_ONLY|GMT_GRID_IS_CARTESIAN
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah sorry, I thought it 'knew' automatically what the grid type was. Should actually get some tests in for this.
Ok, good to know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for reference, this was added in GMT 5.4. See: