From 4c173544aae0e1afc51cb47847b76b0b2ddd42b1 Mon Sep 17 00:00:00 2001 From: Mfon Eti-mfon Date: Sat, 24 Oct 2020 02:08:35 +0100 Subject: [PATCH] Update documentation for the gaia query object Refs #1760 --- docs/gaia/gaia.rst | 112 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 91 insertions(+), 21 deletions(-) diff --git a/docs/gaia/gaia.rst b/docs/gaia/gaia.rst index bfd25dab1b..2f40f1dc29 100644 --- a/docs/gaia/gaia.rst +++ b/docs/gaia/gaia.rst @@ -92,15 +92,85 @@ degrees around an specific point in RA/Dec coordinates. >>> r = Gaia.query_object_async(coordinate=coord, width=width, height=height) >>> r.pprint() - dist solution_id ... ecl_lat - ... Angle[deg] - --------------------- ------------------- ... ------------------- - 0.0026029414438061079 1635378410781933568 ... -36.779151653783892 - 0.0038537557334594502 1635378410781933568 ... -36.773899692008634 - 0.0045451702670639632 1635378410781933568 ... -36.772645786277522 - 0.0056131312891700424 1635378410781933568 ... -36.781488832325074 - ... ... ... ... - Length = 152 rows + dist solution_id ... epoch_photometry_url + ... + --------------------- ------------------- ... -------------------- + 0.0026034636994048854 1635721458409799680 ... + 0.0038518741347606357 1635721458409799680 ... + 0.00454542650096783 1635721458409799680 ... + 0.005613919443965546 1635721458409799680 ... + 0.005846434715822121 1635721458409799680 ... + 0.006209042666371929 1635721458409799680 ... + 0.007469463683838576 1635721458409799680 ... + 0.008202004514524316 1635721458409799680 ... + 0.008338509690874027 1635721458409799680 ... + 0.008406677772258921 1635721458409799680 ... + ... ... ... ... + 0.01943176697471851 1635721458409799680 ... + 0.019464719601172412 1635721458409799680 ... + 0.019467068628703368 1635721458409799680 ... + 0.019752561500226976 1635721458409799680 ... + 0.01991656886177004 1635721458409799680 ... + 0.020149589233310516 1635721458409799680 ... + 0.020307185970548904 1635721458409799680 ... + 0.020454730686780127 1635721458409799680 ... + 0.020802655215768254 1635721458409799680 ... + 0.021615117161838747 1635721458409799680 ... + Length = 50 rows + +Queries return a limited number of rows controlled by ``Gaia.ROW_LIMIT``. To change the default behaviour set this appropriately. + +.. code-block:: python + + >>> Gaia.ROW_LIMIT = 8 + >>> r = Gaia.query_object_async(coordinate=coord, width=width, height=height) + >>> r.pprint() + + dist solution_id ... epoch_photometry_url + ... + --------------------- ------------------- ... -------------------- + 0.0026034636994048854 1635721458409799680 ... + 0.0038518741347606357 1635721458409799680 ... + 0.00454542650096783 1635721458409799680 ... + 0.005613919443965546 1635721458409799680 ... + 0.005846434715822121 1635721458409799680 ... + 0.006209042666371929 1635721458409799680 ... + 0.007469463683838576 1635721458409799680 ... + 0.008202004514524316 1635721458409799680 ... + +To return an unlimited number of rows set ``Gaia.ROW_LIMIT`` to -1. + +.. code-block:: python + + >>> Gaia.ROW_LIMIT = -1 + >>> r = Gaia.query_object_async(coordinate=coord, width=width, height=height) + >>> r.pprint() + + dist solution_id ... epoch_photometry_url + ... + --------------------- ------------------- ... -------------------- + 0.0026034636994048854 1635721458409799680 ... + 0.0038518741347606357 1635721458409799680 ... + 0.00454542650096783 1635721458409799680 ... + 0.005613919443965546 1635721458409799680 ... + 0.005846434715822121 1635721458409799680 ... + 0.006209042666371929 1635721458409799680 ... + 0.007469463683838576 1635721458409799680 ... + 0.008202004514524316 1635721458409799680 ... + 0.008338509690874027 1635721458409799680 ... + 0.008406677772258921 1635721458409799680 ... + ... ... ... ... + 0.049718018073992835 1635721458409799680 ... + 0.04977869666747251 1635721458409799680 ... + 0.05006096698512638 1635721458409799680 ... + 0.05038566478030134 1635721458409799680 ... + 0.050827895451955894 1635721458409799680 ... + 0.050860907684754444 1635721458409799680 ... + 0.051038347209386326 1635721458409799680 ... + 0.05121063325107872 1635721458409799680 ... + 0.051957226883925664 1635721458409799680 ... + 0.05320916763883812 1635721458409799680 ... + Length = 176 rows 1.2. Cone search @@ -121,16 +191,16 @@ radius argument. >>> r = j.get_results() >>> r.pprint() - dist solution_id ... ecl_lat - ... Angle[deg] - --------------------- ------------------- ... ------------------- - 0.0026029414438061079 1635378410781933568 ... -36.779151653783892 - 0.0038537557334594502 1635378410781933568 ... -36.773899692008634 - 0.0045451702670639632 1635378410781933568 ... -36.772645786277522 - 0.0056131312891700424 1635378410781933568 ... -36.781488832325074 - ... ... ... ... - Length = 2000 rows - + solution_id designation ... dist + ... + ------------------- ---------------------------- ... --------------------- + 1635721458409799680 Gaia DR2 6636090334814214528 ... 0.0026034636994048854 + 1635721458409799680 Gaia DR2 6636090339113063296 ... 0.0038518741347606357 + 1635721458409799680 Gaia DR2 6636090334814217600 ... 0.00454542650096783 + 1635721458409799680 Gaia DR2 6636089583198816640 ... 0.005613919443965546 + 1635721458409799680 Gaia DR2 6636090334814218752 ... 0.005846434715822121 + ... ... ... ... + Length = 50 rows 1.3. Getting public tables metadata @@ -257,7 +327,7 @@ available formats are: 'votable', 'votable_plain', 'fits', 'csv' and 'json', def ... "matched_observations,duplicated_source,phot_variable_flag " ... "from gaiadr2.gaia_source order by source_id", ... dump_to_file=True, output_format='votable') - >>> print(job.outputFile) + >>> print(job.outputFile) 1592474300458O-result.vot.gz @@ -541,7 +611,7 @@ Your schema name will be automatically added to the provided table name. >>> url = ("http://tapvizier.u-strasbg.fr/TAPVizieR/tap/sync/?" ... "REQUEST=doQuery&lang=ADQL&FORMAT=votable&" ... "QUERY=select+*+from+TAP_SCHEMA.columns+where+table_name='II/336/apass9'") - + >>> job = Gaia.upload_table(upload_resource=url, table_name="table_test_from_url", ... table_description="Some description")