PointSourceSensitivityGhOptimizer#

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

Bases: PointSourceSensitivityOptimizerBase

Optimize gamma-hadron-separation cuts for best point-source sensitivity.

This approach computes a simple, percentile based cut for theta and then performs a grid search for best sensitivity only for the G/H cut using pyirf.cut_optimization.optimize_gh_cut.

Attributes Summary

initial_gh_cut_efficency

Start value of gamma efficiency before optimization

Methods Summary

__call__(events, quality_query, clf_prefix)

Optimize G/H (and optionally spatial selection) cuts and fill them in an OptimizationResult.

Attributes Documentation

initial_gh_cut_efficency#

Start value of gamma efficiency before optimization

Methods Documentation

__call__(events: dict[str, QTable], quality_query: DL2EventQualityQuery, clf_prefix: str) OptimizationResult[source]#

Optimize G/H (and optionally spatial selection) cuts and fill them in an OptimizationResult.

Parameters:
events: dict[str, astropy.table.QTable]

Dictionary containing tables of events used for calculating cuts. This has to include “signal” events and can include “background” events.

quality_query: ctapipe.io.DL2EventPreprocessor

ctapipe.core.QualityQuery subclass containing preselection criteria for events.

clf_prefix: str

Prefix of the output from the G/H classifier for which the cut will be optimized.