Skip to content

Commit f012164

Browse files
authored
Merge pull request #2763 from ceb8/cache_documentation
Caching documentation update
2 parents ab7fdaa + d3fb8db commit f012164

File tree

58 files changed

+714
-66
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+714
-66
lines changed

astroquery/atomic/core.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,10 @@ def query_object(self, *, wavelength_range=None, wavelength_type=None, wavelengt
140140
Angular momentum, Transition probability and Level energies
141141
respectively.
142142
143+
cache : bool
144+
Defaults to True. If set overrides global caching behavior.
145+
See :ref:`caching documentation <astroquery_cache>`.
146+
143147
Returns
144148
-------
145149
result : `~astropy.table.Table`

astroquery/casda/core.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,9 @@ def query_region_async(self, coordinates, *, radius=1*u.arcmin, height=None, wid
113113
the width for a box region
114114
get_query_payload : bool, optional
115115
Just return the dict of HTTP request parameters.
116-
cache: bool, optional
117-
Use the astroquery internal query result cache
116+
cache : bool
117+
Defaults to True. If set overrides global caching behavior.
118+
See :ref:`caching documentation <astroquery_cache>`.
118119
119120
Returns
120121
-------

astroquery/esa/hsa/core.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ def download_data(self, *, retrieval_type="OBSERVATION", observation_id=None,
6565
values: ALL, AUXILIARY, CALIBRATION, LEVEL0, LEVEL0_5, LEVEL1, LEVEL2, LEVEL2_5, LEVEL3, ALL-LEVEL3
6666
download_dir : string, optional
6767
The directory in which the file will be downloaded
68+
cache : bool
69+
Defaults to True. If set overrides global caching behavior.
70+
See :ref:`caching documentation <astroquery_cache>`.
6871
6972
Returns
7073
-------

astroquery/esa/xmm_newton/core.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ def download_data(self, observation_id, *, filename=None, verbose=False,
104104
extension : string
105105
file format, optional, by default all formats
106106
values: ASC, ASZ, FTZ, HTM, IND, PDF, PNG
107+
cache : bool
108+
Defaults to True. If set overrides global caching behavior.
109+
See :ref:`caching documentation <astroquery_cache>`.
107110
108111
Returns
109112
-------

astroquery/eso/core.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,8 @@ def list_instruments(self, *, cache=True):
312312
-------
313313
instrument_list : list of strings
314314
cache : bool
315-
Cache the response for faster subsequent retrieval
315+
Defaults to True. If set overrides global caching behavior.
316+
See :ref:`caching documentation <astroquery_cache>`.
316317
317318
"""
318319
if self._instrument_list is None:
@@ -335,7 +336,8 @@ def list_surveys(self, *, cache=True):
335336
-------
336337
survey_list : list of strings
337338
cache : bool
338-
Cache the response for faster subsequent retrieval
339+
Defaults to True. If set overrides global caching behavior.
340+
See :ref:`caching documentation <astroquery_cache>`.
339341
"""
340342
if self._survey_list is None:
341343
survey_list_response = self._request(
@@ -372,7 +374,8 @@ def query_surveys(self, *, surveys='', cache=True,
372374
specified as a string, should be a comma-separated list of
373375
survey names.
374376
cache : bool
375-
Cache the response for faster subsequent retrieval
377+
Defaults to True. If set overrides global caching behavior.
378+
See :ref:`caching documentation <astroquery_cache>`.
376379
377380
Returns
378381
-------
@@ -436,7 +439,8 @@ def query_main(self, *, column_filters={}, columns=[],
436439
``column_filters`` and ``columns`` for the requested
437440
``instrument``.
438441
cache : bool
439-
Cache the response for faster subsequent retrieval.
442+
Defaults to True. If set overrides global caching behavior.
443+
See :ref:`caching documentation <astroquery_cache>`.
440444
441445
Returns
442446
-------
@@ -473,7 +477,8 @@ def query_instrument(self, instrument, *, column_filters={}, columns=[],
473477
``column_filters`` and ``columns`` for the requested
474478
``instrument``.
475479
cache : bool
476-
Cache the response for faster subsequent retrieval.
480+
Defaults to True. If set overrides global caching behavior.
481+
See :ref:`caching documentation <astroquery_cache>`.
477482
478483
Returns
479484
-------
@@ -549,6 +554,9 @@ def get_headers(self, product_ids, *, cache=True):
549554
----------
550555
product_ids : either a list of strings or a `~astropy.table.Column`
551556
List of data product IDs.
557+
cache : bool
558+
Defaults to True. If set overrides global caching behavior.
559+
See :ref:`caching documentation <astroquery_cache>`.
552560
553561
Returns
554562
-------

astroquery/heasarc/core.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ def query_async(self, request_payload, *, cache=True, url=None):
4141
"""
4242
Submit a query based on a given request_payload. This allows detailed
4343
control of the query to be submitted.
44+
45+
cache (bool) defaults to True. If set overrides global caching behavior.
46+
See :ref:`caching documentation <astroquery_cache>`.
4447
"""
4548

4649
if url is None:
@@ -53,6 +56,9 @@ def query_async(self, request_payload, *, cache=True, url=None):
5356
def query_mission_list(self, *, cache=True, get_query_payload=False):
5457
"""
5558
Returns a list of all available mission tables with descriptions
59+
60+
cache (bool) defaults to True. If set overrides global caching behavior.
61+
See :ref:`caching documentation <astroquery_cache>`.
5662
"""
5763
request_payload = self._args_to_payload(
5864
entry='none',
@@ -91,6 +97,9 @@ def query_mission_cols(self, mission, *, cache=True, get_query_payload=False,
9197
* Standard : Return default table columns
9298
* All (default) : Return all table columns
9399
* <custom> : User defined csv list of columns to be returned
100+
cache : bool, optional
101+
Defaults to True. If set overrides global caching behavior.
102+
See :ref:`caching documentation <astroquery_cache>`.
94103
All other parameters have no effect
95104
"""
96105

@@ -121,6 +130,9 @@ def query_object_async(self, object_name, mission, *,
121130
parameter.
122131
mission : str
123132
Mission table to search from
133+
cache : bool
134+
Defaults to True. If set overrides global caching behavior.
135+
See :ref:`caching documentation <astroquery_cache>`.
124136
**kwargs :
125137
see `~astroquery.heasarc.HeasarcClass._args_to_payload` for list
126138
of additional parameters that can be used to refine search query
@@ -159,6 +171,9 @@ def query_region_async(self, position: Union[coordinates.SkyCoord, str],
159171
radius :
160172
Astropy Quantity object, or a string that can be parsed into one.
161173
e.g., '1 degree' or 1*u.degree.
174+
cache : bool
175+
Defaults to True. If set overrides global caching behavior.
176+
See :ref:`caching documentation <astroquery_cache>`.
162177
**kwargs :
163178
see `~astroquery.heasarc.HeasarcClass._args_to_payload` for list
164179
of additional parameters that can be used to refine search query

astroquery/ipac/irsa/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@ def list_catalogs(self, full=False, cache=False):
227227
full : bool
228228
If True returns the full schema VOTable. If False returns a dictionary of the table names and
229229
their description.
230-
231230
"""
232231
tap_tables = Irsa.query_tap("SELECT * FROM TAP_SCHEMA.tables")
233232

@@ -239,6 +238,7 @@ def list_catalogs(self, full=False, cache=False):
239238
# TODO, deprecate this as legacy
240239
def print_catalogs(self):
241240
catalogs = self.list_catalogs()
241+
242242
for catname in catalogs:
243243
print("{:30s} {:s}".format(catname, catalogs[catname]))
244244

astroquery/ipac/irsa/ibe/core.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,8 @@ def list_missions(self, *, cache=True):
258258
Parameters
259259
----------
260260
cache : bool
261-
Cache the query result
261+
Defaults to True. If set overrides global caching behavior.
262+
See :ref:`caching documentation <astroquery_cache>`.
262263
"""
263264
if hasattr(self, '_missions') and cache:
264265
# extra level caching to avoid redoing the BeautifulSoup parsing
@@ -288,7 +289,8 @@ def list_datasets(self, *, mission=None, cache=True):
288289
`~astroquery.ipac.irsa.ibe.IbeClass.list_missions`. Defaults to the
289290
configured Mission
290291
cache : bool
291-
Cache the query result
292+
Defaults to True. If set overrides global caching behavior.
293+
See :ref:`caching documentation <astroquery_cache>`.
292294
293295
Returns
294296
-------
@@ -331,7 +333,8 @@ def list_tables(self, *, mission=None, dataset=None, cache=True):
331333
A dataset name. Must be one of the valid dataset from
332334
``list_datsets(mission)``. Defaults to the configured Dataset
333335
cache : bool
334-
Cache the query result
336+
Defaults to True. If set overrides global caching behavior.
337+
See :ref:`caching documentation <astroquery_cache>`.
335338
336339
Returns
337340
-------

astroquery/jplhorizons/core.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,10 @@ def ephemerides_async(self, *, airmass_lessthan=99,
580580
extra_precision : boolean, optional
581581
Enables extra precision in RA and DEC values; default: False
582582
583+
cache : bool
584+
Defaults to True. If set overrides global caching behavior.
585+
See :ref:`caching documentation <astroquery_cache>`.
586+
583587
584588
Returns
585589
-------
@@ -825,6 +829,10 @@ def elements_async(self, *, get_query_payload=False,
825829
Return raw data as obtained by JPL Horizons without parsing the data
826830
into a table, default: False
827831
832+
cache : bool
833+
Defaults to True. If set overrides global caching behavior.
834+
See :ref:`caching documentation <astroquery_cache>`.
835+
828836
829837
Returns
830838
-------
@@ -1058,6 +1066,10 @@ def vectors_async(self, *, get_query_payload=False,
10581066
Triggers output of time-varying difference between TDB and UT
10591067
time-scales. Default: False
10601068
1069+
cache : bool
1070+
Defaults to True. If set overrides global caching behavior.
1071+
See :ref:`caching documentation <astroquery_cache>`.
1072+
10611073
10621074
Returns
10631075
-------

astroquery/jplsbdb/core.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ def query_async(self, targetid, *, id_type='search',
107107
get_uri : boolean, optional
108108
Add the query URI to the output as ``query_uri`` field.
109109
Default: ``False``
110+
cache : bool
111+
Defaults to True. If set overrides global caching behavior.
112+
See :ref:`caching documentation <astroquery_cache>`.
110113
111114
Returns
112115
-------

0 commit comments

Comments
 (0)