You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement grdtrack which "Sample grids at specified (x,y) locations". Continuing to add data processing functionality to pygmt following my earlier work on #245.
Handle I/O better, as mentioned here. Should we separate data reading/writing from data processing? I.e. have pygmt function running only on pandas tables, xarray grids.
Idea for structure
Store the grdtrack function under sampling.py. Similar to how e.g. surface is under gridding.py.
# File at gmt/sampling.py"""GMT modules for Sampling of 1-D and 2-D Data"""defgrdtrack(table: pd.DataFrame, grid: xr.DataArray, **kwargs):
Are you willing to help implement and maintain this feature? Yes
The text was updated successfully, but these errors were encountered:
Initial commit for #307. Implement GMT grdtrack function under sampling.py. Test cases checking proper pandas.DataFrame and xarray.DataArray inputs stored in test_grdtrack.py. Sample datasets for tests uses newly created load_east_pacific_rise_grid and load_ocean_ridge_points functions in datasets/tutorial.py.
GMT grdtrack documentation can be found at https://gmt.soest.hawaii.edu/doc/latest/grdtrack. Originally, grdtrack should take in an xyfile and -Ggridfile as parameters, and pass the output table to stdout. Here, the implementation (currently) takes in a pandas.DataFrame table and xarray.DataArray grid instead as input, and returns a pandas.DataFrame with an extra column for the sampled grid data.
Description of the desired feature
Implement
grdtrack
which "Sample grids at specified (x,y) locations". Continuing to add data processing functionality topygmt
following my earlier work on #245.The
grdtrack
function belongs to the "Sampling of 1-D and 2-D Data" family of functions in GMT (see module quickref). It is slightly tricky to implement as it takes 2 input files (a table and a grid), but is nevertheless useful for people working on stuff like radar or laser altimetry, as mentioned by @steo85it in https://gitter.im/GenericMappingTools/pygmt?at=5c89603a8f294b134a38ed82.Notes
sample1d
,grdsample
, etc.hawaii_topo.nc
would be nice but I can't find it, so I'm suggesting@ridge.txt
and@spac_33.nc
used in https://gmt.soest.hawaii.edu/doc/latest/gallery/ex33.html.Idea for structure
Store the
grdtrack
function undersampling.py
. Similar to how e.g.surface
is undergridding.py
.Are you willing to help implement and maintain this feature? Yes
The text was updated successfully, but these errors were encountered: