Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance using Pyirf #83

Merged
merged 18 commits into from
Dec 21, 2020
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
520 changes: 0 additions & 520 deletions benchmarks/DL3/benchmarks_DL3_IRFs_and_sensitivity.ipynb

This file was deleted.

841 changes: 841 additions & 0 deletions benchmarks/DL3/benchmarks_DL3_IRFs_and_sensitivity_pyirf.ipynb

Large diffs are not rendered by default.

388 changes: 0 additions & 388 deletions benchmarks/DL3/benchmarks_DL3_PSF.ipynb

This file was deleted.

5 changes: 4 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ channels:
- conda-forge
dependencies:
- ctapipe=0.9.1
- gammapy
- ctapipe-extra
- gammapy=0.8
- astropy>=4.0.1
- ipython
- nbsphinx
Expand All @@ -19,3 +19,6 @@ dependencies:
- sphinx-issues
- uproot
- vitables
- pip:
- pyirf
- uproot
50 changes: 5 additions & 45 deletions protopipe/aux/example_config_files/performance.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

general:
# Directory with input data file
# [...] = your analysis local full path OUTSIDE the Vagrant box
Expand All @@ -7,47 +6,20 @@ general:
template_input_file: 'DL2_{}_{}_merged.h5' # filled with mode and particle type
# Directory for output files
outdir: '[...]/data/DL3'
# Output table name
output_table_name: 'table_best_cutoff'

analysis:

# Theta square cut optimisation (opti, fixed, r68)
thsq_opt:
type: 'opti'
value: 0.2 # In degree, necessary for type fixed

cut_on_multiplicity: 4

# Normalisation between ON and OFF regions
alpha: 0.2

# Radius to use for calculating bg rate
max_bg_radius: 1.

# Minimimal significance
min_sigma: 5

# Minimal number of gamma-ray-like
min_excess: 10

# Minimal fraction of background events for excess comparison
bkg_syst: 0.05

# Reco energy binning
ereco_binning: # TeV
emin: 0.012589254
emax: 199.52623
nbin: 21

# Reco energy binning
etrue_binning: # TeV
emin: 0.019952623
emax: 199.52623
nbin: 42

particle_information:
gamma:
num_use: 10
num_showers: 10**5
num_showers: 100000
e_min: 0.003
e_max: 330
gen_radius: 1400
Expand All @@ -56,7 +28,7 @@ particle_information:

proton:
num_use: 20
num_showers: 2 * 10**5
num_showers: 200000
e_min: 0.004
e_max: 600
gen_radius: 1900
Expand All @@ -65,21 +37,9 @@ particle_information:

electron:
num_use: 20
num_showers: 10**5
num_showers: 100000
e_min: 0.003
e_max: 330
gen_radius: 1900
gen_gamma: -2
diff_cone: 10

column_definition:
# Column name for true energy
mc_energy: 'mc_energy'
# Column name for reconstructed energy
reco_energy: 'reco_energy'
# Column name for classification output
classification_output:
name: 'gammaness'
range: [0, 1]
angular_distance_to_the_src: 'xi'

5 changes: 0 additions & 5 deletions protopipe/perf/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +0,0 @@
"""
Classes to handle cut optimisation and IRF writting
"""
from .cut_optimisation import *
from .irf_maker import *