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

Precise nearest neighbor mapping for extremely close points (e.g., weirs/levess) #207

Merged
merged 3 commits into from
Apr 11, 2021

Conversation

WPringle
Copy link
Collaborator

adding precise option (calls Matlab's native knnsearch) in nearest_neighbor_map and calling in the carry over weirs routine since sometimes the weir points can be so close together that the precision of ANN ourKNNsearch fails while matlab's knnsearch works

I added a check for the presence of knnsearch in case the user doesn't have it.

…y over weirs routine since sometimes the weir points can be so close toghether that the precision of ANN ourKNNsearch fails while matlab's knnsearch works
@krober10nd
Copy link
Collaborator

wow how thin are your weirs that this is a problem?

@WPringle
Copy link
Collaborator Author

So they made them on top of each other but to get it work with OM2D I moved them slightly by around ~1e-6 deg

@krober10nd
Copy link
Collaborator

ah okay 10 cm. seems reasonable :]

@krober10nd
Copy link
Collaborator

Did you see the small change in #206 ? I had to make these arrays column otherwise I could not carry over.

@WPringle
Copy link
Collaborator Author

WPringle commented Apr 4, 2021

Added code for toggling plotting of fort.24 in Make_f24 and fixing slope_calc bug in #208

@krober10nd
Copy link
Collaborator

krober10nd commented Apr 8, 2021

Is this completed to warrant running all the tests?

@WPringle
Copy link
Collaborator Author

WPringle commented Apr 8, 2021

yes it's completed

@krober10nd
Copy link
Collaborator

krober10nd commented Apr 8, 2021

Running Example_2 produces the following figure with several incorrectly labeled ocean boundaries.

Screen Shot 2021-04-08 at 8 29 57 PM

@WPringle
Copy link
Collaborator Author

WPringle commented Apr 8, 2021

Running Example_2 produces the following figure with several incorrectly labeled ocean boundaries.

Screen Shot 2021-04-08 at 8 29 57 PM

right but this is not related to this PR right

@WPringle
Copy link
Collaborator Author

WPringle commented Apr 8, 2021

I'll make a new PR for improving the make_bc

@krober10nd
Copy link
Collaborator

I guess. I thought that we had used OurKnnsearch for labeling boundaries.

@WPringle
Copy link
Collaborator Author

WPringle commented Apr 8, 2021

this PR doesn't use that change. Only for carrying over weirs. Otherwise the "approximate" nearest neighbor (i.e. ourKNNsearch) is used.

@krober10nd
Copy link
Collaborator

krober10nd commented Apr 9, 2021

All tests/examples worked out (we'll need to do a different PR to highlight the API change in make_bc that we talked about on Slack). I could not test the global example on my laptop due to insufficient RAM.

@WPringle WPringle merged commit 8fdc5ba into Projection Apr 11, 2021
@WPringle WPringle deleted the precise_knn_map branch April 11, 2021 05:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants