frb.surveys.hsc

class frb.surveys.hsc.HSC_Survey(coord, radius, **kwargs)[source]

Bases: SurveyCoord

Class to handle queries on the HSC database

Args:
  • coord (SkyCoord) – CoordinAte for surveying around

  • radius (Angle) – Search radius around the coordinate

__init__(coord, radius, **kwargs)[source]
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

exception frb.surveys.hsc.QueryError[source]

Bases: Exception

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:
Returns:

None

frb.surveys.hsc.httpJsonPost(url, data)[source]
frb.surveys.hsc.httpPost(url, postData, headers)[source]
frb.surveys.hsc.submitJob(credential, sql, out_format: str = 'csv', release_version: str = 'pdr3')[source]
frb.surveys.hsc.jobStatus(credential, job_id)[source]
frb.surveys.hsc.jobCancel(credential, job_id)[source]
frb.surveys.hsc.preview(credential, sql, out, release_version: str = 'pdr3')[source]
frb.surveys.hsc.blockUntilJobFinishes(credential, job_id, max_time=120)[source]
frb.surveys.hsc.download(credential, job_id)[source]
frb.surveys.hsc.deleteJob(credential, job_id)[source]
frb.surveys.hsc.getCredentials()[source]