Skip to content

Commit 0ecad92

Browse files
gbrammerbsipocz
authored andcommitted
update docs
1 parent 5e92a44 commit 0ecad92

File tree

3 files changed

+26
-3
lines changed

3 files changed

+26
-3
lines changed

CHANGES.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ New Tools and Services
88
Service fixes and enhancements
99
------------------------------
1010

11+
eso
12+
^^^
13+
14+
- Add option to retrieve_data from an earlier archive query [#1614]
15+
1116
sdss
1217
^^^^
1318

astroquery/eso/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -629,8 +629,8 @@ def _download_file(self, url, local_filepath, **kwargs):
629629
return resp
630630

631631
def retrieve_data(self, datasets, continuation=False, destination=None,
632-
with_calib='none', request_all_objects=False, unzip=True,
633-
request_id=None):
632+
with_calib='none', request_all_objects=False,
633+
unzip=True, request_id=None):
634634
"""
635635
Retrieve a list of datasets form the ESO archive.
636636
@@ -660,7 +660,7 @@ def retrieve_data(self, datasets, continuation=False, destination=None,
660660
default.
661661
request_id : str, int
662662
Retrieve from an existing request number rather than sending a new
663-
query, with the `request_id` from the URL in the email sent from
663+
query, with the identifier from the URL in the email sent from
664664
the archive from the earlier request as in:
665665
666666
https://dataportal.eso.org/rh/requests/[USERNAME]/[request_id]

docs/eso/eso.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,24 @@ a ``location`` keyword in the call to :meth:`~astroquery.eso.EsoClass.retrieve_d
348348
In all cases, if a requested dataset is already found,
349349
it is not downloaded again from the archive.
350350

351+
By default, calling ``eso.retrieve_data`` submits a new archive request
352+
through the web form to stage and download the requested ``datasets``. If you
353+
would like to download datasets from an existing request, either submitted
354+
through the functions here or externally, call ``retrieve_data`` with the
355+
``request_id`` option:
356+
357+
.. code-block:: python
358+
359+
>>> data_files = eso.retrieve_data(table['DP.ID'][:2], request_id=999999)
360+
361+
The ``request_id`` can be found in the automatic email sent by the archive after
362+
staging the initial request, i.e., https://dataportal.eso.org/rh/requests/[USERNAME]/{request_id}. A summary of your available requests is shown at https://dataportal.eso.org/rh/requests/[USERNAME]/recentRequests.
363+
364+
Note: The function does check that the specified retrieval URL based on
365+
``request_id`` is valid and then that the datasets indicated there are
366+
consistent with the user-specified ``datasets``, but there is currently no
367+
reverse checking that the specified ``datasets`` are provided in
368+
``request_id``.
351369

352370
Reference/API
353371
=============

0 commit comments

Comments
 (0)