This directory has the source of the autocorrelation used to compute the contrast sensitivity table. See 2019A&A...621A..86B for background. Since we assume EDR2 has a limit of ~20 mag, and radii >5'' are only relevant when Δm>9, we do two queries, one for objects brighter than 11 with a large radius, one of objects fainter than 11 with a smaller radius. To (re-) create mock_pairs.csv, just run psql gavo < autocorr.sql -- this contains psql instrumentation to spit out some pseudo-CSV. Since a naive pair selection yields a humungous number of results (2.5e9 for the basic cut-at-11 query), we're further filtering in the outer loop. We're approximating the 99% curve from Table 1 in 2019A&A...621A..86B with s = 0.84 (Δm-0.5) + 0.66 -- that's pretty much throughout on the safe side. From mock_pairs.csv, based on the lookup table in the paper, make_detectability.py creates data/detectability.csv, a text file of (source_id, sensitivity) that's then further processed in q.rd Run make_detectability.py in this directory.