Image Extraction (waveform cube to image)

The main operation in the event processing from DL0 to Dl1 is the reducing of the waveforms into per-pixel signal-summarising parameters, from which image analysis can be performed to reconstruct the Cherenkov shower. This summary is performed for three reasons:

  • The amount of useful information is arguably a small fraction of the total waveform volume (across all pixels in the Cherenkov camera).

  • There is typically at most one single Cherenkov signal pulse per waveform.

  • It is easier to perform further image analysis techniques on 2-dimensional images. This is a much more common image processing situation, for which many standard techniques exist across data science.

This operation is performed by an ImageExtractor. This class summarises the signal contained in the waveform with two parameters:

  • The signal’s charge

  • The position (time) of the signal with the waveform.

Image Extraction Methods

The field of signal processing is very widespread, and many common techniques are applicable to the waveforms from Cherenkov cameras. The large range of options is therefore reflected in the design of the ImageExtractor in ctapipe. ImageExtractor itself is an abstract class. Subclasses of ImageExtractor define the approach for extracting the charge and the time. Typical extraction techniques involve two stages:

  • Peak finding, to identify the most probable location for the signal

  • Integration, to extract the charge with a window that is large enough to capture the signal, but small enough that it minimises the amount of noise (e.g. Night Sky Background, electronic…) included.

However, an ImageExtractor is not forced to conform to these stages, and is free to utilise any information from the camera description (such as reference pulse shape or neighbouring pixels).

The most important criteria in selecting and configuring an ImageExtractor is the Charge/Intensity Resolution - how well the extracted charge matches the true charge. The best ImageExtractor for one camera type may not be the same for another.

See below for the currently existing ImageExtractor classes.

Units and Normalisation

An ImageExtractor should preserve the units of the waveform samples when extracting the charge. I.e. if the samples are already calibrated into photoelectrons, then the charge reported by the ImageExtractor should be in photoelectrons. The simple ImageExtractor implementations (e.g. LocalPeakWindowSum) achieve this with the integration_correction method, which scales the summed samples to account for the percentage of the pulse missed by the the window. This way, if a single photoelectron exists in the waveform (and no noise) then the result of the ImageExtractor will equal 1, no matter the window size.

The extracted pulse time is corrected for the waveform sampling rate to be provided in units of nanoseconds.

Examples

TwoPassWindowSum

Example of 1st pass integration:

../../_images/TwoPassWindowSum_1st_pass_example.png

ctapipe.image.extractor Module

Charge extraction algorithms to reduce the image to one value per pixel

Functions

neighbor_average_maximum(waveforms, …)

Obtain the average waveform built from the neighbors of each pixel

subtract_baseline(waveforms, baseline_start, …)

Subtracts the waveform baseline, estimated as the mean waveform value in the interval [baseline_start:baseline_end]

integration_correction(…)

Obtain the correction for the integration window specified.

Classes

ImageExtractor(**kwargs)

FlashCamExtractor(**kwargs)

Image extractor applying signal preprocessing for FlashCam

FullWaveformSum(**kwargs)

Extractor that sums the entire waveform.

FixedWindowSum(**kwargs)

Extractor that sums within a fixed window defined by the user.

GlobalPeakWindowSum(**kwargs)

Extractor which sums in a window about the peak from the global average waveform.

LocalPeakWindowSum(**kwargs)

Extractor which sums in a window about the peak in each pixel’s waveform.

SlidingWindowMaxSum(**kwargs)

Sliding window extractor that maximizes the signal in window_width consecutive slices.

NeighborPeakWindowSum(**kwargs)

Extractor which sums in a window about the peak defined by the wavefroms in neighboring pixels.

BaselineSubtractedNeighborPeakWindowSum(**kwargs)

Extractor that first subtracts the baseline before summing in a window about the peak defined by the wavefroms in neighboring pixels.

TwoPassWindowSum(**kwargs)

Extractor based on [R068cfbfeb598-1] which integrates the waveform a second time using a time-gradient linear fit.

Class Inheritance Diagram

digraph inheritance7897f21cf3 { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "BaselineSubtractedNeighborPeakWindowSum" [URL="../../api/ctapipe.image.extractor.BaselineSubtractedNeighborPeakWindowSum.html#ctapipe.image.extractor.BaselineSubtractedNeighborPeakWindowSum",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="Extractor that first subtracts the baseline before summing in a"]; "NeighborPeakWindowSum" -> "BaselineSubtractedNeighborPeakWindowSum" [arrowsize=0.5,style="setlinewidth(0.5)"]; "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)"]; "FixedWindowSum" [URL="../../api/ctapipe.image.extractor.FixedWindowSum.html#ctapipe.image.extractor.FixedWindowSum",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="Extractor that sums within a fixed window defined by the user."]; "ImageExtractor" -> "FixedWindowSum" [arrowsize=0.5,style="setlinewidth(0.5)"]; "FlashCamExtractor" [URL="../../api/ctapipe.image.extractor.FlashCamExtractor.html#ctapipe.image.extractor.FlashCamExtractor",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="Image extractor applying signal preprocessing for FlashCam"]; "ImageExtractor" -> "FlashCamExtractor" [arrowsize=0.5,style="setlinewidth(0.5)"]; "FullWaveformSum" [URL="../../api/ctapipe.image.extractor.FullWaveformSum.html#ctapipe.image.extractor.FullWaveformSum",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="Extractor that sums the entire waveform."]; "ImageExtractor" -> "FullWaveformSum" [arrowsize=0.5,style="setlinewidth(0.5)"]; "GlobalPeakWindowSum" [URL="../../api/ctapipe.image.extractor.GlobalPeakWindowSum.html#ctapipe.image.extractor.GlobalPeakWindowSum",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="Extractor which sums in a window about the"]; "ImageExtractor" -> "GlobalPeakWindowSum" [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)"]; "ImageExtractor" [URL="../../api/ctapipe.image.extractor.ImageExtractor.html#ctapipe.image.extractor.ImageExtractor",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"]; "TelescopeComponent" -> "ImageExtractor" [arrowsize=0.5,style="setlinewidth(0.5)"]; "LocalPeakWindowSum" [URL="../../api/ctapipe.image.extractor.LocalPeakWindowSum.html#ctapipe.image.extractor.LocalPeakWindowSum",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="Extractor which sums in a window about the"]; "ImageExtractor" -> "LocalPeakWindowSum" [arrowsize=0.5,style="setlinewidth(0.5)"]; "NeighborPeakWindowSum" [URL="../../api/ctapipe.image.extractor.NeighborPeakWindowSum.html#ctapipe.image.extractor.NeighborPeakWindowSum",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="Extractor which sums in a window about the"]; "ImageExtractor" -> "NeighborPeakWindowSum" [arrowsize=0.5,style="setlinewidth(0.5)"]; "SlidingWindowMaxSum" [URL="../../api/ctapipe.image.extractor.SlidingWindowMaxSum.html#ctapipe.image.extractor.SlidingWindowMaxSum",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="Sliding window extractor that maximizes the signal in window_width consecutive slices."]; "ImageExtractor" -> "SlidingWindowMaxSum" [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)"]; "TwoPassWindowSum" [URL="../../api/ctapipe.image.extractor.TwoPassWindowSum.html#ctapipe.image.extractor.TwoPassWindowSum",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="Extractor based on [1]_ which integrates the waveform a second time using"]; "ImageExtractor" -> "TwoPassWindowSum" [arrowsize=0.5,style="setlinewidth(0.5)"]; }