Skip to content

Commit e36a788

Browse files
authored
Merge pull request #3477 from juanmcloaiza/3473
Add docs note about authenticated queries
2 parents 55b1980 + e5f62ad commit e36a788

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

docs/eso/eso.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,33 @@ interaction with the ESO archive.
103103
INFO: Downloading file 1/1 https://dataportal.eso.org/dataPortal/file/ADP.2023-03-02T01:01:24.355
104104
ERROR: Access denied to https://dataportal.eso.org/dataPortal/file/ADP.2023-03-02T01:01:24.355
105105

106+
107+
.. The doctest-skip directive is not working for pytest within the note directive, thus
108+
we leave the snippet below as a code-block
109+
110+
.. note::
111+
112+
Even after logging with `~astroquery.eso.EsoClass.login()`, TAP queries are not authenticated by default. To issue
113+
authenticated queries, the keyword argument ``authenticated`` must be set to `True` explicitly in the query functions.
114+
For example:
115+
116+
.. code-block:: python
117+
118+
eso = Eso()
119+
eso.ROW_LIMIT = None
120+
eso.login(username="ICONDOR")
121+
122+
# Some files are missing without `authenticated=True`
123+
files_tbl = eso.query_instrument("nirps")
124+
125+
# Get all files to which the authenticated user has access
126+
files_tbl = eso.query_instrument("nirps", authenticated=True)
127+
128+
Review your queries carefully and update them accordingly to ensure you are retrieving
129+
all your expected results. If you don't stricly need to run an authenticated query, use
130+
the default ``authenticated=False``, since it will retrieve your results much faster.
131+
132+
106133
Automatic password
107134
------------------
108135

0 commit comments

Comments
 (0)