|
def | __init__ (self, *args, **kwargs) |
|
def | run (self, skyInfo, tempExpRefList, imageScalerList, weightList, supplementaryData, *args, **kwargs) |
|
def | applyAltEdgeMask (self, mask, altMaskList) |
|
def | findArtifacts (self, templateCoadd, tempExpRefList, imageScalerList) |
|
def | prefilterArtifacts (self, spanSetList, exp) |
|
def | filterArtifacts (self, spanSetList, epochCountImage, nImage, footprintsToExclude=None) |
|
Assemble a compareWarp coadded image from a set of warps
by masking artifacts detected by comparing PSF-matched warps.
In ``AssembleCoaddTask``, we compute the coadd as an clipped mean (i.e.,
we clip outliers). The problem with doing this is that when computing the
coadd PSF at a given location, individual visit PSFs from visits with
outlier pixels contribute to the coadd PSF and cannot be treated correctly.
In this task, we correct for this behavior by creating a new badMaskPlane
'CLIPPED' which marks pixels in the individual warps suspected to contain
an artifact. We populate this plane on the input warps by comparing
PSF-matched warps with a PSF-matched median coadd which serves as a
model of the static sky. Any group of pixels that deviates from the
PSF-matched template coadd by more than config.detect.threshold sigma,
is an artifact candidate. The candidates are then filtered to remove
variable sources and sources that are difficult to subtract such as
bright stars. This filter is configured using the config parameters
``temporalThreshold`` and ``spatialThreshold``. The temporalThreshold is
the maximum fraction of epochs that the deviation can appear in and still
be considered an artifact. The spatialThreshold is the maximum fraction of
pixels in the footprint of the deviation that appear in other epochs
(where other epochs is defined by the temporalThreshold). If the deviant
region meets this criteria of having a significant percentage of pixels
that deviate in only a few epochs, these pixels have the 'CLIPPED' bit
set in the mask. These regions will not contribute to the final coadd.
Furthermore, any routine to determine the coadd PSF can now be cognizant
of clipped regions. Note that the algorithm implemented by this task is
preliminary and works correctly for HSC data. Parameter modifications and
or considerable redesigning of the algorithm is likley required for other
surveys.
``CompareWarpAssembleCoaddTask`` sub-classes
``AssembleCoaddTask`` and instantiates ``AssembleCoaddTask``
as a subtask to generate the TemplateCoadd (the model of the static sky).
Definition at line 1254 of file assembleCoadd.py.
def lsst.pipe.tasks.assembleCoadd.CompareWarpAssembleCoaddTask.findArtifacts |
( |
|
self, |
|
|
|
templateCoadd, |
|
|
|
tempExpRefList, |
|
|
|
imageScalerList |
|
) |
| |
Find artifacts.
Loop through warps twice. The first loop builds a map with the count
of how many epochs each pixel deviates from the templateCoadd by more
than ``config.chiThreshold`` sigma. The second loop takes each
difference image and filters the artifacts detected in each using
count map to filter out variable sources and sources that are
difficult to subtract cleanly.
Parameters
----------
templateCoadd : `lsst.afw.image.Exposure`
Exposure to serve as model of static sky.
tempExpRefList : `list`
List of data references to warps.
imageScalerList : `list`
List of image scalers.
Returns
-------
altMasks : `list`
List of dicts containing information about CLIPPED
(i.e., artifacts), NO_DATA, and EDGE pixels.
Definition at line 1427 of file assembleCoadd.py.