EventPreprocessor#

class ctapipe.io.EventPreprocessor(*args: t.Any, **kwargs: t.Any)[source]#

Bases: Component

Selects or generates features and filters tables of events.

In normal use, one only has to specify the feature_set option, which will generate features supports standard use cases. For advanced usage, you can set feature_set=custom and pass in a configured FeatureGenerator and set the features property of this class with the columns you to retain in the output table.

In the FeatureGenerator used internally, you have access to several additional functions useful for DL2 processing:

Attributes Summary

energy_reconstructor

Prefix of the reco _energy column

feature_set

Set up the FeatureGenerator.features, output features, and quality criteria based on standard use cases.Specify 'custom' if you want to set your own in your config file.

features

Features (columns) to retain in the output.

gammaness_reconstructor

Prefix of the classifier _prediction column

geometry_reconstructor

Prefix of the _alt and _az reco geometry columns

Methods Summary

__call__(table)

Return new table with only the columns in features.

Attributes Documentation

energy_reconstructor#

Prefix of the reco _energy column

feature_set#

Set up the FeatureGenerator.features, output features, and quality criteria based on standard use cases.Specify ‘custom’ if you want to set your own in your config file. If this is set to any value other than ‘custom’, the feature properties of the configuration file you pass in will be overridden.

features#

Features (columns) to retain in the output. These can include columns generated by the FeatureGenerator. If you set these, make sure feature_set=custom.

gammaness_reconstructor#

Prefix of the classifier _prediction column

geometry_reconstructor#

Prefix of the _alt and _az reco geometry columns

Methods Documentation

__call__(table)[source]#

Return new table with only the columns in features.