Skip to content

Commit

Permalink
TST: various minor doctest fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bsipocz committed Jun 18, 2024
1 parent c34d6c6 commit 02f9072
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 29 deletions.
4 changes: 1 addition & 3 deletions docs/cadc/cadc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ these collections:
>>> from astroquery.cadc import Cadc
>>> cadc = Cadc()
>>> for collection, details in sorted(cadc.get_collections().items()):
... print(f'{collection} : {details}')
... print(f'{collection} : {details}') # doctest: +IGNORE_OUTPUT
...
APASS : {'Description': 'The APASS collection at the CADC', 'Bands': ['Optical', 'Infrared|Optical', '']}
BLAST : {'Description': 'The BLAST collection at the CADC', 'Bands': ['', 'Millimeter']}
Expand Down Expand Up @@ -313,8 +313,6 @@ To get a list of table objects:
caom2.HarvestState
caom2.SIAv1
ivoa.ObsCore
ivoa.ObsFile
ivoa.ObsPart
tap_schema.schemas
tap_schema.tables
tap_schema.columns
Expand Down
6 changes: 3 additions & 3 deletions docs/esa/xmm_newton/xmm_newton.rst
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ stored in the file 'results10.csv'. The result of this query can be printed by d
INFO: Retrieving tables... [astroquery.utils.tap.core]
INFO: Parsing tables... [astroquery.utils.tap.core]
INFO: Done. [astroquery.utils.tap.core]
['tap_config.coord_sys', 'tap_config.properties', 'tap_schema.columns',
['public.dual', 'tap_config.coord_sys', 'tap_config.properties', 'tap_schema.columns',
'tap_schema.key_columns', 'tap_schema.keys', 'tap_schema.schemas',
'tap_schema.tables', 'xsa.dual', 'xsa.v_all_observations', 'xsa.v_epic_source',
'tap_schema.tables', 'xsa.v_all_observations', 'xsa.v_epic_source',
'xsa.v_epic_source_cat', 'xsa.v_epic_xmm_stack_cat', 'xsa.v_exposure',
'xsa.v_instrument_mode', 'xsa.v_om_source', 'xsa.v_om_source_cat',
'xsa.v_proposal', 'xsa.v_proposal_observation_info', 'xsa.v_publication',
Expand Down Expand Up @@ -205,7 +205,7 @@ If you are repeatedly getting failed queries, or bad/out-of-date results, try cl
>>> from astroquery.esa.xmm_newton import XMMNewton
>>> XMMNewton.clear_cache()
If this function is unavailable, upgrade your version of astroquery.
If this function is unavailable, upgrade your version of astroquery.
The ``clear_cache`` function was introduced in version 0.4.7.dev8479.


Expand Down
48 changes: 25 additions & 23 deletions docs/gaia/gaia.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ degrees around an specific point in RA/Dec coordinates. The results are sorted b
>>> r = Gaia.query_object_async(coordinate=coord, width=width, height=height)
INFO: Query finished. [astroquery.utils.tap.core]
>>> r.pprint(max_lines=12, max_width=130)
dist solution_id DESIGNATION ... ebpminrp_gspphot_upper libname_gspphot
dist solution_id designation ... ebpminrp_gspphot_upper libname_gspphot
... mag
--------------------- ------------------- ---------------------------- ... ---------------------- ---------------
0.0026043272506261527 1636148068921376768 Gaia DR3 6636090334814214528 ... --
Expand All @@ -126,7 +126,7 @@ Queries return a limited number of rows controlled by ``Gaia.ROW_LIMIT``. To cha
>>> r = Gaia.query_object_async(coordinate=coord, width=width, height=height)
INFO: Query finished. [astroquery.utils.tap.core]
>>> r.pprint(max_width=140)
dist solution_id DESIGNATION ... ebpminrp_gspphot_lower ebpminrp_gspphot_upper libname_gspphot
dist solution_id designation ... ebpminrp_gspphot_lower ebpminrp_gspphot_upper libname_gspphot
... mag mag
--------------------- ------------------- ---------------------------- ... ---------------------- ---------------------- ---------------
0.0026043272506261527 1636148068921376768 Gaia DR3 6636090334814214528 ... -- --
Expand All @@ -146,7 +146,7 @@ To return an unlimited number of rows set ``Gaia.ROW_LIMIT`` to -1.
>>> r = Gaia.query_object_async(coordinate=coord, width=width, height=height)
INFO: Query finished. [astroquery.utils.tap.core]
>>> r.pprint(max_lines=12, max_width=140)
dist solution_id DESIGNATION ... ebpminrp_gspphot_lower ebpminrp_gspphot_upper libname_gspphot
dist solution_id designation ... ebpminrp_gspphot_lower ebpminrp_gspphot_upper libname_gspphot
... mag mag
--------------------- ------------------- ---------------------------- ... ---------------------- ---------------------- ---------------
0.0026043272506261527 1636148068921376768 Gaia DR3 6636090334814214528 ... -- --
Expand Down Expand Up @@ -176,7 +176,7 @@ radius argument.
INFO: Query finished. [astroquery.utils.tap.core]
>>> r = j.get_results()
>>> r.pprint()
solution_id DESIGNATION ... dist
solution_id designation ... dist
...
------------------- ---------------------------- ... ---------------------
1636148068921376768 Gaia DR3 6636090334814214528 ... 0.0026043272506261527
Expand Down Expand Up @@ -207,15 +207,15 @@ To load only table names metadata (TAP+ capability):
INFO: Done. [astroquery.utils.tap.core]
>>> for table in tables:
... print(table.get_qualified_name())
external.external.apassdr9
external.external.catwise2020
external.external.gaiadr2_astrophysical_parameters
external.external.gaiadr2_geometric_distance
external.external.gaiaedr3_distance
external.apassdr9
external.catwise2020
external.gaiadr2_astrophysical_parameters
external.gaiadr2_geometric_distance
external.gaiaedr3_distance
...
tap_schema.tap_schema.keys
tap_schema.tap_schema.schemas
tap_schema.tap_schema.tables
tap_schema.keys
tap_schema.schemas
tap_schema.tables

To load all tables metadata (TAP compatible):

Expand All @@ -227,11 +227,12 @@ To load all tables metadata (TAP compatible):
INFO: Parsing tables... [astroquery.utils.tap.core]
INFO: Done. [astroquery.utils.tap.core]
>>> print(tables[0])
TAP Table name: external.external.apassdr9
TAP Table name: external.apassdr9
Description: The AAVSO Photometric All-Sky Survey - Data Release 9
This publication makes use of data products from the AAVSO
Photometric All Sky Survey (APASS). Funded by the Robert Martin Ayers
Sciences Fund and the National Science Foundation. Original catalogue released by Henden et al. 2015 AAS Meeting #225, id.336.16. Data retrieved using the VizieR catalogue access tool, CDS, Strasbourg, France. The original description of the VizieR service was published in A&AS 143, 23. VizieR catalogue II/336.
Size (bytes): 22474547200
Num. columns: 25


Expand All @@ -242,8 +243,9 @@ To load only a table (TAP+ capability):
>>> from astroquery.gaia import Gaia
>>> gaiadr3_table = Gaia.load_table('gaiadr3.gaia_source')
>>> print(gaiadr3_table)
TAP Table name: gaiadr3.gaiadr3.gaia_source
TAP Table name: gaiadr3.gaia_source
Description: This table has an entry for every Gaia observed source as published with this data release. It contains the basic source parameters, in their final state as processed by the Gaia Data Processing and Analysis Consortium from the raw data coming from the spacecraft. The table is complemented with others containing information specific to certain kinds of objects (e.g.~Solar--system objects, non--single stars, variables etc.) and value--added processing (e.g.~astrophysical parameters etc.). Further array data types (spectra, epoch measurements) are presented separately via Datalink resources.
Size (bytes): 3646930329600
Num. columns: 152


Expand Down Expand Up @@ -411,7 +413,7 @@ Query without saving results in a file:
INFO: Query finished. [astroquery.utils.tap.core]
>>> r = job.get_results()
>>> print(r)
DESIGNATION ra dec
designation ra dec
deg deg
---------------------- ------------------ --------------------
Gaia DR3 4295806720 44.99615537864534 0.005615226341865997
Expand Down Expand Up @@ -524,15 +526,15 @@ To obtain a list of the tables shared to a user type the following::
INFO: Done. [astroquery.utils.tap.core]
>>> for table in (tables):
... print(table.get_qualified_name())
external.external.apassdr9
external.external.gaiadr2_astrophysical_parameters
external.external.gaiadr2_geometric_distance
external.external.gaiaedr3_distance
external.apassdr9
external.gaiadr2_astrophysical_parameters
external.gaiadr2_geometric_distance
external.gaiaedr3_distance
... ... ...
tap_schema.tap_schema.key_columns
tap_schema.tap_schema.keys
tap_schema.tap_schema.schemas
tap_schema.tap_schema.tables
tap_schema.key_columns
tap_schema.keys
tap_schema.schemas
tap_schema.tables

2.3. Uploading table to user space
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down

0 comments on commit 02f9072

Please sign in to comment.