optimize_cuts
- pyirf.cut_optimization.optimize_cuts(signal, background, reco_energy_bins, multiplicity_cuts, gh_cut_efficiencies, theta_cut_efficiencies, fov_offset_min=<Quantity 0. deg>, fov_offset_max=<Quantity 1. deg>, alpha=1.0, theta_min_value=<Quantity 0.02 deg>, theta_max_value=<Quantity 0.3 deg>, progress=True, **kwargs)[source]
Optimize the gamma/hadronnes, theta and multiplicity cut in every energy bin of reconstructed energy for best sensitivity.
- Parameters:
- signal: astropy.table.QTable
event list of simulated signal events. Required columns are theta, reco_energy, ‘weight’, gh_score No directional (theta) or gamma/hadron cut should already be applied.
- background: astropy.table.QTable
event list of simulated background events. Required columns are reco_source_fov_offset, reco_energy, ‘weight’, gh_score. No directional (theta) or gamma/hadron cut should already be applied.
- reco_energy_bins: astropy.units.Quantity[energy]
Bins in reconstructed energy to use for sensitivity computation
- multiplicity_cuts: np.ndarray[int, ndim=1]
Values to scan for minimum telescope multiplicity
- gh_cut_efficiencies: np.ndarray[float, ndim=1]
The gamma/hadron separation cut efficiencies to scan for best sensitivity.
- theta_cut_efficiencies: astropy.table.QTable
The theta cut efficiencies to scan for best sensitivity.
- fov_offset_min: astropy.units.Quantity[angle]
Minimum distance from the fov center for background events to be taken into account
- fov_offset_max: astropy.units.Quantity[angle]
Maximum distance from the fov center for background events to be taken into account
- alpha: float
Size ratio of off region / on region. Will be used to scale the background rate.
- theta_min_valueu.Quantity[angle]
minimum theta cut value
- theta_max_valueu.Quantity[angle]
maximum theta cut value
- progress: bool
If True, show a progress bar during cut optimization
- **kwargs are passed to ``calculate_sensitivity``