MergeDefectsTask

MergeDefectsTask combines all of the partial defect sets from the individual exposure measurements into a complete final defect set.

Processing summary

MergeDefectsTask runs these operations:

  1. Combine all input partial defect sets by the input image type (usually dark and flat exposures) based on the fraction of inputs that have a defect in each pixel.

  2. Create the final defect set from the union of all the per-image type defects.

  3. Optionally mask the edges of the detectors.

Python API summary

from lsst.cp.pipe.defects import MergeDefectsTask
classMergeDefectsTask(*, config=None, log=None, initInputs=None, **kwargs)

Merge the defects from multiple exposures...

attributeconfig

Access configuration fields and retargetable subtasks.

methodrun(inputDefects, camera)

Merge a list of single defects to find the common defect regions...

See also

See the MergeDefectsTask API reference for complete details.

Retargetable subtasks

No subtasks.

Configuration fields

assertSameRun

Default
False
Field type

bool Field

Ensure that all visits are from the same run? Raises if this is not the case, or if the run key isn’t found.

combinationFraction

Default
0.7
Field type

float RangeField

Range

[0,1)

The fraction (0..1) of visits in which a pixel was found to be defective across the visit list in order to be marked as a defect. Note, upper bound is exclusive, so use mode AND to require pixel to appear in all images.

combinationMode

Default
'FRACTION'
Field type

str ChoiceField (optional)

Choices
'AND'

Logical AND the pixels found in each visit to form set

'OR'

Logical OR the pixels found in each visit to form set

'FRACTION'

Use pixels found in more than config.combinationFraction of visits

None

Field is optional

Which types of defects to identify

connections

Data type

lsst.pipe.base.config.MergeDefectsTaskConfigConnections

Field type

ConfigField

Configurations describing the connections of the PipelineTask to datatypes

edgesAsDefects

Default
False
Field type

bool Field

Mark all edge pixels, as defined by nPixBorder[UpDown, LeftRight], as defects. Normal treatment is to simply exclude this region from the defect finding, such that no defect will be located there.

ignoreFilters

Default
True
Field type

bool Field

Set the filters used in the CALIB_ID to NONE regardless of the filters on the input images. Allows mixing of filters in the input flats. Set to False if you think your defects might be chromatic and want to have registry support for varying defects with respect to filter.

nullFilterName

Default
'NONE'
Field type

str Field

The name of the null filter if ignoreFilters is True. Usually something like NONE or EMPTY

saveLogOutput

Default
True
Field type

bool Field

Flag to enable/disable saving of log output for a task, enabled by default.