find_clumps: Locates and classifies clumps (Events) of damaged pixels in a...

View source: R/clump.R

find_clumpsR Documentation

Locates and classifies clumps (Events) of damaged pixels in a detector. Adds an events matrix attribute to a detector.

Description

Clumps are a collection of neighboring dead pixels. Pixels are classified as a clumps if they share an edge. A mathematical definition can be found here. See details for classifications types.

Usage

find_clumps(detector, row = NA, col = NA)

Arguments

detector

Detector object

row

Module row number

col

Module column number

Details

Classification Description
Singlton Single connecting pixel.
Doublets Two connecting pixels.
Triplets Three connecting pixels.
Upper horizontal line Horizontal line in upper half of detector.
Lower horizontal line Horizontal line in lower half of detector.
Left vertical line Vertical line on left side of detector.
Right vertical line Vertical line on right side of detector.
Larger cluster Any larger grouping of damaged pixels.

Lines have a pixel width of 1 but my include up to 10% stray adjacent pixels.

Value

Detector with events matrix attribute

Examples

# Create a detector
detector_pilatus <- create_detector("Pilatus")
# Load a pixel matrix
file_path <-  system.file("extdata", "Pilatus", "badpixel_mask.tif",
                         package ="detectorchecker")
detector_pilatus <- load_pix_matrix(detector = detector_pilatus, file_path = file_path)
 #Find clumps
detector_pilatus_w_clumps <- find_clumps(detector_pilatus)

alan-turing-institute/DetectorChecker documentation built on April 13, 2025, 8:57 p.m.