MAGIC+LST scripts#
The scripts in the magicctapipe/scripts directory can be used to perform a MAGIC+LST analysis or a MAGIC-only analysis, as explained in the following.
MAGIC-only analysis#
MAGIC-only analysis starts from MAGIC-calibrated data (_Y_ files). The analysis flow is as follows:
magic_calib_to_dl1.pyon real data, to convert them into DL1 format. If you use MC data produced with MMCS, you need to run this script over MC data as well. If you use SimTelArray MCs, runlst1_magic_mc_dl0_to_dl1.pyover them instead.optionally, but recommended,
merge_hdf_files.pyto merge subruns and/or runs togetherlst1_magic_stereo_reco.pyto add stereo parameters to the DL1 data (use--magic-onlyargument if the MC DL1 data contains LST-1 events)lst1_magic_train_rfs.pyto train the RFs (energy, direction, classification) on train gamma MCs and protonslst1_magic_dl1_stereo_to_dl2.pyto apply the RFs to stereo DL1 data (real and test MCs) and produce DL2 datalst1_magic_create_irf.pyto create the IRF (usemagic_stereoasirf_typein the configuration file)lst1_magic_dl2_to_dl3.pyto create DL3 files, andcreate_dl3_index_files.pyto create DL3 HDU and index files
MAGIC-LST analysis#
MAGIC+LST analysis starts from MAGIC calibrated data (_Y_ files), LST DL1 data and SimTelArray DL0 data. The analysis flow is as following:
magic_calib_to_dl1.pyon real MAGIC data, to convert them into DL1 formatlst1_magic_mc_dl0_to_dl1.pyover SimTelArray MCs to convert them into DL1 formatoptionally, but recommended,
merge_hdf_files.pyon MAGIC data to merge subruns and/or runs togetherlst1_magic_event_coincidence.pyto find coincident events between MAGIC and LST-1, starting from DL1 datalst1_magic_stereo_reco.pyto add stereo parameters to the DL1 datalst1_magic_train_rfs.pyto train the RFs (energy, direction, classification) on train gamma MCs and protonslst1_magic_dl1_stereo_to_dl2.pyto apply the RFs to stereo DL1 data (real and test MCs) and produce DL2 datalst1_magic_create_irf.pyto create the IRFlst1_magic_dl2_to_dl3.pyto create DL3 files, andcreate_dl3_index_files.pyto create DL3 HDU and index files
High-level analysis#
The folder notebooks contains Jupyter notebooks to perform checks on the IRF, to produce theta2 plots and SEDs. Note that the notebooks run with gammapy v0.20 or higher, therefore another conda environment is needed to run them, since the MAGIC+LST-1 pipeline at the moment depends on gammapy v0.19.