astro py:docs

- Index
- Modules

### Navigation

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

# VOSDatabase

class `astropy.vo.client.vos_catalog.``VOSDatabase`(tree)

  Bases: `astropy.vo.client.vos_catalog.VOSCatalog`

  A class to represent a collection of `VOSCatalog`.

  Parameters: | tree : JSON tree

  Raises:

  VOSError :

  > If given `tree` does not have ‘catalogs’ key.

  Methods Summary

  `get_catalog`(name) | Get one catalog of given name.
  `get_catalog_by_url`(url) | Like `get_catalog()` but using access URL look-up.
  `get_catalogs`() | Iterator to get all catalogs.
  `get_catalogs_by_url`(url) | Like `get_catalogs()` but using access URL look-up.
  `list_catalogs`([pattern, sort]) | List catalog names.

  Methods Documentation

  `get_catalog`(name)

    Get one catalog of given name.

    Parameters:

    name : str

    > Primary key identifying the catalog.

    Returns: | obj : `VOSCatalog` object

    Raises:

    VOSError :

    > If catalog is not found.

  `get_catalog_by_url`(url)

    Like `get_catalog()` but using access URL look-up. On multiple matches, only first match is returned.

  `get_catalogs`()

    Iterator to get all catalogs.

  `get_catalogs_by_url`(url)

    Like `get_catalogs()` but using access URL look-up.

  `list_catalogs`(pattern=None, sort=True)

    List catalog names.

    Parameters:

    pattern : str or `None`

    > If given string is anywhere in a catalog name, it is considered a matching catalog. It accepts patterns as in `fnmatch` and is case-insensitive. By default, all catalogs are returned.

    sort : bool

    > Sort output in alphabetical order. If not sorted, the order depends on dictionary hashing. Default is `True`.

    Returns:

    out_arr : list of str

    > List of catalog names.