Skip to content
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

Wrap nearneighbor #1379

Merged
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
3777b07
Add implementation of nearneighbor
JamieJQuinn Jul 8, 2021
0ef1683
Improve formatting
JamieJQuinn Jul 8, 2021
1fccc07
Add nearneighbor to API index
JamieJQuinn Jul 8, 2021
91c1707
Apply suggestions from code review
JamieJQuinn Jul 13, 2021
51fa503
Fix unused import
JamieJQuinn Jul 16, 2021
0fbc83a
Update pygmt/src/nearneighbor.py
JamieJQuinn Aug 4, 2021
4ae19cb
Add similar figure to that found in GMTs nearneighbor documentation
JamieJQuinn Aug 4, 2021
cedcda2
Don't use which in test
JamieJQuinn Sep 8, 2021
a4bb96e
Name test more appropriately
JamieJQuinn Sep 8, 2021
fc43c85
Add newer common options
JamieJQuinn Sep 8, 2021
57aba71
Update pygmt/src/nearneighbor.py
JamieJQuinn Sep 8, 2021
620e99a
Remove unused import
JamieJQuinn Sep 8, 2021
62d4522
Apply suggestions from code review
weiji14 Sep 15, 2021
e09981f
Merge branch 'main' into feature/implement-nearneighbour
weiji14 Sep 15, 2021
c22ebb0
Fix lint errors
weiji14 Sep 15, 2021
38cb0f7
Set incols (i) to use sequence_comma
weiji14 Sep 16, 2021
dcdf379
Merge branch 'main' into feature/implement-nearneighbour
weiji14 Sep 16, 2021
d09d63d
Remove test_nearneighbor_input_xy_no_z
weiji14 Sep 16, 2021
3e33f3a
Ignore flake8 error using noqa W505
weiji14 Sep 17, 2021
b7fb6a9
Merge branch 'main' into feature/implement-nearneighbour
weiji14 Sep 18, 2021
6118d23
Fix incorrect indentation
weiji14 Sep 18, 2021
f344cf5
Shorten line length to under 100 using the dev image
weiji14 Sep 18, 2021
b187b4c
Merge branch 'main' into feature/implement-nearneighbour
weiji14 Sep 18, 2021
a0da121
Apply suggestions from code review
weiji14 Sep 18, 2021
3349396
Merge two tests using pytest parametrize
weiji14 Sep 18, 2021
758e8bb
Merge branch 'main' into feature/implement-nearneighbour
weiji14 Sep 20, 2021
523e5ec
Remove unused GMTInvalidInput import
weiji14 Sep 20, 2021
281c49d
Merge branch 'main' into feature/implement-nearneighbour
weiji14 Sep 22, 2021
3857cf9
Typo fixes
weiji14 Sep 22, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add similar figure to that found in GMTs nearneighbor documentation
  • Loading branch information
JamieJQuinn committed Aug 4, 2021
commit 4ae19cbb35e693d69d9c3ceda2dd36096e7dfb85
9 changes: 9 additions & 0 deletions pygmt/src/nearneighbor.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,15 @@ def nearneighbor(x=None, y=None, z=None, data=None, **kwargs):
criteria and :math:`r_i` is the distance from the node to the *i*'th data
point. If no data weights are supplied then :math:`w_i = 1`.

.. figure:: https://docs.generic-mapping-tools.org/latest/_images/GMT_nearneighbor.png
:width: 300 px
:align: center

Search geometry includes the search radius (R) which limits the points
considered and the number of sectors (here 4), which restricts how points inside
the search radius contribute to the value at the node. Only the closest point
in each sector (red circles) contribute to the weighted estimate.

Takes a matrix, xyz triples, or a file name as input.

Must provide either ``data`` or ``x``, ``y``, and ``z``.
Expand Down