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 (Table) – The table containing the queried catalog’s results.

Returns:

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

Return type:

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. Default is 5.

Returns:

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

Return type:

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. Default is 5.

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