DL3Cuts

class lstchain.io.event_selection.DL3Cuts(**kwargs: Any)

Bases: Component

Selection cuts for DL2 to DL3 conversion

Attributes Summary

allowed_tels

List of allowed LST telescope ids

alpha_containment

Percentage containment region for alpha cuts

fill_alpha_cut

Fill value of alpha cut (deg) in an energy bin with fewer than minimum number of events present

fill_theta_cut

Fill value of theta cut (deg) in an energy bin with fewer than minimum number of events present

gh_efficiency

Gamma efficiency for optimized g/h cuts in %

global_alpha_cut

Global selection cut (deg) for alpha

global_gh_cut

Global selection cut for gh_score (gammaness)

global_theta_cut

Global selection cut (deg) for theta

max_alpha_cut

Maximum alpha cut (deg) in an energy bin

max_gh_cut

Maximum gh_score (gammaness) cut in an energy bin

max_theta_cut

Maximum theta cut (deg) in an energy bin

min_alpha_cut

Minimum alpha cut (deg) in an energy bin

min_event_p_en_bin

Minimum events per energy bin, to evaluate percentile cuts

min_gh_cut

Minimum gh_score (gammaness) cut in an energy bin

min_theta_cut

Minimum theta cut (deg) in an energy bin

theta_containment

Percentage containment region for theta cuts

Methods Summary

allowed_tels_filter(data)

Applying a filter on telescopes used for observation.

apply_energy_dependent_alpha_cuts(data, ...)

Applying a given energy-dependent alpha cuts on a given data, along the reco energy bins.

apply_energy_dependent_gh_cuts(data, gh_cuts)

Applying a given energy-dependent gh cuts on the given data, along the reco energy bins.

apply_energy_dependent_theta_cuts(data, ...)

Applying a given energy-dependent theta cuts on a given data, along the reco energy bins.

apply_global_alpha_cut(data)

Applying a global alpha cut on a given data

apply_global_gh_cut(data)

Applying a global gammaness cut on a given data

apply_global_theta_cut(data)

Applying a global theta cut on a given data

energy_dependent_alpha_cuts(data, energy_bins)

Evaluating an optimized energy-dependent alpha cuts, in a given data, with provided reco energy bins, and other parameters to pass to the pyirf.cuts.calculate_percentile_cut function.

energy_dependent_gh_cuts(data, energy_bins)

Evaluating energy-dependent gammaness cuts, in a given data, with provided reco energy bins, and other parameters to pass to the pyirf.cuts.calculate_percentile_cut function

energy_dependent_theta_cuts(data, energy_bins)

Evaluating energy-dependent theta cuts, in a given MC data, with provided reco energy bins, and other parameters to pass to the pyirf.cuts.calculate_percentile_cut function.

update_fill_cuts(cut_table)

For an energy-dependent cut table, update the cuts for bins with number of events fewer than the minimum number, for which pyirf uses a constant fill_value, usually at the energy threshold limits, with cut evaluated at the nearest bin with number of events more than the given minimum.

Attributes Documentation

allowed_tels

List of allowed LST telescope ids

alpha_containment

Percentage containment region for alpha cuts

fill_alpha_cut

Fill value of alpha cut (deg) in an energy bin with fewer than minimum number of events present

fill_theta_cut

Fill value of theta cut (deg) in an energy bin with fewer than minimum number of events present

gh_efficiency

Gamma efficiency for optimized g/h cuts in %

global_alpha_cut

Global selection cut (deg) for alpha

global_gh_cut

Global selection cut for gh_score (gammaness)

global_theta_cut

Global selection cut (deg) for theta

max_alpha_cut

Maximum alpha cut (deg) in an energy bin

max_gh_cut

Maximum gh_score (gammaness) cut in an energy bin

max_theta_cut

Maximum theta cut (deg) in an energy bin

min_alpha_cut

Minimum alpha cut (deg) in an energy bin

min_event_p_en_bin

Minimum events per energy bin, to evaluate percentile cuts

min_gh_cut

Minimum gh_score (gammaness) cut in an energy bin

min_theta_cut

Minimum theta cut (deg) in an energy bin

theta_containment

Percentage containment region for theta cuts

Methods Documentation

allowed_tels_filter(data)

Applying a filter on telescopes used for observation.

apply_energy_dependent_alpha_cuts(data, alpha_cuts)

Applying a given energy-dependent alpha cuts on a given data, along the reco energy bins.

apply_energy_dependent_gh_cuts(data, gh_cuts)

Applying a given energy-dependent gh cuts on the given data, along the reco energy bins.

apply_energy_dependent_theta_cuts(data, theta_cuts)

Applying a given energy-dependent theta cuts on a given data, along the reco energy bins.

apply_global_alpha_cut(data)

Applying a global alpha cut on a given data

apply_global_gh_cut(data)

Applying a global gammaness cut on a given data

apply_global_theta_cut(data)

Applying a global theta cut on a given data

energy_dependent_alpha_cuts(data, energy_bins, smoothing=None)

Evaluating an optimized energy-dependent alpha cuts, in a given data, with provided reco energy bins, and other parameters to pass to the pyirf.cuts.calculate_percentile_cut function.

Note: Using too fine binning will result in too un-smooth cuts.

energy_dependent_gh_cuts(data, energy_bins, smoothing=None)

Evaluating energy-dependent gammaness cuts, in a given data, with provided reco energy bins, and other parameters to pass to the pyirf.cuts.calculate_percentile_cut function

energy_dependent_theta_cuts(data, energy_bins, use_same_disp_sign=True, smoothing=None)

Evaluating energy-dependent theta cuts, in a given MC data, with provided reco energy bins, and other parameters to pass to the pyirf.cuts.calculate_percentile_cut function.

For MC events, the disp_sign may be reconstructed incorrectly with respect to the true value, and thus resulting in a bi-modal PSF. For evaluating the energy-dependent theta cuts, we want to consider, only the central region of PSF. To fix this issue, by default, we apply a mask on the data, so as to only use events with the same disp_sign after reconstruction, for evaluating the percentile cut.

Note: In this case, at low energies, where disp_sign determination is pretty uncertain, an efficiency of 40% or larger will result in a cut which keeps the whole central region of the PSF.

If the user wishes to not use this method, they can make the boolean use_same_disp_sign as False.

Note: Using too fine binning will result in too un-smooth cuts.

update_fill_cuts(cut_table)

For an energy-dependent cut table, update the cuts for bins with number of events fewer than the minimum number, for which pyirf uses a constant fill_value, usually at the energy threshold limits, with cut evaluated at the nearest bin with number of events more than the given minimum.

In the case, where the low-events bin is in between high-events bins, the cut value for that low-events bin is taken as the mean of the neighbouring cut values.