Skip to content

Commit b2b8346

Browse files
committed
rename kwarg to be consistent with existing API in the ESA modules
1 parent bc0ea97 commit b2b8346

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

astroquery/ipac/irsa/core.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def tap(self):
4747
self._tap = TAPService(baseurl=self.tap_url, session=self._session)
4848
return self._tap
4949

50-
def query_tap(self, query, *, async_mode=False, maxrec=None):
50+
def query_tap(self, query, *, async_job=False, maxrec=None):
5151
"""
5252
Send query to IRSA TAP. Results in `~pyvo.dal.TAPResults` format.
5353
result.to_qtable in `~astropy.table.QTable` format
@@ -56,8 +56,8 @@ def query_tap(self, query, *, async_mode=False, maxrec=None):
5656
----------
5757
query : str
5858
ADQL query to be executed
59-
async_mode : bool, optional
60-
if True query is run as an async job
59+
async_job : bool, optional
60+
if True query is run in asynchronous mode
6161
maxrec : int, optional
6262
maximum number of records to return
6363
@@ -71,9 +71,9 @@ def query_tap(self, query, *, async_mode=False, maxrec=None):
7171
TAP query result as `~astropy.table.QTable`
7272
7373
"""
74-
log.debug(f'Query is run in async mode: {async_mode}\n TAP query: {query}')
74+
log.debug(f'Query is run in async mode: {async_job}\n TAP query: {query}')
7575

76-
if async_mode:
76+
if async_job:
7777
return self.tap.run_async(query, language='ADQL', maxrec=maxrec)
7878
else:
7979
return self.tap.run_sync(query, language='ADQL', maxrec=maxrec)
@@ -161,7 +161,7 @@ def list_collections(self, servicetype=None):
161161
@deprecated_renamed_argument(("selcols", "cache", "verbose"), ("columns", None, None), since="0.4.7")
162162
def query_region(self, coordinates=None, *, catalog=None, spatial='Cone',
163163
radius=10 * u.arcsec, width=None, polygon=None,
164-
get_query_payload=False, columns='*', async_mode=False,
164+
get_query_payload=False, columns='*', async_job=False,
165165
verbose=False, cache=True):
166166
"""
167167
Queries the IRSA TAP server around a coordinate and returns a `~astropy.table.Table` object.
@@ -196,8 +196,8 @@ def query_region(self, coordinates=None, *, catalog=None, spatial='Cone',
196196
Defaults to `False`.
197197
columns : str, optional
198198
Target column list with value separated by a comma(,)
199-
async_mode : bool, optional
200-
if True query is run as an async job
199+
async_job : bool, optional
200+
if True query is run in asynchronous mode
201201
202202
Returns
203203
-------
@@ -247,7 +247,7 @@ def query_region(self, coordinates=None, *, catalog=None, spatial='Cone',
247247

248248
if get_query_payload:
249249
return adql
250-
response = self.query_tap(query=adql, async_mode=async_mode)
250+
response = self.query_tap(query=adql, async_job=async_job)
251251

252252
return response.to_table()
253253

docs/ipac/irsa/irsa.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,13 +186,13 @@ star HIP 12 with just the ra, dec and w1mpro columns would be:
186186
Async queries
187187
--------------
188188

189-
For bigger queries it is recommended using the ``async_mode`` keyword option. When used,
190-
the query is send in asyncronous mode.
189+
For bigger queries it is recommended using the ``async_job`` keyword option. When used,
190+
the query is send in asynchronous mode.
191191

192192
.. doctest-remote-data::
193193

194194
>>> from astroquery.ipac.irsa import Irsa
195-
>>> table = Irsa.query_region("HIP 12", catalog="allwise_p3as_psd", spatial="Cone", async_mode=True)
195+
>>> table = Irsa.query_region("HIP 12", catalog="allwise_p3as_psd", spatial="Cone", async_job=True)
196196
>>> print(table)
197197
designation ra dec sigra ... y z spt_ind htm20
198198
deg deg arcsec ...

0 commit comments

Comments
 (0)