Uh oh!
There was an error while loading. Please reload this page.
Conversation
Minimal xarray.DataArray output with data and coordinates, no metadata yet.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
d8f1160 to
d0517e0CompareSpecial case `earth_day` to be loaded as GMT_IMAGE rather than GMT_GRID. Need to use `GMT_OUT|GMT_IS_REFERENCE` in virtualfile_out to avoid segfault, xref #3115.
Extra metadata from the _GMT_GRID_HEADER struct.
Reorder the dimensions to follow Channel, Height, Width (CHW) convention. Also added doctest checking output DataArray object and the image's x and y coordinates.
Get the registration and gtype info from the grid header and apply it to the GMT accessor attributes.
Trying to match some of the doctests in _GMT_GRID.
seisman
commented
Dec 24, 2024
I think it's better to not introduce last-minute breaking changes, so bump this PR to v0.15.0. |
weiji14
left a comment
There was a problem hiding this comment.
Still think using the private gmt_raster_type func as mentioned at #3115 (comment) would be the best solution to auto-detect the raster kind, but failing that, the logic here to explicitly have the user pass in the type works too.
Just one typo on the match-case statement, and should be ok to merge once all tests pass without coverage misses.
Uh oh!
There was an error while loading. Please reload this page.
This PR applies virtualfiles in
pygmt.grdcut, so that this function doesn't have to write to temporary files (#2730).grdcutis on of the complicated module that it works for grid, image and cube. We have to know thekindof the input before calling theSession.virtualfile_outmethod.It turns out it's not trivial to determine the data
kindof an input file. We have some options:.ncis a grid,.tifis a image)kindparameter (default to"grid") and users should specify thekindparameter.Option 1-2 may not always work; option 3 also dosn't always work (see #3115 (comment)).
This PR currently adopts option 4. Need to note option 4 meaning BREAKING:
grdcut("@earth_day_01d")works; now must usegrdcut("@earth_day_01d", kind="image")