Calibration event processing#
Common#
The common first step in the calibration process is image extraction. In this step, pixel-wise quantities such as charges, peak times, and/or variances are computed from the waveforms, which conform to the CTAO DL0 Data Model. This is typically done by integrating or otherwise reducing the waveform data for each pixel. The image extraction is performed using the ctapipe-process tool.
DataWriter: Responsible for saving the extracted quantities to a file, following the reference implementation of the ctapipe DL1 data format.
EventTypeFilter: Used to select the calibration events that will be processed.
The configuration required for image extraction varies depending on the type of calibration event. The following standard fields must be provided (except when using the VarianceExtractor):
window_shift: Defines the shift of the integration window relative to the peak_index (peak_index - shift).
window_width: Defines the width of the integration window.
apply_integration_correction: Indicates whether to apply the integration window correction.
Flat-field events#
The standard processing of flat-field events for the camera calibration uses the LocalPeakWindowSum extractor, which sums the signal in a window around the peak in each pixel’s waveform.
Below is an example configuration for the camera calibration using flat-field events.
It includes the necessary components for image extraction,
event type filtering, and data writing.
The configuration is designed to handle flat-field events
and performs the required processing steps using the ctapipe-process tool.
# Data writing configuration
DataWriter:
write_dl1_images: true # Required parameter to write flatfield images to DL1
write_dl1_parameters: false
write_dl2: false
transform_image: true
transform_peak_time: true
# Event type filter configuration
EventTypeFilter:
allowed_types: [FLATFIELD]
# Image extraction configuration
CameraCalibrator:
image_extractor_type:
- ['type', '*', 'LocalPeakWindowSum']
LocalPeakWindowSum:
window_shift:
- ['type', '*', 5]
window_width:
- ['type', '*', 12]
apply_integration_correction:
- ['type', '*', false]
# SimTelEventSource configuration (only needed for simulations)
SimTelEventSource:
skip_calibration_events: false
skip_r1_calibration: true
Sky pedestal events#
The standard processing of sky pedestal events for the camera calibration uses the FixedWindowSum extractor, which sums the signal within a fixed, user-defined window.
In addition to the standard fields, the peak_index, indicating the signal summing reference point, must be provided.
Below is an example configuration for the camera calibration using sky pedestal events. It includes the necessary components for image extraction, event type filtering, and data writing. The configuration is designed to handle sky pedestal events and performs the required processing steps using the ctapipe-process tool.
# Data writing configuration
DataWriter:
write_dl1_images: true # Required parameter to write pedestal images to DL1
write_dl1_parameters: false
write_dl2: false
transform_image: true
transform_peak_time: true
# Event type filter configuration
EventTypeFilter:
allowed_types: [PEDESTAL, SKY_PEDESTAL]
CameraCalibrator:
image_extractor_type:
- ['type', '*', 'FixedWindowSum']
FixedWindowSum:
window_shift:
- ['type', '*', 6]
window_width:
- ['type', '*', 12]
peak_index:
- ['type', '*', 18]
apply_integration_correction:
- ['type', '*', false]
# SimTelEventSource configuration (only needed for simulations)
SimTelEventSource:
skip_calibration_events: false
skip_r1_calibration: true
The standard processing of sky pedestal events for the pointing correction uses the VarianceExtractor, which calculates the signal variance in each waveform.
Below is an example configuration for the pointing correction using sky pedestal events. It includes the necessary components for variance image extraction, event type, and data writing. The configuration is designed to handle variance images of sky pedestal events and performs the required processing steps using the ctapipe-process tool.
# Data writing configuration
DataWriter:
write_dl1_images: true
write_dl1_parameters: false
write_dl2: false
transform_image: true
transform_peak_time: true
# Event type filter configuration
EventTypeFilter:
allowed_types: [PEDESTAL, SKY_PEDESTAL]
# Image extraction configuration
CameraCalibrator:
image_extractor_type:
- ['type', '*', 'VarianceExtractor']
Muon events#
The standard processing of muon events for the optical throughput uses the GlobalPeakWindowSum extractor, which sums signal in a window around the peak position of the global average waveform.
In addition to the standard parameters, the pixel_fraction is required to identify the position of the integration window.
Below is an example configuration for the calibration pipeline of the muon processing. It includes the necessary components for image extraction, event type filtering, image cleaning, muon processing/fitting, and data writing. The configuration is designed to handle muon events and performs the required processing steps using the ctapipe-process tool.
# Data writing configuration
DataWriter:
write_dl1_images: False # Optional parameter to write muon images to DL1
write_dl1_parameters: False # Optional parameter to write parameters to DL1
write_muon_parameters: true # Required parameter to write muon parameters to DL1
write_dl2: false
transform_image: true
transform_peak_time: true
# Event type filter configuration: currently may not work as muon events aren't properly tagged
# EventTypeFilter:
# allowed_types: [MUON]
# Image extraction configuration
CameraCalibrator:
image_extractor_type:
- ["type", "*", "GlobalPeakWindowSum"]
invalid_pixel_handler_type: "NeighborAverage"
apply_waveform_time_shift: False
apply_peak_time_shift: True
GlobalPeakWindowSum:
window_shift:
- ["type", "*", 3]
window_width:
- ["type", "*", 7]
apply_integration_correction:
- ["type", "*", True]
pixel_fraction:
- ["type", "*", 1]
The processing of muon events goes beyond the standard image extraction and requires additional steps, the extraction of muon parameters. We are also providing two more configuration section, that are mandatory for the muon processing. These sections are:
Image cleaning: The image cleaning step is responsible for removing noise pixels from the extracted images. It uses the ctapipe’s ImageCleaner class to apply a specific cleaning algorithm to the images.
Muon processing/fitting: This step is responsible for processing and fitting the muon events. It uses the ctapipe’s MuonProcessor class to perform the muon reconstruction and fitting.
# Image cleaning configuration
ImageProcessor:
image_cleaner_type: "TailcutsImageCleaner"
use_telescope_frame: True
TailcutsImageCleaner:
picture_threshold_pe:
- ["type", "*", 10]
boundary_threshold_pe:
- ["type", "*", 5]
min_picture_neighbors:
- ["type", "*", 2]
keep_isolated_pixels:
- ["type", "*", False]
ImageParameterQuery:
quality_criteria:
[
["min_pixels", "dl1_params.morphology.n_pixels > 20"],
["min_intensity", "dl1_params.hillas.intensity > 50"],
]
# Muon processing/fitting configuration
MuonProcessor:
completeness_threshold:
- ["type", "*", 30]
ratio_width:
- ["type", "*", 1.5]
pedestal:
- ["type", "*", 1.1]
ring_integration_width:
- ["type", "*", 0.25]
outer_ring_width:
- ["type", "*", 0.2]
MuonIntensityFitter:
hole_radius_m:
- ["type", "LST*", 0.74]
- ["type", "MST*", 0.59]
- ["type", "SST*", 0.38]
spe_width:
- ["type", "*", 0.5]
min_lambda_m:
- ["type", "*", 0.0000003]
max_lambda_m:
- ["type", "*", 0.0000006]
oversampling:
- ["type", "*", 3]
RingQuery:
quality_criteria:
[
["radius_not_nan", "np.isfinite(ring.radius.value)"],
["min_pixels", "np.count_nonzero(mask) > 20"],
]
The fields of these two configurations have been already presented above. It is worth noticing that for the muon processing the DL1 images do not have to be stored in the output file for the further analysis. In order to perform the whole muon processing the user has to provide the two standard configuration files or a single concatenated configuration file in the CLI.