Note
You are not reading the most up to date version of Gammapy documentation.
Access the latest stable version v1.3 or the list of Gammapy releases.
table_xmatch¶
-
gammapy.catalog.
table_xmatch
(table1, table2, xmatch_criterion, return_indices=True)[source]¶ Cross-match rows from two tables with a cross-match criterion callback.
Note: This is a very flexible and simple way to find matching rows from two tables, but it can be very slow, e.g. if you create
SkyCoord
objects or index into them in the callback cross-match criterion function: https://github.com/astropy/astropy/issues/3323#issuecomment-71657245Parameters: table1, table2 :
Table
Input tables
xmatch_criterion : callable
Callable that takes two
Row
objects as input and returns True / False when they match / don’t match.return_indices : bool
Returns: matches :
Table
Match table (one match per row)