## CSCview: Crossmatch Probability Calculation

The CSCview Crossmatch feature allows the user to enter a table of source positions and optionally, position errors, into the GUI and return the list of all CSC source positions which match the sources in the input list, determined by user search criteria and the crossmatch algorithm used by CSCview. The separation in arcseconds of each CSC source match from the corresponding source in the input list is returned, along with a measure of the probability that it is a true match. A probability value of 1.0 means that the CSC source returned for the corresponding source in the user-input list is an exact match (down to many significant digits in the source position), and a probability of 0.0 means it is very unlikely that it is a true match.

The crossmatch probabilities have different interpretations depending on whether or not the user has supplied position errors for their input sources. The probability formulae below describe the two different cases.

## Case 1: User provides source positions but not position errors

For each candidate matching a user-supplied source position and a catalog source position, the probability is computed as follows:

1. Compute the radial separation $$r$$ (in arcseconds, because $$err\_ellipse\_r0$$ is in arcseconds) between the user-supplied source position and the catalog master source position (as for the current CSCview cone search).

2. Compute the $$\sigma$$ equivalent to the catalog master source position error:

3. Compute the one-dimensional probability that the separation between the catalog position and the user supplied position is greater than or equal to the radial separation $$r$$ between the positions:

where $$\mathrm{erfc}$$ is the complementary error function: $$\mathrm{erfc}(x) = 1 - \mathrm{erf}(x)$$.

Note that if $$r=0$$ then $$p_{sep}=1$$ while $$r \rightarrow \infty$$ should give $$p_{sep} \rightarrow 0$$.

## Case 2: User provides source positions and position errors

For each source position provided by the user, we assume they provide the corresponding $$1\sigma$$ radial Gaussian position error $$\sigma_{user}$$ in arcseconds.

For each candidate matching a user-supplied source position and a catalog source position, the probability is computed as follows:

1. Compute the radial separation $$r$$ (in arcseconds, because $$\mathtt{err\_ellipse\_r0}$$ is in arcseconds) between the user-supplied source position and the catalog master source position (as for the current CSCview cone search).

2. Compute the $$\sigma$$ equivalent to the catalog master source position error:

3. Compute the joint probability that the catalog source position and the user source position match under the assumption of circularly symmetric Gaussian errors:

Note that if $$r=0$$ and $$\sigma_{cat}=\sigma_{user}$$ should give $$p_{joint}=1$$ and $$r \rightarrow \infty$$ should give $$p_{sep} \rightarrow 0$$.