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 betweenlengthand 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:
atmospherecore_pos_modecorsika_bunchsizecorsika_high_E_detailcorsika_high_E_modelcorsika_iact_optionscorsika_low_E_detailcorsika_low_E_modelcorsika_versioncorsika_wlen_maxcorsika_wlen_mindetector_prog_iddetector_prog_startdiffuseenergy_range_max [TeV]energy_range_min [TeV]injection_heightmax_altmax_azmax_scatter_rangemax_viewcone_radiusmin_altmin_azmin_scatter_rangemin_viewcone_radiusnum_showersprod_site_B_declinationprod_site_B_inclinationprod_site_B_totalprod_site_altrun_idshower_prog_idshower_prog_startshower_reusesimtel_versionspectral_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)