lsst.ap.association  master-g965b868a3d+2
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
lsst.ap.association.assoc_db_sqlite.AssociationDBSqliteTask Class Reference
Inheritance diagram for lsst.ap.association.assoc_db_sqlite.AssociationDBSqliteTask:

Public Member Functions

def __init__ (self, kwargs)
 
def close (self)
 
def create_tables (self)
 
def load_dia_objects (self, exposure)
 
def load_dia_sources (self, dia_obj_ids)
 
def store_dia_objects (self, dia_objects, compute_spatial_index=False, exposure=None)
 
def compute_indexer_id (self, sphere_point)
 
def store_dia_sources (self, dia_sources, associated_ids=None, exposure=None)
 
def store_ccd_visit_info (self, exposure)
 
def dia_object_afw_schema (self)
 
def dia_source_afw_schema (self)
 

Public Attributes

 indexer
 

Static Public Attributes

 ConfigClass = AssociationDBSqliteConfig
 

Detailed Description

Enable storage of and reading of DIAObjects and DIASources from a
sqlite database.

Create a simple sqlite database and implement wrappers to store and
retrieve DIAObjects and DIASources from within that database. This task
functions as a testing ground for the L1 database and should mimic this
database's eventual functionality. This specific database implementation is
useful for the verification packages which may not be run with access to
L1 database.

Member Function Documentation

◆ close()

def lsst.ap.association.assoc_db_sqlite.AssociationDBSqliteTask.close (   self)
Close the connection to the sqlite database.

◆ compute_indexer_id()

def lsst.ap.association.assoc_db_sqlite.AssociationDBSqliteTask.compute_indexer_id (   self,
  sphere_point 
)
Compute the pixel index of the given point.

Parameters
----------
sphere_point : `lsst.afw.geom.SpherePoint`
    Point to compute pixel index for.

Returns
-------
index : `int`
    Index of the pixel the point is contained in.

◆ create_tables()

def lsst.ap.association.assoc_db_sqlite.AssociationDBSqliteTask.create_tables (   self)
If no sqlite database with the correct tables exists we can create
one using this method.

Returns
-------
succeeded : `bool`
    Successfully created a new database with specified tables.

◆ dia_object_afw_schema()

def lsst.ap.association.assoc_db_sqlite.AssociationDBSqliteTask.dia_object_afw_schema (   self)
Retrieve the Schema of the DIAObjects in this database.

Returns
-------
schema : `lsst.afw.table.Schema`
    Schema of the DIAObjects in this database.

◆ dia_source_afw_schema()

def lsst.ap.association.assoc_db_sqlite.AssociationDBSqliteTask.dia_source_afw_schema (   self)
Retrieve the Schema of the DIASources in this database.

Returns
-------
schema : `lsst.afw.table.Schema`
    Schema of the DIASources in this database.

◆ load_dia_objects()

def lsst.ap.association.assoc_db_sqlite.AssociationDBSqliteTask.load_dia_objects (   self,
  exposure 
)
Load all DIAObjects within the exposure.

Parameters
----------
exposure : `lsst.afw.image.Exposure`
    An exposure with a solved WCS representing the area on the sky to
    load DIAObjects.

Returns
-------
dia_objects : `lsst.afw.table.SourceCatalog`
    Catalog of DIAObjects that are contained with the the bounding
    box defined by expMd.

◆ load_dia_sources()

def lsst.ap.association.assoc_db_sqlite.AssociationDBSqliteTask.load_dia_sources (   self,
  dia_obj_ids 
)
Retrieve all DIASources associated with this collection of DIAObject
ids.

Parameters
----------
dia_obj_ids : array-like of `int`s
    Id of the DIAObject that is associated with the DIASources
    of interest.

Returns
-------
dia_sources : `lsst.afw.table.SourceCatalog`
    SourceCatalog of DIASources

◆ store_ccd_visit_info()

def lsst.ap.association.assoc_db_sqlite.AssociationDBSqliteTask.store_ccd_visit_info (   self,
  exposure 
)
Store information describing the exposure for this ccd, visit.

Paramters
---------
exposure : `lsst.afw.image.Exposure`
    Exposure to store information from.

◆ store_dia_objects()

def lsst.ap.association.assoc_db_sqlite.AssociationDBSqliteTask.store_dia_objects (   self,
  dia_objects,
  compute_spatial_index = False,
  exposure = None 
)
Store all DIAObjects in this SourceCatalog.

Parameters
----------
dia_objects : `lsst.afw.table.SourceCatalog`
    Catalog of DIAObjects to store.
compute_spatial_index : `bool`
    If True, compute the spatial search indices using the
    indexer specified at class instantiation.
exposure: `lsst.afw.image.Exposure` (optional)
    CcdExposure associated with these DIAObjects being inserted.
    Inserts the CcdVisitInfo for this exposure in the CcdVisitTable.

◆ store_dia_sources()

def lsst.ap.association.assoc_db_sqlite.AssociationDBSqliteTask.store_dia_sources (   self,
  dia_sources,
  associated_ids = None,
  exposure = None 
)
Store all DIASources in this SourceCatalog.

Parameters
----------
dia_sources : `lsst.afw.table.SourceCatalog`
    Catalog of DIASources to store.
associated_ids : array-like of `int`s (optional)
    DIAObject ids that have been associated with these DIASources
exposure : `lsst.afw.image.Exposure`
    Exposure object the DIASources were detected in.

The documentation for this class was generated from the following file: