# 15.2 The cross-match algorithm

The cross-match algorithm used for Gaia DR3 follows the general principles and implementation of the one used in Gaia DR2, however we added new functionalities to address most of the issues found in the previous Gaia releases cross-match results. The cross-match results consist in two separate tables, the best_neighbour table, with the best matches, and the neighbourhood table which includes the best and additional matches which are less probable according to the algorithm we use, but which could still be a possible match.

In the following a brief the description of the cross-match algorithm is presented. The algorithm is not symmetric and a distinction between large dense surveys (where Gaia is the leading catalogue) and sparse catalogues (where Gaia is the second catalogue) is used. External catalogues are defined as dense surveys when it is possible to define a precise (i.e. based on a reasonable number of objects) and accurate (i.e. local) density around the majority of their objects. For the dense surveys the algorithm allows many-to-one matches, so that the higher Gaia resolution can be accounted for. In the best_neighbour table multiple Gaia sources matching with a single external catalogue source can be found (mates). The algorithm is positional and does not use photometric information (see Marrese et al. 2017 for a discussion of the general principles of the adopted algorithm). It uses the positions, their errors, their correlation and, when available, parallax, proper motions and the corresponding errors and correlations to move Gaia objects at the epoch of the external catalogue candidate match. When Gaia proper motions are not available, the position errors are broadened in order to account for the differences in observation epoch between catalogues.

An analysis of the cross-match results for DR2, showed that there are some effects that can jeopardise the cross-match by preventing sources to be matched and/or by making the matches less reliable, namely a) presence of multiples and/or duplicates in the external catalogues, b) underestimation of astrometric errors in the external catalogues, c) small issues in Gaia astrometry, especially for bright stars, and d) when an external catalogue source is resolved in Gaia, then all the Gaia sources corresponding to that external catalogue source can be too far to be matched. Binarity/variability is also affecting the cross-match when it has astrometric effects. However, we did not try to define a special treatment for binary/variable sources in Gaia DR3 cross-match, but we will wait for Gaia data.

When dealing with these issues we applied the following principles:

• a)

if an external catalogue source is being matched with a Gaia source with no proper motions, then a position error broadening is applied and none of the other special treatment is applied;

• b)

if an external catalogue source is being matched with a Gaia source with proper motions and a match is not found, then

• b1)

if the external catalogue source is flagged as resolved in Gaia, then the corresponding procedure is applied,

• b2)

if a match is not found, then the procedure to account for the underestimation of positional errors in the external catalogues is applied,

• b3)

if a match is not found, then the procedure to account for the small issues in Gaia astrometry (based on ipd_gof_harmonic_amplitude and ruwe values) is applied.

In the cross-match output tables (best_neighbour and neighbourhood) is present an xm_Flag which allows users to know which special treatments were applied in the cross-matching of that particular pair of sources. This flag is a bitmask (e.g., a value of 42 means that bits 2, 8, and 32 are all true). The bits are defined as:

• 0 = Initial value; resets all bits.

• 1 = The external catalogue object has one or more multiples. This means that there is at least another object with exactly the same astrometry.

• 2 = The external catalogue object has one or more suspected duplicates. This means that there is at least another object much closer than the catalogue angular resolution.

• 4 = The external catalogue object is resolved in Gaia.

• 8 = The Gaia object has a five parameters astrometric solution.

• 16 = The Gaia object has a two parameters astrometric solution.

• 32 = The external catalogue object is matched only after the special treatment for sources with under-estimated position errors.

• 64 = The external catalogue object is matched only after the special treatment for Gaia sources with large values of ipd_gof_harmonic_amplitude or ruwe.

For a detailed description of gaia_source columns ipd_gof_harmonic_amplitude and ruwe , see Chapter 4.

Details on the cross-match algorithms used for Gaia are given in Marrese et al. (2017) and Marrese et al. (2019).