lsst.meas.astrom gcf9c84bd28+6c2bae5111
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Protected Member Functions | Static Protected Attributes | List of all members
lsst.meas.astrom.matchPessimisticB.MatchPessimisticBTask Class Reference
Inheritance diagram for lsst.meas.astrom.matchPessimisticB.MatchPessimisticBTask:

Public Member Functions

def __init__ (self, **kwargs)
 
def matchObjectsToSources (self, refCat, sourceCat, wcs, sourceFluxField, refFluxField, match_tolerance=None)
 

Static Public Attributes

MatchPessimisticBConfig ConfigClass = MatchPessimisticBConfig
 

Protected Member Functions

def _filterRefCat (self, refCat, refFluxField)
 
def _doMatch (self, refCat, sourceCat, wcs, refFluxField, numUsableSources, minMatchedPairs, match_tolerance, sourceFluxField, verbose)
 
def _latlong_flux_to_xyz_mag (self, theta, phi, flux)
 
def _get_pair_pattern_statistics (self, cat_array)
 

Static Protected Attributes

str _DefaultName = "matchPessimisticB"
 

Detailed Description

Match sources to reference objects.

Definition at line 198 of file matchPessimisticB.py.

Constructor & Destructor Documentation

◆ __init__()

def lsst.meas.astrom.matchPessimisticB.MatchPessimisticBTask.__init__ (   self,
**  kwargs 
)

Definition at line 205 of file matchPessimisticB.py.

Member Function Documentation

◆ _doMatch()

def lsst.meas.astrom.matchPessimisticB.MatchPessimisticBTask._doMatch (   self,
  refCat,
  sourceCat,
  wcs,
  refFluxField,
  numUsableSources,
  minMatchedPairs,
  match_tolerance,
  sourceFluxField,
  verbose 
)
protected
Implementation of matching sources to position reference objects

Unlike matchObjectsToSources, this method does not check if the sources
are suitable.

Parameters
----------
refCat : `lsst.afw.table.SimpleCatalog`
    catalog of position reference objects that overlap an exposure
sourceCat : `lsst.afw.table.SourceCatalog`
    catalog of sources found on the exposure
wcs : `lsst.afw.geom.SkyWcs`
    estimated WCS of exposure
refFluxField : `str`
    field of refCat to use for flux
numUsableSources : `int`
    number of usable sources (sources with known centroid that are not
    near the edge, but may be saturated)
minMatchedPairs : `int`
    minimum number of matches
match_tolerance : `lsst.meas.astrom.MatchTolerancePessimistic`
    a MatchTolerance object containing variables specifying matcher
    tolerances and state from possible previous runs.
sourceFluxField : `str`
    Name of the flux field in the source catalog.
verbose : `bool`
    Set true to print diagnostic information to std::cout

Returns
-------
result :
    Results struct with components:

    - ``matches`` : a list the matches found
      (`list` of `lsst.afw.table.ReferenceMatch`).
    - ``match_tolerance`` : MatchTolerance containing updated values from
      this fit iteration (`lsst.meas.astrom.MatchTolerancePessimistic`)

Definition at line 339 of file matchPessimisticB.py.

◆ _filterRefCat()

def lsst.meas.astrom.matchPessimisticB.MatchPessimisticBTask._filterRefCat (   self,
  refCat,
  refFluxField 
)
protected
Sub-select a number of reference objects starting from the brightest
and maxing out at the number specified by maxRefObjects in the config.

No trimming is done if len(refCat) > config.maxRefObjects.

Parameters
----------
refCat : `lsst.afw.table.SimpleCatalog`
    Catalog of reference objects to trim.
refFluxField : `str`
    field of refCat to use for flux
Returns
-------
outCat : `lsst.afw.table.SimpleCatalog`
    Catalog trimmed to the number set in the task config from the
    brightest flux down.

Definition at line 305 of file matchPessimisticB.py.

◆ _get_pair_pattern_statistics()

def lsst.meas.astrom.matchPessimisticB.MatchPessimisticBTask._get_pair_pattern_statistics (   self,
  cat_array 
)
protected
 Compute the tolerances for the matcher automatically by comparing
pinwheel patterns as we would in the matcher.

We test how similar the patterns we can create from a given set of
objects by computing the spoke lengths for each pattern and sorting
them from smallest to largest. The match tolerance is the average
distance per spoke between the closest two patterns in the sorted
spoke length space.

Parameters
----------
cat_array : `numpy.ndarray`, (N, 3)
    array of 3 vectors representing the x, y, z position of catalog
    objects on the unit sphere.

Returns
-------
dist_tol : `float`
    Suggested max match tolerance distance calculated from comparisons
    between pinwheel patterns used in optimistic/pessimistic pattern
    matcher.

Definition at line 597 of file matchPessimisticB.py.

◆ _latlong_flux_to_xyz_mag()

def lsst.meas.astrom.matchPessimisticB.MatchPessimisticBTask._latlong_flux_to_xyz_mag (   self,
  theta,
  phi,
  flux 
)
protected
Convert angles theta and phi and a flux into unit sphere
x, y, z, and a relative magnitude.

Takes in a afw catalog object and converts the catalog object RA, DECs
to points on the unit sphere. Also converts the flux into a simple,
non-zero-pointed magnitude for relative sorting.

Parameters
----------
theta : `float`
    Angle from the north pole (z axis) of the sphere
phi : `float`
    Rotation around the sphere

Return
------
output_array : `numpy.ndarray`, (N, 4)
    Spherical unit vector x, y, z  with flux.

Definition at line 564 of file matchPessimisticB.py.

◆ matchObjectsToSources()

def lsst.meas.astrom.matchPessimisticB.MatchPessimisticBTask.matchObjectsToSources (   self,
  refCat,
  sourceCat,
  wcs,
  sourceFluxField,
  refFluxField,
  match_tolerance = None 
)
Match sources to position reference stars

refCat : `lsst.afw.table.SimpleCatalog`
    catalog of reference objects that overlap the exposure; reads
    fields for:

    - coord
    - the specified flux field

sourceCat : `lsst.afw.table.SourceCatalog`
    Catalog of sources found on an exposure.  This should already be
    down-selected to "good"/"usable" sources in the calling Task.
wcs : `lsst.afw.geom.SkyWcs`
    estimated WCS
sourceFluxField: `str`
    field of sourceCat to use for flux
refFluxField : `str`
    field of refCat to use for flux
match_tolerance : `lsst.meas.astrom.MatchTolerancePessimistic`
    is a MatchTolerance class object or `None`. This this class is used
    to communicate state between AstrometryTask and MatcherTask.
    AstrometryTask will also set the MatchTolerance class variable
    maxMatchDist based on the scatter AstrometryTask has found after
    fitting for the wcs.

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

    - ``matches`` : source to reference matches found (`list` of
      `lsst.afw.table.ReferenceMatch`)
    - ``usableSourceCat`` : a catalog of sources potentially usable for
      matching and WCS fitting (`lsst.afw.table.SourceCatalog`).
    - ``match_tolerance`` : a MatchTolerance object containing the
      resulting state variables from the match
      (`lsst.meas.astrom.MatchTolerancePessimistic`).

Definition at line 209 of file matchPessimisticB.py.

Member Data Documentation

◆ _DefaultName

str lsst.meas.astrom.matchPessimisticB.MatchPessimisticBTask._DefaultName = "matchPessimisticB"
staticprotected

Definition at line 203 of file matchPessimisticB.py.

◆ ConfigClass

MatchPessimisticBConfig lsst.meas.astrom.matchPessimisticB.MatchPessimisticBTask.ConfigClass = MatchPessimisticBConfig
static

Definition at line 202 of file matchPessimisticB.py.


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