Uh oh!
There was an error while loading. Please reload this page.
Expand table-like input options for sphdistance - #1491
Conversation
Uh oh!
There was an error while loading. Please reload this page.
weiji14
left a comment
There was a problem hiding this comment.
Could you also:
- Rename
tabletodataat L25, L61, and also inpygmt/tests/test_sphdistance.py - At L52: Insert blank line between:
Return type depends on whether the ``outgrid`` parameter is set:
- :class:`xarray.DataArray` if ``outgrid`` is not set
to prevent a Sphinx warning pygmt/pygmt/src/sphdistance.py:docstring of pygmt.src.sphdistance.sphdistance:67: WARNING: Unexpected indentation
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
seisman
commented
Sep 23, 2021
Do you want to add "xyz" input support (like #1531) in this PR or a separate PR? |
willschlitzer
commented
Sep 23, 2021
I can give it a try. |
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.
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
willschlitzer
commented
Sep 26, 2021
@seisman Doesn't |
seisman
commented
Sep 26, 2021
I've never used |
willschlitzer
commented
Sep 26, 2021
So should I then remove |
seisman
commented
Sep 26, 2021
Yes, please. Sorry for misleading you. |
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
weiji14
left a comment
There was a problem hiding this comment.
The docstring description reads: sphdistance reads one or more ASCII [or binary] files (or standard input), but 'standard input' (stdin) doesn't make sense in the Python world, suggest rewording it to use just 'table', similar to #1418 (comment).
| def sphdistance(table, **kwargs): | ||
| def sphdistance(data=None, x=None, y=None, **kwargs): | ||
| r""" | ||
| Create Voroni polygons from lat/lon coordinates. |
There was a problem hiding this comment.
Typo here. Also, just noticed that this summary doesn't seem correct. It seems to suggest Voronoi polygons are created, but the output is a raster grid, not a vector polygon. Maybe follow https://docs.generic-mapping-tools.org/6.2/sphdistance.html.
| CreateVoronipolygonsfromlat/loncoordinates. | |
| CreateVoronoipolygonsfromlat/loncoordinates. |
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
seisman
commented
Sep 28, 2021
@willschlitzer The tests fail because the Windows server cannot download the cache file Please trigger the |
willschlitzer
commented
Sep 28, 2021
@seisman How do I do this? |
seisman
commented
Sep 28, 2021
You need to uncomment the following line (removing the leading |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
…1491) *Add parameter and tests for x/y inputs *Rename "table" parameter to "data" *Improve docstring for new parameters Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com> Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
This pull request adds
datato the parameter list in the docstring and moves thesphdistancefunction to the tabular data section in the index.Fixes #
Reminders
make formatandmake checkto make sure the code follows the style guide.doc/api/index.rst.Slash Commands
You can write slash commands (
/command) in the first line of a comment to performspecific operations. Supported slash commands are:
/format: automatically format and lint the code/test-gmt-dev: run full tests on the latest GMT development version