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

Public Member Functions

def __init__ (self, kwargs)
 
def run (self, dia_sources, exposure)
 
def associate_sources (self, dia_objects, dia_sources)
 
def update_dia_objects (self, dia_objects, updated_obj_ids, exposure)
 
def score (self, dia_objects, dia_sources, max_dist)
 
def match (self, dia_objects, dia_sources, score_struct)
 

Static Public Attributes

 ConfigClass = AssociationConfig
 

Detailed Description

Associate DIAOSources into existing DIAObjects.

This task performs the association of detected DIASources in a visit
with the previous DIAObjects detected over time. It also creates new
DIAObjects out of DIASources that cannot be associated with previously
detected DIAObjects.

Member Function Documentation

◆ associate_sources()

def lsst.ap.association.association.AssociationTask.associate_sources (   self,
  dia_objects,
  dia_sources 
)
Associate the input DIASources with the catalog of DIAObjects.

Parameters
----------
dia_objects : `lsst.afw.table.SourceCatalog`
    Catalog of DIAObjects to attempt to associate the input
    DIASources into.
dia_sources : `lsst.afw.table.SourceCatalog`
    DIASources to associate into the DIAObjectCollection.

Returns
-------
updated_ids: array-like of `int`s
    Ids of the DIAObjects that the DIASources associated to including
    the ids of newly created DIAObjects.

◆ match()

def lsst.ap.association.association.AssociationTask.match (   self,
  dia_objects,
  dia_sources,
  score_struct 
)
Match DIAsources to DIAObjects given a score and create new
DIAObject Ids for new unassociated DIASources.

Parameters
----------
dia_objects : `lsst.afw.table.SourceCatalog`
    A SourceCatalog of DIAObjects to associate to DIASources.
dia_sources : `lsst.afw.table.SourceCatalog`
    A contiguous catalog of dia_sources for which the set of scores
    has been computed on with DIAObjectCollection.score.
score_struct : `lsst.pipe.base.Struct`
    Results struct with components:

    - ``scores``: array of floats of match quality
updated DIAObjects (array-like of `float`s).
    - ``obj_ids``: array of floats of match quality
updated DIAObjects (array-like of `ints`s).
    - ``obj_idxs``: indexes of the matched DIAObjects in the catalog.
(array-like of `int`s)
    Default values for these arrays are
    INF, -1 and -1 respectively for unassociated sources.

Returns
-------
result : `lsst.pipeBase.Struct`
    Results struct with components:

    - ``updated_and_new_dia_object_ids`` : ids of new and updated
      dia_objects as the result of association. (`list` of `int`s).
    - ``n_updated_dia_objects`` : Number of previously know dia_objects
      with newly associated DIASources. (`int`).
    - ``n_new_dia_objects`` : Number of newly created DIAObjects from
      unassociated DIASources (`int`).
    - ``n_unupdated_dia_objects`` : Number of previous DIAObjects that
      were not associated to a new DIASource (`int`).

◆ run()

def lsst.ap.association.association.AssociationTask.run (   self,
  dia_sources,
  exposure 
)
Load DIAObjects from the database, associate the sources, and
persist the results into the L1 database.

Parameters
----------
dia_sources : `lsst.afw.table.SourceCatalog`
    DIASources to be associated with existing DIAObjects.
exposure : `lsst.afw.image`
    Input exposure representing the region of the sky the dia_sources
    were detected on. Should contain both the solved WCS and a bounding
    box of the ccd.

◆ score()

def lsst.ap.association.association.AssociationTask.score (   self,
  dia_objects,
  dia_sources,
  max_dist 
)
Compute a quality score for each dia_source/dia_object pair
between this catalog of DIAObjects and the input DIASource catalog.

``max_dist`` sets maximum separation in arcseconds to consider a
dia_source a possible match to a dia_object. If the pair is
beyond this distance no score is computed.

Parameters
----------
dia_objects : `lsst.afw.table.SourceCatalog`
    A contiguous catalog of DIAObjects to score against dia_sources.
dia_sources : `lsst.afw.table.SourceCatalog`
    A contiguous catalog of dia_sources to "score" based on distance
    and (in the future) other metrics.
max_dist : `lsst.afw.geom.Angle`
    Maximum allowed distance to compute a score for a given DIAObject
    DIASource pair.

Returns
-------
result : `lsst.pipe.base.Struct`
    Results struct with components:

    - ``scores``: array of floats of match quality updated DIAObjects
(array-like of `float`s).
    - ``obj_idxs``: indexes of the matched DIAObjects in the catalog.
(array-like of `int`s)
    - ``obj_ids``: array of floats of match quality updated DIAObjects
(array-like of `int`s).
    Default values for these arrays are
    INF, -1, and -1 respectively for unassociated sources.

◆ update_dia_objects()

def lsst.ap.association.association.AssociationTask.update_dia_objects (   self,
  dia_objects,
  updated_obj_ids,
  exposure 
)
Update select dia_objects currently stored within the database or
create new ones.

Parameters
----------
dia_objects : `lsst.afw.table.SourceCatalog`
    Pre-existing/loaded DIAObjects to copy values that are not updated
    from.
updated_obj_ids : array-like of `int`s
    Ids of the dia_objects that should be updated.
exposure : `lsst.afw.image.Exposure`
    Input exposure representing the region of the sky the dia_sources
    were detected on. Should contain both the solved WCS and a bounding
    box of the ccd.

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