TwoPassWindowSum#
- class ctapipe.image.TwoPassWindowSum(**kwargs: Any)[source]#
Bases:
ImageExtractor
Extractor based on [1] which integrates the waveform a second time using a time-gradient linear fit. This is in particular the version implemented in the CTA-MARS analysis pipeline [2].
Notes
slide a 3-samples window through the waveform, finding max counts sum; the range of the sliding is the one allowing extension from 3 to 5; add 1 sample on each side and integrate charge in the 5-sample window; time is obtained as a charge-weighted average of the sample numbers; No information from neighbouring pixels is used.
Preliminary image cleaning via simple tailcut with minimum number of core neighbours set at 1,
Only the brightest cluster of pixels is kept.
Parametrize following Hillas approach only if the resulting image has 3 or more pixels.
Do a linear fit of pulse time vs. distance along major image axis (CTA-MARS uses ROOT “robust” fit option, aka Least Trimmed Squares, to get rid of far outliers - this should be implemented in ‘timing_parameters’, e.g scipy.stats.siegelslopes).
For all pixels except the core ones in the main island, integrate the waveform once more, in a fixed window of 5 samples set at the time “predicted” by the linear time fit. If the predicted time for a pixel leads to a window outside the readout window, then integrate the last (or first) 5 samples.
The result is an image with main-island core pixels calibrated with a 1st pass and non-core pixels re-calibrated with a 2nd pass.
References
[1]Holder et al., Astroparticle Physics, 25, 6, 391 (2006)
Attributes Summary
Apply the integration window correction.
Picture threshold for internal tail-cuts pass.
only run the first pass of the extractor, for debugging purposes
Name of the InvalidPixelHandler to apply in the first pass.
Methods Summary
__call__
(waveforms, tel_id, ...)Call the relevant functions to fully extract the charge and time for the particular extractor.
Attributes Documentation
- apply_integration_correction#
Apply the integration window correction.
- core_threshold#
Picture threshold for internal tail-cuts pass.
- disable_second_pass#
only run the first pass of the extractor, for debugging purposes
- invalid_pixel_handler_type#
Name of the InvalidPixelHandler to apply in the first pass.. Possible values: []
Methods Documentation
- __call__(waveforms, tel_id, selected_gain_channel, broken_pixels) DL1CameraContainer [source]#
Call the relevant functions to fully extract the charge and time for the particular extractor.
- Parameters:
- waveformsndarray
Waveforms stored in a numpy array of shape (n_channels, n_pix, n_samples).
- tel_idint
The telescope id. Used to obtain to correct traitlet configuration and instrument properties
- selected_gain_channelndarray
The channel selected in the gain selection, per pixel. Required in some cases to calculate the correct correction for the charge extraction.
- broken_pixelsndarray
Mask of broken pixels used for certain
ImageExtractor
types. Shape: (n_channels, n_pix)
- Returns:
- DL1CameraContainer:
extracted images and validity flags