AsyncConeSearch¶
- class astroquery.vo_conesearch.conesearch.AsyncConeSearch(*args, **kwargs)[source]¶
Bases:
AsyncBase
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 >>> from astroquery.vo_conesearch import conesearch >>> c = coord.ICRS(6.0223 * u.degree, -72.0814 * u.degree) >>> async_search = conesearch.AsyncConeSearch( ... c, 0.5 * u.degree, ... catalog_db='Guide Star Catalog 2.3 Cone Search 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
astroquery.vo_conesearch.conf.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) >>> len(async_result) 74271