astronomy-commons / lsdb

Large Survey DataBase
https://lsdb.io
BSD 3-Clause "New" or "Revised" License
19 stars 5 forks source link

More options for nearest neighbor selection for KdTreeCrossmatch #151

Open hombit opened 9 months ago

hombit commented 9 months ago

Currently, we have two ways to control neighbor selection with the KdTreeCrossmatch algorithm: the maximum number of neighbors to select n_neighbors and the maximum radius radius_arcsec. However, it would be beneficial to add more flexibility:

I propose that we keep this issue open for discussions while creating separate issues for individual tasks.

nevencaplar commented 9 months ago

@hombit Can you just explain a little bit what you mean by ``set a minimum radius'' - skip a match if it it below a certain distance? Is this so that you ensure that you are matching to a different object in a crossmatch, making sure to avoid the same object in the second catalog?

hombit commented 9 months ago

@nevencaplar, yes, I meant this. I was thinking about catalog self-matching. For example, you'd like to find wide binaries and looking for pairs of stars in 2''. However, you wouldn't like to have objects to match to themselves, so you would set nthmatch=2. However, it wouldn't work with some catalogs having the same sky source to be represented by few rows, for instance "source" catalogs, or catalogs with duplicated objects such as PS1 DR2.

nevencaplar commented 3 months ago

What is happening here? I see that this ticket has a pull from April? @camposandro ?

camposandro commented 3 months ago

We left #271 on hold during the feature freeze leading to the IVOA demos and I didn't have the chance to look back into it. I need to resolve the merge conflicts and request a new review.