AsyncSearchAll

class astroquery.vo_conesearch.conesearch.AsyncSearchAll(*args, **kwargs)[source]

Bases: astroquery.vo_conesearch.vo_async.AsyncBase

Perform a Cone Search asynchronously, storing all results instead of just the result from first successful query.

Note

See AsyncBase for more details.

Parameters
args, kwargs

See search_all().

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.AsyncSearchAll(c, 0.5 * u.degree)

Check search status:

>>> async_search.running()
True
>>> async_search.done()
False

Get a dictionary of all 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, a dictionary is returned and can be manipulated as in Simple Cone Search Examples. If no timeout keyword given, it waits until completion:

>>> async_allresults = async_search.get(timeout=30)
>>> all_catalogs = list(async_allresults)
>>> first_cone_arr = async_allresults[all_catalogs[0]].array.data
>>> first_cone_arr.size
36184