AsyncConeSearch¶
-
class
astropy.vo.client.conesearch.
AsyncConeSearch
(*args, **kwargs)[source] [edit on github]¶ Bases:
astropy.vo.client.async.AsyncBase
Deprecated since version 2.0: The AsyncConeSearch class is deprecated and may be removed in a future version. Use astroquery.vo_conesearch.conesearch.AsyncConeSearch instead.
- Perform a Cone Search asynchronously and returns the result of the
first successful query.
Note
See
AsyncBase
for more details.
Parameters: args, kwargs : see conesearch()
Examples
>>> from astropy import coordinates as coord >>> from astropy import units as u >>> c = coord.ICRS(6.0223 * u.degree, -72.0814 * u.degree) >>> async_search = conesearch.AsyncConeSearch( ... c, 0.5 * u.degree, ... catalog_db='The PMM USNO-A1.0 Catalogue (Monet 1997) 1')
Check search status:
>>> async_search.running() True >>> async_search.done() False
Get search results after a 30-second wait (not to be confused with
astropy.utils.data.Conf.remote_timeout
that governs individual Cone Search queries). If search is still not done after 30 seconds,TimeoutError
is raised. Otherwise, Cone Search result is returned and can be manipulated as in Simple Cone Search Examples. If notimeout
keyword given, it waits until completion:>>> async_result = async_search.get(timeout=30) >>> cone_arr = async_result.array.data >>> cone_arr.size 36184
Deprecated since version 2.0: The AsyncConeSearch class is deprecated and may be removed in a future version. Use astroquery.vo_conesearch.conesearch.AsyncConeSearch instead.