Skip to content

Commit cad944f

Browse files
committed
Update resource configs and docstring
1 parent 422965f commit cad944f

3 files changed

Lines changed: 18 additions & 13 deletions

File tree

src/ctapipe/irf/optimize.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,9 +293,9 @@ def __call__(self, theta, reco_energy, reco_energy_bins):
293293
class PercentileCuts(CutOptimizerBase):
294294
"""
295295
Calculates G/H separation cut based on the percentile of signal events
296-
to keep in each bin.
296+
to keep in each bin via ``GhPercentileCutCalculator``.
297297
Optionally also calculates a percentile cut on theta based on the signal
298-
events surviving this G/H cut.
298+
events surviving this G/H cut via ``ThetaPercentileCutCalculator``.
299299
"""
300300

301301
def __init__(self, config=None, parent=None, **kwargs):

src/ctapipe/resources/compute_irf.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ DL2EventPreprocessor:
2525

2626
DL2EventQualityQuery:
2727
quality_criteria:
28-
- ["multiplicity 4", "np.count_nonzero(HillasReconstructor_telescopes,axis=1) >= 4"]
2928
- ["valid classifier", "RandomForestClassifier_is_valid"]
3029
- ["valid geom reco", "HillasReconstructor_is_valid"]
3130
- ["valid energy reco", "RandomForestRegressor_is_valid"]

src/ctapipe/resources/optimize_cuts.yaml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ EventSelectionOptimizer:
1010
proton_target_spectrum: IRFDOC_PROTON_SPECTRUM
1111
electron_target_spectrum: IRFDOC_ELECTRON_SPECTRUM
1212
obs_time: 50 hour
13-
optimization_algorithm: "PointSourceSensitivityOptimizer" # Alternative: "PercentileCuts"
13+
optimization_algorithm: "PointSourceSensitivityOptimizer" # Alternatives: "PointSourceSensitivityGhOptimizer", "PercentileCuts"
1414

1515
DL2EventPreprocessor:
1616
energy_reconstructor: "RandomForestRegressor"
@@ -19,7 +19,6 @@ DL2EventPreprocessor:
1919

2020
DL2EventQualityQuery:
2121
quality_criteria:
22-
- ["multiplicity 4", "np.count_nonzero(HillasReconstructor_telescopes,axis=1) >= 4"]
2322
- ["valid classifier", "RandomForestClassifier_is_valid"]
2423
- ["valid geom reco", "HillasReconstructor_is_valid"]
2524
- ["valid energy reco", "RandomForestRegressor_is_valid"]
@@ -29,6 +28,21 @@ DefaultRecoEnergyBins:
2928
reco_energy_max: 150 TeV
3029
reco_energy_n_bins_per_decade: 5
3130

31+
PointSourceSensitivityOptimizer:
32+
min_background_fov_offset: 0.0 deg
33+
max_background_fov_offset: 5.0 deg
34+
max_gh_cut_efficiency: 0.8
35+
gh_cut_efficiency_step: 0.1
36+
alpha: 0.2
37+
theta_min_angle: None
38+
theta_max_angle: 0.5 deg
39+
max_theta_cut_efficiency: 0.8
40+
theta_cut_efficiency_step: 0.1
41+
multiplicity_cuts: [2, 3, 4, 5, 6, 7, 8, 9, 10]
42+
43+
PointSourceSensitivityGhOptimizer:
44+
initial_gh_cut_efficency: 0.4
45+
3246
ThetaPercentileCutCalculator:
3347
theta_min_angle: None
3448
theta_max_angle: 0.5 deg
@@ -41,11 +55,3 @@ GhPercentileCutCalculator:
4155
target_percentile: 68
4256
min_counts: 10
4357
smoothing:
44-
45-
PointSourceSensitivityOptimizer:
46-
min_background_fov_offset: 0.0 deg
47-
max_background_fov_offset: 5.0 deg
48-
initial_gh_cut_efficency: 0.4
49-
max_gh_cut_efficiency: 0.8
50-
gh_cut_efficiency_step: 0.1
51-
alpha: 0.2

0 commit comments

Comments
 (0)