lsst.pipe.tasks  21.0.0-151-g12957622+e8b61e2e81
Classes | Functions
lsst.pipe.tasks.setPrimaryFlags Namespace Reference

Classes

class  SetPrimaryFlagsConfig
 
class  SetPrimaryFlagsTask
 

Functions

def getPatchInner (sources, patchInfo)
 
def getTractInner (sources, tractInfo, skyMap)
 
def getPseudoSources (sources, pseudoFilterList, schema, log)
 
def getDeblendPrimaryFlags (sources)
 

Function Documentation

◆ getDeblendPrimaryFlags()

def lsst.pipe.tasks.setPrimaryFlags.getDeblendPrimaryFlags (   sources)
Get flags generated by the deblender

scarlet is different than meas_deblender in that it is not
(necessarily) flux conserving. For consistency in scarlet,
all of the parents with only a single child (isolated sources)
need to be deblended. This creates a question: which type
of isolated source should we make measurements on, the
undeblended "parent" or the deblended child?
For that reason we distinguish between a DeblendedSource,
which is a source that has no children and uses the
isolated parents, and a DeblendedModelSource, which uses
the scarlet models for both isolated and blended sources.
In the case of meas_deblender, DeblendedModelSource is
`None` because it is not contained in the output catalog.

Parameters
----------
sources : `lsst.afw.table.SourceCatalog`
    A sourceCatalog that has already been deblended using
    either meas_extensions_scarlet or meas_deblender.

Returns
-------
fromBlend : array-like of `bool`
    True for each source modeled by the deblender from a `Peak`
    in a parent footprint that contained at least one other `Peak`.
    While these models can be approximated as isolated,
    and measurements are made on them as if that's the case,
    we know deblending to introduce biases in the shape and centroid
    of objects and it is important to know that the sources that these
    models are based on are all bleneded in the true image.
isIsolated : array-like of `bool`
    True for isolated sources, regardless of whether or not they
    were modeled by the deblender.
isDeblendedSource : array-like of `bool`
    True for each source that is a "DeblendedSource" as defined above.
isDeblendedModelSource : array-like of `bool`
    True for each source that is a "DeblendedSourceModel"
    as defined above.

Definition at line 122 of file setPrimaryFlags.py.

◆ getPatchInner()

def lsst.pipe.tasks.setPrimaryFlags.getPatchInner (   sources,
  patchInfo 
)
Set a flag for each source if it is in the innerBBox of a patch.

Parameters
----------
sources : `lsst.afw.table.SourceCatalog`
    A sourceCatalog with pre-calculated centroids.
patchInfo : `lsst.skymap.PatchInfo`
    Information about a `SkyMap` `Patch`.

Returns
--------
isPatchInner : array-like of `bool`
    `True` for each source that has a centroid
    in the inner region of a patch.

Definition at line 29 of file setPrimaryFlags.py.

◆ getPseudoSources()

def lsst.pipe.tasks.setPrimaryFlags.getPseudoSources (   sources,
  pseudoFilterList,
  schema,
  log 
)
Get a flag that marks pseudo sources.

Some categories of sources, for example sky objects,
are not really detected sources and should not be considered primary
sources.

Parameters
----------
sources : `lsst.afw.table.SourceCatalog`
    The catalog of sources for which to identify "pseudo"
    (e.g. sky) objects.
pseudoFilterList : `list` of `str`
    Names of filters which should never be primary

Returns
-------
isPseudo : array-like of `bool`
    True for each source that is a pseudo source.
    Note: to remove pseudo sources use `~isPseudo`.

Definition at line 90 of file setPrimaryFlags.py.

◆ getTractInner()

def lsst.pipe.tasks.setPrimaryFlags.getTractInner (   sources,
  tractInfo,
  skyMap 
)
Set a flag for each source that the skyMap includes in tractInfo.

Parameters
----------
sources : `lsst.afw.table.SourceCatalog`
    A sourceCatalog with pre-calculated centroids.
tractInfo : `lsst.skymap.TractInfo`
    Tract object
skyMap : `lsst.skymap.BaseSkyMap`
    Sky tessellation object

Returns
-------
isTractInner : array-like of `bool`
    True if the skyMap.findTract method returns
    the same tract as tractInfo.

Definition at line 67 of file setPrimaryFlags.py.