3
$\begingroup$

Let's say I'm using a service like TOPCAT or Vizier's cross-matching service and I'm trying to match the RA and dec of the sources in Catalogue 1, with 100,000 sources, to those in Catalogue 2, with a million sources.

How does the algorithm deal with the difference in size when it gets to the end of the shortest catalogue? Does it loop around? Or am I making an incorrect assumption about how cross-matching works?

This question comes from my attempts at making my own algorithm using astropy's SkyCoord function; it won't let me broadcast together two differently-sized arrays.

$\endgroup$
1
  • $\begingroup$ This sounds like a basic database command question. Depending on what you really want to do, the answer could be as simple as a double loop, or a matrix operation on an array of size 1E5 by 1E6 . $\endgroup$ Sep 20, 2022 at 15:03

1 Answer 1

1
$\begingroup$

Leaving aside the technicalities of different algorithms for speeding up the matches,[*] the basic idea is that you are trying to find e.g. sources in Catalog 2 that are plausible matches to sources in Catalog 1 (e.g., located within $d$ arc seconds). The simplest (albeit computationally inefficient) method is to step through every source in Catalog 1, checking (all of) Catalog 2 for possible matches. When you get to the end of Catalog 1, you're done. "Looping around" would mean repeating all of the same calculations and tests you just did, which would be a complete waste of time.

[*] A simplistic example: pre-sort and index Catalog 2 by one of the coordinates (e.g., Right Ascension). Then, for a given source in Catalog 1, you only need to test sources from Catalog 2 that have RA within $\pm d$ arc seconds of the Catalog 1 source. (Most of these sources will be too far away in the other coordinate to end up being matches, but you know all the sources with $\Delta$RA $> d$ can't possibly be matches, so there's no need to waste time testing them.)

$\endgroup$
2
  • $\begingroup$ It's going to be tougher than that. Since the catalogs will have been prepared on different dates, possibly separated by decades, the sources will have to be adjusted for parallax and proper motion first. And the catalogs will have different error margins for each of those. Variations in luminosity, and the fact they're likely making observations at different wavelengths, make it even harder. $\endgroup$ Sep 26, 2022 at 13:22
  • $\begingroup$ @GregMiller Sure, though in some cases (e.g., galaxy or AGN catalogs) things like parallax and proper motion do not apply. And matching catalogs made using different wavelengths is one of the main reasons for doing catalog matching! (E.g., "How many of the X-ray sources in Catalog 1 can be matched with the radio sources in Catalog 2?") I don't see how those last two factors make anything "harder", though. $\endgroup$ Sep 26, 2022 at 15:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .