“radcat” Database Input/Output

Tables corresponding to each sky survey catalog are stored in a separate schema called “radcat” within the same PostgreSQL database as the VLITE data. This module contains the functions to create the schema and tables.

radiocatalogs.radcatdb.add_table(tblname, conn)[source]

Copies sky survey sources into a new table in the “radcat” schema from a text file. If the text file does not yet exist, the sources are read from the original catalog, initialized as CatalogSource objects, and written to the text file.

Parameters:
  • tblname (str) – Name of the table/catalog from which the source originated.
  • conn (psycopg2.extensions.connect instance) – The PostgreSQL database connection object.
radiocatalogs.radcatdb.create(conn)[source]

Creates the “radcat” schema and catalogs table within that schema. Calls the functions add_table and index for each catalog in the list from catalogio.catalog_dict.keys().

Parameters:conn (psycopg2.extensions.connect instance) – The PostgreSQL database connection object.
radiocatalogs.radcatdb.index(tblname, conn)[source]

Indexes and clusters the table using Q3C.

Parameters:
  • tblname (str) – Name of the database table.
  • conn (psycopg2.extensions.connect instance) – The PostgreSQL database connection object.