p2obt.backend.query#

p2obt.backend.query.get_best_match(target: dict, catalog: str, catalog_table: Table) Table[source]#

Gets the best match from the catalog entries

Parameters:
  • target (dict) – The target’s queried information.

  • catalog (str) – The catalog’s name.

  • catalog_table (astropy.table.Table) – The table containing the queried catalog’s results.

Returns:

best_match – The best match from the queried catalog’s table.

Return type:

astropy.table.Table

p2obt.backend.query.get_catalog(name: str, catalog: str, match_radius: Unit('arcsec') = 5.0)[source]#

Queries the specified catalog.

Parameters:
  • name (str) – The target’s name.

  • catalog (str) – The catalog’s name.

  • match_radius (astropy.units.arcsec) – The radius in which is queried. Defaults to 5.0.

Returns:

catalog_table – The table containing the queried catalog’s results.

Return type:

astropy.table.Table

p2obt.backend.query.query(name: str, catalogs: list | None = None, exclude_catalogs: list | None = None, match_radius: float | None = 5.0, query_exinction: bool | None = False) dict[source]#

Queries information for an astronomical target by its name from various catalogs.

Parameters:
  • name (str) – The source name.

  • catalogs (list of str, optional) – The catalogs to query. By default the catalogs “gaia”, “tycho”, “nomad”, “2mass”, “wise”, “mdfc” and “simbad” as well as local catalogs (with “local”) are included.

  • exclude_catalogs (list of str) – A list of catalog to be excluded. Can be any of the catalogs listed as default for the catalogs parameter.

  • match_radius (float, optional) – The radius in which the target queried. Defaults to 5.0.

  • query_extinction (bool, optional) – If True, queries information on the extinction as well. Defaults to True

Returns:

target – The target’s queried information.

Return type:

dict

p2obt.backend.query.query_dust_extinction(name: str) dict[source]#

Queries the dust extinctions for the specified target.

Parameters:

name (str) – The target’s name.

Returns:

target – The target’s queried information.

Return type:

dict

p2obt.backend.query.query_local_catalog(name: str)[source]#
Parameters:

name (str) – The target’s name.

Returns:

target

Return type:

dict