Image Cleaning

Cleaning/denoising of images (tailcuts cleaning, dilation, filtering).

An example of image cleaning and dilation:

../../_images/dilate.png

API Reference

ctapipe.image.cleaning Module

Image Cleaning Algorithms (identification of noisy pixels)

All algorithms return a boolean mask that is True for pixels surviving the cleaning.

To get a zero-suppressed image and pixel list, use image[mask], geom.pix_id[mask], or to keep the same image size and just set unclean pixels to 0 or similar, use image[~mask] = 0

Functions

tailcuts_clean(geom, image[, …])

Clean an image by selection pixels that pass a two-threshold tail-cuts procedure.

dilate(geom, mask)

Add one row of neighbors to the True values of a pixel mask and return the new mask.

mars_cleaning_1st_pass(geom, image[, …])

Clean an image by selection pixels that pass a three-threshold tail-cuts procedure.

fact_image_cleaning(geom, image, arrival_times)

Clean an image by selection pixels that pass the fact cleaning procedure.

apply_time_delta_cleaning(geom, mask, …)

Identify all pixels from selection that have less than N neighbors that arrived within a given timeframe.

apply_time_average_cleaning(geom, mask, …)

Extract all pixels that arrived within a given timeframe with respect to the time average of the pixels on the main island.

time_constrained_clean(geom, image, …[, …])

time constrained cleaning by MAGIC

Classes

ImageCleaner(**kwargs)

Abstract class for all configurable Image Cleaning algorithms.

TailcutsImageCleaner(**kwargs)

Clean images using the standard picture/boundary technique.

Class Inheritance Diagram

digraph inheritance0e9014c284 { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "Component" [URL="../../api/ctapipe.core.component.Component.html#ctapipe.core.component.Component",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Base class of all Components."]; "Configurable" -> "Component" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Configurable" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled"]; "HasTraits" -> "Configurable" [arrowsize=0.5,style="setlinewidth(0.5)"]; "HasDescriptors" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="The base class for all classes that have descriptors."]; "HasTraits" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled"]; "HasDescriptors" -> "HasTraits" [arrowsize=0.5,style="setlinewidth(0.5)"]; "ImageCleaner" [URL="../../api/ctapipe.image.cleaning.ImageCleaner.html#ctapipe.image.cleaning.ImageCleaner",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Abstract class for all configurable Image Cleaning algorithms. Use"]; "TelescopeComponent" -> "ImageCleaner" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TailcutsImageCleaner" [URL="../../api/ctapipe.image.cleaning.TailcutsImageCleaner.html#ctapipe.image.cleaning.TailcutsImageCleaner",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Clean images using the standard picture/boundary technique. See"]; "ImageCleaner" -> "TailcutsImageCleaner" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TelescopeComponent" [URL="../../api/ctapipe.core.telescope_component.TelescopeComponent.html#ctapipe.core.telescope_component.TelescopeComponent",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A component that needs a `~ctapipe.instrument.SubarrayDescription` to be constructed,"]; "Component" -> "TelescopeComponent" [arrowsize=0.5,style="setlinewidth(0.5)"]; }