MeasureDefectsTask

MeasureCrosstalkTask is a task to identify detector defects by looking for pixels that are significantly different than the image mean.

Processing summary

MeasureDefectsTask runs these operations in a loop over amplifiers:

  1. Measures the clipped mean to estimate the background level.

  2. Subtracts that background from the image.

  3. Identifies pixels that are either above or below the configured sigma thresholds.

  4. Constructs a Defects object from the footprint set of those pixels.

Python API summary

from lsst.cp.pipe.cpDefects import MeasureDefectsTask
classMeasureDefectsTask(*, config=None, log=None, initInputs=None, **kwargs)

Measure the defects from one exposure...

attributeconfig

Access configuration fields and retargetable subtasks.

methodrun(inputExp, camera)

Measure one exposure for defects...

See also

See the MeasureDefectsTask API reference for complete details.

Retargetable subtasks

No subtasks.

Configuration fields

badOnAndOffPixelColumnThreshold

Default
50
Field type

int Field

If BPC is the set of all the bad pixels in a given column (not necessarily consecutive) and the size of BPC is at least ‘badOnAndOffPixelColumnThreshold’, all the pixels between the pixels that satisfy minY (BPC) and maxY (BPC) will be marked as bad, with ‘Y’ being the long axis of the amplifier (and ‘X’ the other axis, which for a column is a constant for all pixels in the set BPC). If there are more than ‘goodPixelColumnGapThreshold’ consecutive non-bad pixels in BPC, an exception to the above is made and those consecutive ‘goodPixelColumnGapThreshold’ are not marked as bad.

badPixelsToFillColumnThreshold

Default
-1
Field type

float Field

If the number of bad pixels in an amplifier column is above this threshold then the full amplifier column will be marked bad. This operation is performed after any merging of blinking columns performed with badOnAndOffPixelColumnThreshold. If thisvalue is less than 0 then no bad column filling will be performed.

biasThreshold

Default
1000.0
Field type

float Field

If thresholdType==``VALUE``, bias threshold (in ADU) to define hot/bright pixels in bias frame. Unused if thresholdType==``STDEV``.

connections

Data type

lsst.pipe.base.config.MeasureDefectsTaskConfigConnections

Field type

ConfigField

Configurations describing the connections of the PipelineTask to datatypes

darkCurrentThreshold

Default
5
Field type

float Field

If thresholdType=``VALUE``, dark current threshold (in e-/sec) to define hot/bright pixels in dark images. Unused if thresholdType==``STDEV``.

doVampirePixels

Default
False
Field type

bool Field

Search for vampire pixels (bright pixels surrounded by ring of low flux) in ComCam flatBootstrap and mask the area arount them.

fracThresholdFlat

Default
0.8
Field type

float Field

If thresholdType=``VALUE``, fractional threshold to define cold/dark pixels in flat images (fraction of the mean value per amplifier).Unused if thresholdType==``STDEV``.

goodPixelColumnGapThreshold

Default
30
Field type

int Field

Size, in pixels, of usable consecutive pixels in a column with on and off bad pixels (see ‘badOnAndOffPixelColumnThreshold’).

nPixBorderLeftRight

Default
0
Field type

int Field

Number of pixels to exclude from left & right of image when looking for defects.

nPixBorderUpDown

Default
0
Field type

int Field

Number of pixels to exclude from top & bottom of image when looking for defects.

nSigmaBright

Default
4.8
Field type

float Field

If thresholdType=``STDEV``, number of sigma above mean for bright/hot pixel detection. The default value was found to be appropriate for some LSST sensors in DM-17490. Unused if thresholdType==``VALUE``

nSigmaDark

Default
-5.0
Field type

float Field

If thresholdType=``STDEV``, number of sigma below mean for dark/cold pixel detection. The default value was found to be appropriate for some LSST sensors in DM-17490. Unused if thresholdType==``VALUE``

radiusVampirePixels

Default
8
Field type

int Field

Radius (in pixels) of the area to mask around ComCam flatBootstrap bright pixels.

saturatedColumnDilationRadius

Default
0
Field type

int Field

Dilation radius (along rows) to use to expand saturated columns to mitigate glow.

saturatedColumnMask

Default
'SAT'
Field type

str Field

Saturated mask plane for dilation.

saturatedPixelsToFillColumnThreshold

Default
-1
Field type

int Field

If the number of saturated pixels in an amplifier column is above this threshold then the full amplifier column will be marked bad. If this value is less than 0then no saturated column filling will be performed.

saveLogOutput

Default
True
Field type

bool Field

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

thresholdType

Default
'STDEV'
Field type

str ChoiceField (optional)

Choices
'STDEV'

Use a multiple of the image standard deviation to determine detection threshold.

'VALUE'

Use pixel value to determine detection threshold.

None

Field is optional

Defects threshold type: STDEV or VALUE. If VALUE, cold pixels will be found in flats, and hot pixels in darks. If STDEV, cold and hot pixels will be found in flats, and hot pixels in darks.

thresholdVampirePixels

Default
1.9
Field type

float Field

Pixel value threshold to find bright pixels in ComCam flatBootstrap.

Debugging

ampFlux

Display a histogram of the pixel distribution for the amplifier (bool)?

historgram

Display the amplifier with the defects overplotted (bool)?