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

Reference/API#

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#

Inheritance diagram of ctapipe.image.extractor.ImageExtractor, ctapipe.image.extractor.FlashCamExtractor, ctapipe.image.extractor.FullWaveformSum, ctapipe.image.extractor.FixedWindowSum, ctapipe.image.extractor.GlobalPeakWindowSum, ctapipe.image.extractor.LocalPeakWindowSum, ctapipe.image.extractor.SlidingWindowMaxSum, ctapipe.image.extractor.NeighborPeakWindowSum, ctapipe.image.extractor.BaselineSubtractedNeighborPeakWindowSum, ctapipe.image.extractor.TwoPassWindowSum