Skip to content

Hillas calculation for MC creates empty files

Alessio Berti requested to merge dev-aberti-fix-mc-hillas into master

This merge request closes #14 (closed). As described in the issue, hillas_preprocessing.py creates empty files (1 kB in size) when processing MC files (ON and OFF data are processed correctly instead).

The problem was found to be:

  • in ctapipe_io_magic v0.1, MC files were processed with their own class, where the default event generator was the one for mono events
  • in ctapipe_io_magic v0.2, where the same class is used to read real and MC data, the default event generator is the one for stereo events
  • in the current version of hillas_preprocessing.py, after the change of the MAGIC reader to v0.2, for the processing of real data the mono event generator is specified, while for MC the event generator is not, so the stereo event generator is used. Since data for single telescope is processed, the stereo event generator returns 0 events, therefore the resulting file is empty.

Therefore the solution is just to specify the mono event generator also for the processing of MC files, as implemented for this merge request.

Merge request reports