Skip to content

Commit 96e1476

Browse files
authored
Merge pull request #2607 from bsipocz/DOC_utils.tap_warnings
DOC: add warnings for non supported external usage of TAP/TAP+
2 parents f9b659d + 3eccad1 commit 96e1476

File tree

1 file changed

+22
-13
lines changed

1 file changed

+22
-13
lines changed

docs/utils/tap.rst

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22
33
.. _astroquery.utils.tap:
44

5+
.. Warning::
6+
This module is for internal astroquery use only with the purpose to
7+
support the modules developed and maintained by ESA (``astroquery.gaia``,
8+
``astroquery.esasky``, and modules within ``astroquery.esa``).
9+
If you need a TAP implementation, especially to access non-ESA services,
10+
we recommend to use `pyVO <https://pyvo.readthedocs.io/en/latest/>`__ instead.
11+
Our intention is to merge the functionalities and remove TAP/TAP+ from astroquery.
12+
13+
514
*********************************
615
TAP/TAP+ (`astroquery.utils.tap`)
716
*********************************
@@ -452,7 +461,7 @@ If you do not provide any parameters at all, a prompt will ask for user name and
452461
>>> from astroquery.gaia import Gaia
453462
>>> Gaia.login()
454463
>>> User: user
455-
>>> Password: pwd (not visible)
464+
>>> Password: pwd (not visible)
456465
457466
458467
To perform a logout
@@ -549,7 +558,7 @@ Now, you can query your table as follows:
549558
Now, you can query your table as follows:
550559

551560
.. code-block:: python
552-
561+
553562
>>> full_qualified_table_name = 'user_<your_login_name>.table_test_from_file'
554563
>>> query = 'select * from ' + full_qualified_table_name
555564
>>> job = gaia.launch_job(query=query)
@@ -566,13 +575,13 @@ Now, you can query your table as follows:
566575
>>> gaia.login()
567576
>>> j1 = gaia.launch_job_async("select top 10 * from gaiadr2.gaia_source")
568577
>>> job = gaia.upload_table_from_job(j1)
569-
578+
570579
Created table 't1539932994481O' from job: '1539932994481O'.
571580
572581
Now, you can query your table as follows:
573582

574583
.. code-block:: python
575-
584+
576585
>>> full_qualified_table_name = 'user_<your_login_name>.t1539932994481O'
577586
>>> query = 'select * from ' + full_qualified_table_name
578587
>>> job = gaia.launch_job(query=query)
@@ -599,7 +608,7 @@ Now, you can query your table as follows:
599608
Now, you can query your table as follows:
600609

601610
.. code-block:: python
602-
611+
603612
>>> full_qualified_table_name = 'user_<your_login_name>.my_table'
604613
>>> query = 'select * from ' + full_qualified_table_name
605614
>>> job = gaia.launch_job(query=query)
@@ -615,9 +624,9 @@ Now, you can query your table as follows:
615624
>>> gaia = TapPlus(url="http://gea.esac.esa.int/tap-server/tap")
616625
>>> gaia.login_gui()
617626
>>> job = gaia.delete_user_table("table_test_from_file")
618-
627+
619628
Table 'table_test_from_file' deleted.
620-
629+
621630
2.4. Updating metadata of table in user space
622631
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
623632

@@ -637,7 +646,7 @@ values for 'utype' and 'ucd' are free text
637646
value for 'flags' can be 'Ra', 'Dec', 'Mag', 'Flux' and 'PK'
638647
value for 'indexed' is a boolean indicating if the column is indexed
639648

640-
It is possible to specify a list of those changes for them to be applied at once.
649+
It is possible to specify a list of those changes for them to be applied at once.
641650
This is done by putting each of the changes in a list. See example below.
642651

643652
.. code-block:: python
@@ -646,11 +655,11 @@ This is done by putting each of the changes in a list. See example below.
646655
>>> gaia = TapPlus(url="http://gea.esac.esa.int/tap-server/tap")
647656
>>> gaia.login_gui()
648657
>>> gaia.update_user_table(table_name="user_<user_login_name>.my_table", list_of_changes=[["recno", "ucd", "ucd sample"], ["nobs","utype","utype sample"], ["raj2000","flags","Ra"], ["dej2000","flags","Dec"]])
649-
658+
650659
Retrieving table 'user_<user_login_name>.my_table'
651660
Parsing table 'user_<user_login_name>.my_table'...
652661
Done.
653-
Table 'user_<user_login_name>.my_table' updated.
662+
Table 'user_<user_login_name>.my_table' updated.
654663
655664
2.5. Tables sharing
656665
^^^^^^^^^^^^^^^^^^^
@@ -733,15 +742,15 @@ TAP+ services may provide a data access entry point.
733742
>>> gaia = TapPlus(url="http://gea.esac.esa.int/tap-server/tap")
734743
>>> params_dict = {}
735744
>>> params_dict['VALID_DATA'] = "true"
736-
>>> params_dict['ID'] = "1000103304040175360"
745+
>>> params_dict['ID'] = "1000103304040175360"
737746
>>> params_dict['FORMAT'] = "votable"
738747
>>> params_dict['RETRIEVAL_TYPE'] = "epoch_photometry"
739748
>>> gaia.load_data(params_dict=params_dict, output_file="results.vot")
740749
741750
You may download data into memory:
742751

743752
.. code-block:: python
744-
753+
745754
>>> results = gaia.load_data(params_dict=params_dict)
746755
747756
@@ -751,7 +760,7 @@ You may download data into memory:
751760
This service provides links to data:
752761

753762
.. code-block:: python
754-
763+
755764
>>> from astroquery.utils.tap.core import TapPlus
756765
>>> gaia = TapPlus(url="http://gea.esac.esa.int/tap-server/tap")
757766
>>> ids="1000103304040175360,1000117258390464896"

0 commit comments

Comments
 (0)