Skip to content

Commit bc0ea97

Browse files
committed
Adding async mode to query_region, too
1 parent cf385c7 commit bc0ea97

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

astroquery/ipac/irsa/core.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ def query_tap(self, query, *, async_mode=False, maxrec=None):
5656
----------
5757
query : str
5858
ADQL query to be executed
59-
maxrec : int
59+
async_mode : bool, optional
60+
if True query is run as an async job
61+
maxrec : int, optional
6062
maximum number of records to return
6163
6264
Returns
@@ -159,7 +161,7 @@ def list_collections(self, servicetype=None):
159161
@deprecated_renamed_argument(("selcols", "cache", "verbose"), ("columns", None, None), since="0.4.7")
160162
def query_region(self, coordinates=None, *, catalog=None, spatial='Cone',
161163
radius=10 * u.arcsec, width=None, polygon=None,
162-
get_query_payload=False, columns='*',
164+
get_query_payload=False, columns='*', async_mode=False,
163165
verbose=False, cache=True):
164166
"""
165167
Queries the IRSA TAP server around a coordinate and returns a `~astropy.table.Table` object.
@@ -194,6 +196,8 @@ def query_region(self, coordinates=None, *, catalog=None, spatial='Cone',
194196
Defaults to `False`.
195197
columns : str, optional
196198
Target column list with value separated by a comma(,)
199+
async_mode : bool, optional
200+
if True query is run as an async job
197201
198202
Returns
199203
-------
@@ -243,7 +247,7 @@ def query_region(self, coordinates=None, *, catalog=None, spatial='Cone',
243247

244248
if get_query_payload:
245249
return adql
246-
response = self.query_tap(query=adql)
250+
response = self.query_tap(query=adql, async_mode=async_mode)
247251

248252
return response.to_table()
249253

0 commit comments

Comments
 (0)