cta-observatory / magic-cta-pipe

Pipeline for the analysis of MAGIC and LST1 data, and more.
https://magic-cta-pipe.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
5 stars 9 forks source link

New exit code needed in lst1_magic_event_coincidence.py #271

Open joannaWojS opened 3 days ago

joannaWojS commented 3 days ago

In the script https://github.com/cta-observatory/magic-cta-pipe/blob/master/magicctapipe/scripts/lst1_magic/lst1_magic_event_coincidence.py , a new exit code is needed in the following section (line 526-528):

if event_data.empty:
logger.info("\nNo coincident events are found. Exiting...")
sys.exit()

When coincidences are not found, a file is not created. As a result, the script job_accounting.py, used during semi-automatic analysis, indicates that the files exist (because the list_failed file in logs is also not created), but the corresponding folder is empty. We encountered a similar issue at the stereo level some time ago. For data from the second half of 2021, job_accounting reported that 1424 files exist, but the folders are empty.

Elisa-Visentin commented 3 days ago

We could apply the same solution used for stereo reco. I have to check the already used exit codes...

aleberti commented 3 days ago

In the solution I implemented, you can add a new exit code quite easily, or reuse an already existing one, if it applies.

Elisa-Visentin commented 3 days ago

No worries! I will do that asap (it is in my 'extremely urgent' todo list...)