Forward model of the Gaia DR3 selection function
The completeness of an astronomical catalogue depends on its selection function, which is a combination of the observing strategy, instrumental characteristics, and intrinsic properties of the sources being observed. This is particularly complex for Gaia, whose non-uniform scanning law and onboard prioritisation of bright sources in dense areas make its selection function vary strongly with celestial position and source brightness. We estimate the Gaia DR3 source catalogue selection function across the whole sky and over the full magnitude range, using only data from the Gaia catalogue and knowledge of the nominal scanning law as provided by the Gaia Observation Forecast Tool. We develop a hierarchical Bayesian model that estimates the number of times Gaia scanned each celestial position jointly with the source detection efficiency, and fit it via Markov chain Monte Carlo to the 1 806 196 447 sources in Gaia DR3 with reported celestial positions, G magnitudes, and astrometric matched transit counts. Gaia DR3 is essentially complete for G in (5, 19.5) in the on-sky median. After that, the completeness decreases with magnitude according to the scanning law pattern combined with the imprint of crowded regions. The completeness is also lower at the very bright end of the survey, consistent with the known limitations on Gaia observations of bright stars. We find an unexpected completeness increase beyond G ~ 21, which we conclude is an artefact caused by extended sources, as confirmed by cross-matching against Euclid's Q1 catalogue. Treating the scanning law as part of the inference process, and anchoring it to all Gaia DR3 sources of all magnitudes on a fine-grained grid on the sky, removes the need for an explicit crowding correction. The resulting selection function, valid everywhere where Gaia data are available, is released as part of the GaiaUnlimited Python package. [abridged]