Data processing activities at the MAGIC site

D. Fidalgo, Miguel Nievas-Rosillo, A. Babić, J. L. Contreras, M. Doro, N. Godinović, Dario Hrupec, A. Lorca, A. Moralejo, K. Satalecka, Martin WillProceedings of The 34th International Cosmic Ray Conference — PoS(ICRC2015) 2016

Introduction

Imaging Atmospheric Cherenkov Telescopes (IACTs), such as the MAGIC (Major Atmospheric Gamma Imaging Cherenkov) system located in La Palma, are designed to detect very-high-energy gamma rays. These telescopes capture the faint, nanosecond-scale flashes of Cherenkov light produced by particle showers in the atmosphere. Operating at high trigger rates, the MAGIC-I and MAGIC-II telescopes generate a massive data stream—approximately 100 GB per telescope per hour.

Managing this "firehose" of data presents two primary challenges. First, there is the need for Scientific Latency reduction: researchers require near-instantaneous feedback to identify flaring sources (e.g., active galactic nuclei) and issue alerts to the broader multi-messenger astronomy community. Second, Operational Integrity must be maintained; with over 1,000 sensitive pixels per camera, the system must continuously monitor hardware health to ensure that technical failures do not compromise expensive observation time.

System Architecture and Data Flow

To address these challenges, the MAGIC site employs a robust, three-tiered processing pipeline integrated with a high-performance computing (HPC) cluster. The infrastructure utilizes specialized file systems, including XFS for immediate storage and GFS2 for shared on-site storage.

A fundamental design principle of the system is the logical and physical decoupling of data acquisition from data analysis. This ensures that the intensive computational load required for reconstruction and calibration does not interfere with the telescopes' ability to record incoming data.

The MAGIC on-site data flow architecture, illustrating the transition from immediate storage to shared storage and the various processing stages.

The data flow, as shown in the architecture diagram, moves from the Data Acquisition systems (DAQs) to immediate storage, followed by a copy and compression phase. The central MySQL database acts as a coordinator, tracking the status of files and processing tasks across the different storage tiers.

Automated Processing Pipelines

The software logic is partitioned into three distinct pipelines tailored to different timescales:

  • MOLA (MAGIC Online Analysis): This multi-threaded C++ application performs real-time reconstruction. By employing simplified image cleaning algorithms, MOLA provides scientific results within seconds of data recording, enabling rapid alerts for transient events.
  • OSA (On-Site Analysis): A Python-based automated chain that performs the comprehensive "heavy lifting," including calibration, image parameterization, and stereo reconstruction. OSA utilizes a sequencer to manage complex task dependencies and a PBS/Torque manager to parallelize workloads across the cluster.
  • Data Check (DC): This suite provides both real-time hardware alerts via iScream and long-term trend analysis through a web interface. It monitors 78 different telescope parameters to ensure optimal performance.

A key innovation within the OSA is the "Autocloser" concept. This script monitors the processing status in the database; once all tasks for a given night are successfully completed, it automatically "closes" the observation day, initiates data transfer to the primary data center in Barcelona, and updates a public-facing web portal. This automation has significantly reduced the manual burden on on-site personnel.

Performance and Results

The efficiency of the MAGIC data pipeline is evidenced by its data reduction capabilities and processing speed. The OSA pipeline successfully reduces raw data volumes by a factor of approximately 200, yielding manageable products for individual researchers.

The system's reliability and speed have improved steadily over time. By 2015, the pipeline was capable of completing the full analysis for 85% of observation nights within 12 hours of midnight.

Cumulative ratio of observation nights fully processed versus time after midnight, showing performance improvements from 2012 to 2015.

As illustrated in the performance plot, the system now ensures that 94% of nights are fully processed and calibrated within a 24-hour window. The remaining 6% typically involve significant hardware or atmospheric anomalies that require manual intervention, usually resolved within three days. Furthermore, the real-time MOLA pipeline achieves a sensitivity of 1.0% of the Crab Nebula flux, remarkably close to the 0.66% sensitivity of the much more computationally expensive offline analysis.

Conclusion

The modular and automated data processing scheme implemented at the MAGIC site has proven highly effective in managing the high-volume data streams of modern IACTs. By integrating real-time monitoring with automated calibration and reconstruction, the system maximizes scientific output and operational efficiency. This architecture serves as a successful prototype for the next-generation Cherenkov Telescope Array (CTA), which will face even more significant data challenges. Future efforts will focus on further refining these automated scripts to scale with the increased complexity of the CTA observatory.

Summary updated

BibTeX
@inproceedings{fidalgo2016data,
  author = {D. Fidalgo and Miguel Nievas-Rosillo and A. Babić and J. L. Contreras and M. Doro and N. Godinović and Dario Hrupec and A. Lorca and A. Moralejo and K. Satalecka and Martin Will},
  title = {{Data processing activities at the MAGIC site}},
  booktitle = {Proceedings of The 34th International Cosmic Ray Conference — PoS(ICRC2015)},
  year = {2016},
  doi = {10.22323/1.236.0742},
}
Figure