lsst.meas.algorithms g86b635cae8+734fe384f0
Loading...
Searching...
No Matches
lsst.meas.algorithms.findGlintTrails.FindGlintTrailsTask Class Reference
Inheritance diagram for lsst.meas.algorithms.findGlintTrails.FindGlintTrailsTask:

Public Member Functions

 run (self, catalog)
 

Static Public Attributes

 ConfigClass = FindGlintTrailsConfig
 

Protected Member Functions

 _select_good_sources (self, catalog)
 
 _search_one (self, matches, catalog)
 
 _other_points (self, n_points, indexes, matches, catalog)
 

Static Protected Attributes

str _DefaultName = "findGlintTrails"
 

Detailed Description

Find glint trails in a catalog by searching for sources that lie in a
line.

Notes
-----
For each source ("anchor") in the input catalog that was not included in
an an earlier iteration as part of a trail:
 * Find all sources within a given radius.
 * For each pair of anchor and match, identify the other sources that
   could lie on the same line(s).
 * Take the longest set of such pairs as a candidate trail.
 * Fit a line to the identified pairs with the RANSAC algorithm.
 * Find all sources in the catalog that could lie on that line.
 * Refit a line to all of the matched sources.
 * If the error is below the threshold and the number of sources on the
   line is greater than the minimum, return the sources that were
   considered inliers during the fit, and the fit parameters.

Definition at line 77 of file findGlintTrails.py.

Member Function Documentation

◆ _other_points()

lsst.meas.algorithms.findGlintTrails.FindGlintTrailsTask._other_points ( self,
n_points,
indexes,
matches,
catalog )
protected
Find all catalog records that could lie on this line.

Parameters
----------
n_points : `int`
    Number of sources in this candidate trail.
indexes : `list` [`int`]
    Indexes into matches on this candidate trail.
matches : `list` [`lsst.afw.table.Match`]
    Matches for one anchor sources to search for lines.
catalog : `lsst.afw.SourceCatalog`
    Catalog of all sources, to refit lines to.

Returns
-------
trail : `lsst.afw.table.SourceCatalog`
    Sources that are in the fitted trail.
result : `GlintTrailParameters`
    Parameters of the fitted trail.

Definition at line 238 of file findGlintTrails.py.

◆ _search_one()

lsst.meas.algorithms.findGlintTrails.FindGlintTrailsTask._search_one ( self,
matches,
catalog )
protected
Search one set of matches for a possible trail.

Parameters
----------
matches : `list` [`lsst.afw.table.Match`]
    Matches for one anchor source to search for lines.
catalog : `lsst.afw.SourceCatalog`
    Catalog of all sources, to refit lines to.

Returns
-------
trail, result : `tuple` or None
    If the no trails matching the criteria are found, return None,
    otherwise return a tuple of the sources in the trail and the
    trail parameters.

Definition at line 183 of file findGlintTrails.py.

◆ _select_good_sources()

lsst.meas.algorithms.findGlintTrails.FindGlintTrailsTask._select_good_sources ( self,
catalog )
protected
Return sources that could possibly be in a glint trail, i.e. ones
that do not have bad flags set.

Parameters
----------
catalog : `lsst.afw.table.SourceCatalog`
    Original catalog to be selected from.

Returns
-------
good_catalog : `lsst.afw.table.SourceCatalog`
    Catalog that has had bad sources removed.

Definition at line 164 of file findGlintTrails.py.

◆ run()

lsst.meas.algorithms.findGlintTrails.FindGlintTrailsTask.run ( self,
catalog )
Find glint trails in a catalog.

Parameters
----------
catalog : `lsst.afw.table.SourceCatalog`
    Catalog to search for glint trails.

Returns
-------
result : `lsst.pipe.base.Struct`
    Results as a struct with attributes:

    ``trails``
        Catalog subsets containing sources in each trail that was found.
        (`list` [`lsst.afw.table.SourceCatalog`])
    ``trailed_ids``
        Ids of all the sources that were included in any fit trail.
        (`set` [`int`])
    ``parameters``
        Parameters of all the trails that were found.
        (`list` [`GlintTrailParameters`])

Definition at line 100 of file findGlintTrails.py.

Member Data Documentation

◆ _DefaultName

str lsst.meas.algorithms.findGlintTrails.FindGlintTrailsTask._DefaultName = "findGlintTrails"
staticprotected

Definition at line 98 of file findGlintTrails.py.

◆ ConfigClass

lsst.meas.algorithms.findGlintTrails.FindGlintTrailsTask.ConfigClass = FindGlintTrailsConfig
static

Definition at line 97 of file findGlintTrails.py.


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