DL2EventPreprocessor#

class ctapipe.io.dl2_tables_preprocessing.DL2EventPreprocessor(**kwargs: Any)[source]#

Bases: Component

Defines pre-selection cuts and the necessary renaming of columns.

Attributes Summary

allow_unsupported_pointing_frames

Check whether the pointing is supported.For the moment, only pointing in altaz is supported.Divergent pointing is also not supported.

apply_derived_columns

Whether to compute derived columns

classes

columns_to_rename

Dictionary of columns to rename.

energy_reconstructor

Prefix of the reco _energy column

gammaness_classifier

Prefix of the classifier _prediction column

geometry_reconstructor

Prefix of the _alt and _az reco geometry columns

output_table_schema

Schema definition for output event QTable

Methods Summary

make_empty_table()

Create an empty event table based on the configured output schema.

normalise_column_names(events)

Rename column names according to configuration.

Attributes Documentation

allow_unsupported_pointing_frames#

Check whether the pointing is supported.For the moment, only pointing in altaz is supported.Divergent pointing is also not supported.

apply_derived_columns#

Whether to compute derived columns

classes = [<class 'ctapipe.io.dl2_tables_preprocessing.DL2EventQualityQuery'>]#
columns_to_rename#

Dictionary of columns to rename. Leave unset to apply default renaming. Set to an empty dictionary to disable renaming entirely. Set to a partial dictionary to override only some names.

energy_reconstructor#

Prefix of the reco _energy column

gammaness_classifier#

Prefix of the classifier _prediction column

geometry_reconstructor#

Prefix of the _alt and _az reco geometry columns

output_table_schema#

Schema definition for output event QTable

Methods Documentation

make_empty_table() QTable[source]#

Create an empty event table based on the configured output schema.

normalise_column_names(events: QTable) QTable[source]#

Rename column names according to configuration.

Parameters:
eventsQTable

Input event table.

Returns:
QTable

Table with selected and renamed columns.

Raises:
NotImplementedError

If pointing is not AltAz or varies too much.

ValueError

If required columns are missing.