[AstroPy] Re : Cross matching two source lists

Jerome Caron jerome_caron_astro at ymail.com
Fri May 11 10:12:10 EDT 2012

A side-question linked to matching two lists..
If the coordinate systems between the two lists are already matched, then the most simple algorithm is probably- remove the duplicates, i.e. the same (x2,y2) being paired with two different (x1,y1), and keep the closest pair.
- for each (x1,y1) find the closest (x2,y2) such that dist((x1,y1),(x2,y2))<=criterium
I think t
This occurs for instance with
list1 = (0,0), (3,0)
list2 = (1,0), (2,2)
findpairs(x1, y1, x2, y2, criterium) -> 1 pair
findpairs(x2, y2, x1, y1, criterium) -> 2 pairs
Sorry for distracting the discussion from the initial thread..
Thankshis algorithm has the feature that findpairs(x1, y1, x2, y2, criterium) and findpairs(x2, y2, x1, y1, criterium) (reversed arguments) may not always return the same results. Is there any solution to this ?

De : Thomas Robitaille <thomas.robitaille at gmail.com>
À : astropy mailing list <astropy at scipy.org> 
Envoyé le : Vendredi 11 mai 2012 10h03
Objet : [AstroPy] Cross matching two source lists

Hi everyone,

I am looking for a Python package that can do arbitrary and efficient
cross-matching of source lists, i.e. some kind of kd-tree that uses
spherical rather than euclidean distances. Is anyone aware of such a

AstroPy mailing list
AstroPy at scipy.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20120511/a905617e/attachment.html>

More information about the AstroPy mailing list