EventPreparer#

class protopipe.pipeline.EventPreparer(config, subarray, cams_and_foclens, mode, event_cutflow=None, image_cutflow=None, debug=False)[source]#

Bases: object

Class which loop on events and returns results stored in container.

The Class has several purposes. First of all, it prepares the images of the event that will be further use for reconstruction by applying calibration, cleaning and selection. Then, it reconstructs the geometry of the event and then returns image (e.g. Hillas parameters)and event information (e.g. results of the reconstruction).

Parameters
config: dict

Configuration with analysis parameters

mode: str

Mode of the reconstruction, e.g. tail or wave

event_cutflow: ctapipe.utils.CutFlow

Statistic of events processed

image_cutflow: ctapipe.utils.CutFlow

Statistic of images processed

Returns: dict

Dictionnary of results

Initiliaze an EventPreparer object.

Methods Summary

prepare_event(source[, return_stub, ...])

Calibrate, clean and reconstruct the direction of an event.

Methods Documentation

prepare_event(source, return_stub=True, save_images=False, debug=False)[source]#

Calibrate, clean and reconstruct the direction of an event.

Parameters
sourcectapipe.io.EventSource

A container of selected showers from a simtel file.

geom_cam_tel: dict

Dictionary of MyCameraGeometry objects for each camera in the file

return_stubbool

If True, yield also images from events that won’t be reconstructed. This is required for DL1 benchmarking.

save_imagesbool

If True, save photoelectron images from reconstructed events.

debugbool

If True, print debugging information.

Yields
PreparedEvent: dict

Dictionary containing event-image information to be written.