Pre-requisities: ctapipe (development version)
source activate cta-dev
pip install pyfact
git clone https://github.com/seinecke/aict-tools.git
cd aict-tools
pip install -e .
Download Makefile
, configs/chec_mono.yml
and matplotlibrc
from https://github.com/cta-chec/CHECOnskySB/tree/master/CHECOnskySB/scripts/sabrina/d190228_analysis_chec and store them in the same folder (preferably not in aict-tools
).
It is assumed that you have files that have been processed with extract_dl1.py
, extract_hillas.py
, merge_hillas.py
and convert_hillas.py
.
If not, check here: https://github.com/cta-chec/CHECOnskySB/tree/master/CHECOnskySB/scripts
Adapt build_dir
and data_dir
paths in the Makefile
.
Go to the folder where the Makefile
is stored and type:
source activate cta-dev
make
Check your build_dir
for created plots, files and models ;-)
If you are interested in the performance of your analysis, check here: https://github.com/cta-chec/CHECOnskySB/tree/master/CHECOnskySB/scripts/sabrina/d190301_performance
The input hdf5 files include 3 tables: telescope_events
, array_events
and runs
. The columns are described below.
telescope_events
:
(The following features need to be in the file in the specified units)
array_event_id
: The id of the eventrun_id
: The id of the MC simulation runaltitude_raw
[rad]: Telescope pointing altitudeazimuth_raw
[rad]: Telescope pointing azimuthtrue_source_alt
[rad]: True source position (altitude)true_source_az
[rad]: True source position (azimuth)x
[m]: The x-coordinate of the Center of Gravity (mean of pixel coordinates weighted with pixel charge)y
[m]: The y-coordinate of the Center of Gravity (mean of pixel coordinates weighted with pixel charge)intensity
: The total charge
(The following features are not mandatory)
psi
[rad]: Angle betweenlength
and x-axisr
[m]: Center of Gravity in polar coordinatesphi
[rad]: Center of Gravity in polar coordinateslength
[m]: Eigen value of PCAwidth
[m]: Eigen value of PCAskewness
: The 3rd moment along the major axiskurtosis
: The 4th moment along the major axisnislands
: Number of islands that survived image cleaningn_survived_pixels
: Number of pixels that survived image cleaningleakage1_intensity
: Ratio between charge in the outer ring of the camera and total chargeleakage1_pixel
: Ratio between number of pixels in the outer ring of the camera and number of survived pixelsleakage2_intensity
: Ratio between charge in the 2 outer rings of the camera and total chargeleakage2_pixel
: Ratio between number of pixels in the 2 outer rings of the camera and number of survived pixelsconcentration_1
: Ratio between highest charge and total chargeconcentration_2
: Ratio between 2 highest charges and total chargeconcentration_3
: Ratio between 3 highest charges and total chargetdeviation
[?]:tduration
[ns]: Duration between minimum and maximum extracted time of survived pixelstgradient
[?}:
array_events
:
array_event_id
: The id of the eventmc_core_x
[m]: True core position (x-coordinate)mc_core_y
[m]: True core position (y-coordinate)mc_energy
[TeV]: True energymc_h_first_int
[m]: True height of first interactionmc_x_max [m]
: Height of the shower maximumshower_primary_id
: Id of the primary incident (0: gamma)t_cpu
runs
:
atmosphere
core_pos_mode
corsika_bunchsize
corsika_high_E_detail
corsika_high_E_model
corsika_iact_options
corsika_low_E_detail
corsika_low_E_model
corsika_version
corsika_wlen_max
corsika_wlen_min
detector_prog_id
detector_prog_start
diffuse
energy_range_max [TeV]
energy_range_min [TeV]
injection_height
max_alt
max_az
max_scatter_range
max_viewcone_radius
min_alt
min_az
min_scatter_range
min_viewcone_radius
num_showers
prod_site_B_declination
prod_site_B_inclination
prod_site_B_total
prod_site_alt
run_id
shower_prog_id
shower_prog_start
shower_reuse
simtel_version
spectral_index
The output hdf5 files include 3 tables: telescope_events
, array_events
and runs
. The columns are the same as of the input PLUS the following:
telescope_events
:
disp
[m]: Distance between CoG and predicted source positionsource_x
[m]: Predicted source position in camera coordinates (x-coordinate)source_y
[m]: Predicted source position in camera coordinates (y-coordinate)source_alt
[rad]: Predicted source position (altitude)source_az
[rad]: Predicted source position (azimuth)energy [TeV]
: Predicted energygamma_score
: Predicted score of being a gamma-ray event
array_events
:
energy_mean
[TeV]: Mean (over multiple telescopes) of the predicted energyenergy_std
: Standard deviation (over multiple telescopes) of the predicted energygamma_score_mean
: Mean (over multiple telescopes) of the predicted gamma scoresource_alt_mean
[rad]: Mean (over multiple telescopes) of the predicted source positionsource_az_mean
[rad]: Mean (over multiple telescopes) of the predicted source position
In addition, hdf5 files containing data for the validation of the models are stored. For each reconstruction task, one files is created.
The output hdf5 files include ?? tables: data
. The columns are described below.
aict_predictions_gh.hdf5
:
cv_fold
: Index of the cross validationlabel
: True label (0: background, 1: signal)label_prediction
: Predicted label, assuming a threshold of 0.5 (0: background, 1: signal)probabilities
: Score of being signal (related to probability)
aict_predictions_energy.hdf5
:
cv_fold
: Index of the cross validationlabel
[TeV]: True energylabel_prediction
[TeV]: Predicted energy
aict_predictions_direction.hdf5
:
cv_fold
: Index of the cross validationdisp
[mm]: True dispdisp_prediction
[mm]: Predicted dispmc_energy
[TeV]: True energysign
: True signsign_prediction
: Predicted sign (assuming threshold 0.5)sign_probabilities
: Score of being plus sign (related to probability)