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.defects import MeasureDefectsTask
classMeasureDefectsTask(*, config: Optional[PipelineTaskConfig] = None, log: Optional[Union[logging.Logger, LsstLogAdapter]] = None, initInputs: Optional[Dict[str, Any]] = 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.

connections

Data type
lsst.pipe.base.config.Connections
Field type
ConfigField
Configurations describing the connections of the PipelineTask to datatypes

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
7
Field type
int Field
Number of pixels to exclude from left & right of image when looking for defects.

nPixBorderUpDown

Default
7
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
Number of sigma above mean for bright pixel detection. The default value was found to be appropriate for some LSST sensors in DM-17490.

nSigmaDark

Default
-5.0
Field type
float Field
Number of sigma below mean for dark pixel detection. The default value was found to be appropriate for some LSST sensors in DM-17490.

saveLogOutput

Default
True
Field type
bool Field
Flag to enable/disable saving of log output for a task, enabled by default.

saveMetadata

Default
True
Field type
bool Field
Flag to enable/disable metadata saving for a task, enabled by default.

Debugging

ampFlux
Display a histogram of the pixel distribution for the amplifier (bool)?
historgram
Display the amplifier with the defects overplotted (bool)?