indices_xmatch_fields

utilipy.data_utils.indices_xmatch_fields(catalog: numpy.recarray, *others: numpy.recarray, fields: List[str]) → Tuple[List[numpy.array], Dict[str, Sequence]][source]

Indices of xmatch of catalogs’ data field(s) against a source catalog.

This function is for discrete-valued data, such as tags. For coordinates, see indices_xmatch_coords.

This match is done on all the fields simultaneously, so in terms or a 2D array, two rows are considered a match only if all the values in the columns fields match.

Parameters
catalogTable or recarray

The source catalog against which the others catalogs are matched.

*othersTable or recarray

match these against catalog

fieldslist

List of fields on which to match. ex, [“color”, “location”] where both catalog and other have those columns, hopefully with some matching values.

Returns
idxslist of ndarrays

each element of list is the x-match indices into the ith catalog, starting with catalog. So the i=0 index list is for catalog and the i=1 index list is the x-match indices for the first table in others.

infodict

Useful information. Nothing yet.

Notes

Todo

try more axes tricks to avoid loops.