AsyncConeSearch¶
- class astroquery.vo_conesearch.conesearch.AsyncConeSearch(*args, **kwargs)[source]¶
Bases:
AsyncBasePerform a Cone Search asynchronously and returns the result of the first successful query.
Note
See
AsyncBasefor 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.timeoutthat governs individual Cone Search queries). If search is still not done after 30 seconds,TimeoutErroris raised. Otherwise, Cone Search result is returned and can be manipulated as in Simple Cone Search Examples. If notimeoutkeyword given, it waits until completion:>>> async_result = async_search.get(timeout=30) >>> len(async_result) 74271