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
SkyCoordobjects or index into them in the callback cross-match criterion function: https://github.com/astropy/astropy/issues/3323#issuecomment-71657245Parameters: table1, table2 :
TableInput tables
xmatch_criterion : callable
Callable that takes two
Rowobjects as input and returns True / False when they match / don’t match.return_indices : bool
Returns: matches :
TableMatch table (one match per row)