Thanks! I've tried that:
query = """
SELECT ra, dec, l, b, phot_g_mean_mag
FROM gaia_dr1.gaia_source
WHERE q3c_poly_query(ra, dec, '{0, 0, 0.2, 0, 0.2, 0.1, 0, 0.1}');
"""
but got some error back:
queryClientError: Error: function q3c_poly_query(double precision, double precision, unknown) is not unique
LINE 4: WHERE 't'=q3c_poly_query(ra, dec, '{0, 0, 0.2, 0, 0.2, 0.1, ...
^
HINT: Could not choose a best candidate function. You might need to add explicit type casts.
But then this query:
query = """
SELECT ra, dec, l, b, phot_g_mean_mag
FROM gaia_dr1.gaia_source
WHERE q3c_poly_query(cast(ra as double precision), cast(dec as double precision), '{0, 0, 0.2, 0, 0.2, 0.1, 0, 0.1}');
"""
returned the same error ...
Any idea what I am doing wrong?