MAGIC public Data Level 3 analysis
This service provides data analysis for puclicly available Data Level 3 (DL3) MAGIC telescope data, MAGIC collaboration, arXiv:2409.18823.
The data analysis can be launched either using the MMODA fronend interface or through a Python API from e.g. a Jupyter notebook on a user laptop. The main parameter panel generic for all analysis services allows to select the source of interest, based on its name or coordinates:

The MAGIC public data sample covers a region around Crab Nebula, for a range of observational conditions during time periods 2011-2012 and 2018-2019, specified in the MAGIC collaboration paper. Choosing time intervals outside the dataset time coverage would result in "No data for this time period" error. Choosing sky direction outside the Crab nebula field (approximately two degrees around the source) would result in "Public data release is limited to pointings around Crab" error.
The instrument specific parameter panel allow to select one of the four available data product types: Image, Spectrum, Lightcurve for the sample public DL3 data as well as MAGIC spectrum simulation

Selecting one of the available data product types reveals additional parameters specific to this data product.
The DL3 sample data for Crab are available for several off-axis angles and Night Sky Background (NSB) levels. The parameter panel provides a possibility to select the off-axis angle (0.2, 0.35, 0.4, 0.7, 1.0, 1.4 degrees) and the NSB level (in the range 0-8)

MMODA performs data selection using a "cone search" of pointings within certain angular distance from the reference source direction. The cone rearch radius is fixed by the "cone search radius" parameter:

The image parameter panel allows to specify the energy range the image size and pixel size:

The image that will be produced after pressing the Submit button is a Count Map around the reference source position, stacked over all telescope pointings satisfying the cone search and time constraints.

The product display panel that appears upon the completion of data analysis shows the list of data products: the fits file with the count map and its visualisaiton as a png picture. Clicking on the View buttons next to the data product names provides a possibility to view and dowonload the data product files. The "Query parameters" button provides the metadata with the analysis parameters. The "API code" button displays the Python API code that can be copy-pasted into a python code (e.g. on the user laptop) to request the data product. The same API code can also be launched in an online Jupyter lab environment on a collaborative data science platform renkulab.io, using the "View on Renku" button. Finally, clicking on the Jupyter icon one can see the workflow used for generation of the countmap.
For the spectra, the analysis performs histogramming of events in energy, in the number of energy bins homogeneously spaces in logarithm of energy, between minimal and maximal energy. Separately, it is possible to specify the energy range in which spectral fitting with a simple powerlaw model will be performed.

The source signal is extracted using the "aperture photometry" method from a circular region for which the radius can be specified in the parameter panel. The backgorund is estimated using the "wobble" method, from a region opposite to the source count estimate region with respect to the camera center.

Two different spectral estimates of the source flux are provides. The data points shown in the data product display are obtained by simple conversion of the counts to the physical flux units done by dividing by the exposure time and effective area that is extracted from the Instrument Response Funcitons (IRF). This simple estimate of flux in energy bins does not take into account the event energy estimation errors. To the contrary, a powerlaw fit to the spectrum is done using forward folding method, properly taking into account the error of energy estimation.
For the lightcurve, the same method of source and backgorund counts extraction is used as for the spectral analysis. The counts are binned in a number of homogeneously spaced time bins between Start time and End time specified in the main parameter panel. Events in the energy range between Emin and Emax are considered. Conversion to the physical flux is done using the exposure estimate, assuming a powerlaw source spectrum with a slope that can be specified in the parameter panel.

Python notebooks for image, spectrum and lightcurves can be found at renkulab.io and in a related GitLab repository.