astro py:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- Astropy v1.1.1 »
- Virtual Observatory Access (`astropy.vo`) »
- VO Simple Cone Search »
- AsyncSearchAll

# AsyncSearchAll

class `astropy.vo.client.conesearch.``AsyncSearchAll`(*args, **kwargs)

  Bases: `astropy.vo.client.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
      >>> c = coord.ICRS(6.0223 * u.degree, -72.0814 * u.degree)
      >>> async_searchall = 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 `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, 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