Selection functions of large spectroscopic surveys
  Context. Large spectroscopic surveys open the way to explore our Galaxy. In
order to use the data from these surveys to understand the Galactic stellar
population, we need to be sure that stars contained in a survey are a
representative subset of the underlying population. Without the selection
function taken into account, the results might reflect the properties of the
selection function rather than those of the underlying stellar population.
Aims. In this work, we introduce a method to estimate the selection function
for a given spectroscopic survey. We apply this method to a large sample of
public spectroscopic surveys. Methods. We apply a median division binning
algorithm to bin observed stars in the colour-magnitude space. This approach
produces lower uncertainties and lower biases of the selection function
estimate as compared to traditionally used 2D-histograms. We run a set of
simulations to verify the method and calibrate the one free parameter it
contains. These simulations allow us to test the precision and accuracy of the
method. Results. We produce and publish estimated values and uncertainties of
selection functions for a large sample of public spectroscopic surveys. We
publicly release the code used to produce the selection function estimates.
Conclusions. The effect of the selection function on distance modulus and
metallicity distributions of stars in surveys is important for surveys with
small and largely inhomogeneous spatial coverage. For surveys with contiguous
spatial coverage the effect of the selection function is almost negligible.
