lsst.ap.association
master-g965b868a3d+3
|
Public Member Functions | |
def | __init__ (self, schema, table_name) |
def | table_name (self) |
def | schema (self) |
def | make_table_from_afw_schema (self, table_name) |
def | source_record_from_db_row (self, db_row) |
def | source_record_to_value_list (self, source_record, overwrite_dict={}) |
Class for defining conversions to and from an sqlite database and afw SourceRecord objects. Parameters ---------- schema : `lsst.afw.table.Schema` Schema defining the SourceRecord objects to be converted. table_name : `str` Name of the sqlite table this converter is to be used for.
def lsst.ap.association.assoc_db_sqlite.SqliteDBConverter.make_table_from_afw_schema | ( | self, | |
table_name | |||
) |
Convert the schema into a sqlite CREATE TABLE command. Parameters ---------- table_name : `str` Name of the new table to create Returns ------- sql_query : `str` A string of the query command to create the new table in sqlite.
def lsst.ap.association.assoc_db_sqlite.SqliteDBConverter.schema | ( | self | ) |
Return the internal catalog schema.
def lsst.ap.association.assoc_db_sqlite.SqliteDBConverter.source_record_from_db_row | ( | self, | |
db_row | |||
) |
Create a source record from the values stored in a database row. Parameters ---------- db_row : `list` of ``values`` Retrieved values from the database to convert into a SourceRecord. Returns ------- record : `lsst.afw.table.SourceRecord` Converted source record.
def lsst.ap.association.assoc_db_sqlite.SqliteDBConverter.source_record_to_value_list | ( | self, | |
source_record, | |||
overwrite_dict = {} |
|||
) |
Convert a source record object into a list of its internal values. Parameters ---------- source_record : `lsst.afw.table.SourceRecord` SourceRecord to convert. overwrite_dict : `dict` (optional) Mapping specifying the names of columns to overwrite with specified values. Returns ------- source_list : `list` of ``values`` Extracted values from ``source_record`` in `list` form.
def lsst.ap.association.assoc_db_sqlite.SqliteDBConverter.table_name | ( | self | ) |
Return name of the sqlite table this catalog is for