astro py:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- Astropy v0.3 »
- Virtual Observatory Access (`astropy.vo`) »
- VO Simple Cone Search »
- AsyncConeSearch

# AsyncConeSearch

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

  Bases: `astropy.vo.client.async.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
      >>> c = coord.ICRS(6.0223, -72.0814, unit=(u.degree, 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.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 no `timeout` keyword given, it waits until completion:

      >>> async_result = async_search.get(timeout=30)
      >>> cone_arr = async_result.array.data
      >>> cone_arr.size
      36184