frb.surveys.hsc
- class frb.surveys.hsc.HSC_Survey(coord, radius, **kwargs)[source]
Bases:
SurveyCoordClass to handle queries on the HSC database
- Args:
coord (SkyCoord) – CoordinAte for surveying around
radius (Angle) – Search radius around the coordinate
- get_catalog(query_fields=None, query=None, max_time=120, print_query=False, query_table='pdr3_wide.summary', photoz_table='mizuki')[source]
Query HSC for all objects within a given radius of the input coordinates.
- Args:
query_fields – list, optional Column names to be queried. Default values are list(photom[‘HSC’].values()) if None is passed.
query – str, optional Full query as a string to be passed to the database. Overrides the default query.
max_time – float, optional The maximum time interval to wait between query status checks. Defaults to 120s.
print_query – bool, optional Print the SQL query for the photo-z values
query_table – str, optional The table to query. Defaults to ‘pdr3_wide.forced’
- Returns:
- astropy.table.Table
Contains all measurements retieved WARNING :: The SDSS photometry table frequently has multiple entries for a given source, with unique objid values
- Return type:
catalog
- frb.surveys.hsc.run_query(query: str, user: str = None, release_version: str = 'pdr3', preview: bool = False, out_format: str = 'csv', delete_job: bool = False, max_time: int = 120)[source]
Submits a query to the HSC database and downloads the results in the specified format.
- Args:
query (str) – The SQL query to submit to the HSC database.
user (str, optional) – The account name to use for authentication. Defaults to None.
release (str, optional) – The release version of the HSC database to query. Defaults to ‘pdr3’.
preview (bool, optional) – Whether to use quick mode (short timeout). Defaults to False.
out_format (str, optional) – The format in which to download the query results. Defaults to ‘csv’.
delete_job (bool, optional) – Whether to delete the job after downloading the results. Defaults to False.
max_time (int, optional) – The maximum time interval to wait for checking query status. Defaults to 120s.
- Raises:
urllib.error.HTTPError – If there is an HTTP error while submitting the query.
QueryError – If there is an error with the query itself.
- Returns:
None