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

xmatch.cds does not handle duplicates correctly #23

Open
jobovy opened this issue Jul 16, 2019 · 0 comments
Open

xmatch.cds does not handle duplicates correctly #23

jobovy opened this issue Jul 16, 2019 · 0 comments

Comments

@jobovy
Copy link
Owner

jobovy commented Jul 16, 2019

If an input catalog to xmatch.cds has duplicates, not every duplicate will necessarily get matched, because of this line, which in the cds_matchback function causes every object in the matched CDS catalog to be matched back to the original catalog, and this may lead to different objects being matched to, say, the first of a set of duplicates (rather than matching this object to each duplicate).

Possible fix: swap mc1 and mc2, but then have an index into the wrong array. An argsort can then swap this index into one into the correct array (I think).

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

No branches or pull requests

1 participant