\documentclass[11pt,twoside]{article}
\usepackage{asp2021}
\setlength{\footnotesep}{0.3cm}

\begin{document}
\resetcounters

\markboth{Ates et al.}{CTAO Science Platform in the Big-Data Era}

\title{Accessing and Visualizing Cherenkov Data via an Open Science Web Platform}

\author{O.~Ates$^1$, M.~Servillat$^1$, C.~Boisson$^1$, P.~Cristofari$^1$, B.~Lamir\'{e}$^2$, R.~Savalle$^2$}
\affil{$^1$~LUX, Observatoire de Paris, Université PSL, Sorbonne Université, CNRS, 92190 Meudon, France; \email{onur.ates@obspm.fr}}
\affil{$^2$~DIO, Observatoire de Paris, 92190 Meudon, France}

%\paperauthor{Sample~Author1}{Author1Email@email.edu}{ORCID_Or_Blank}{Author1 Institution}{Author1 Department}{City}{State/Province}{Postal Code}{Country}
\paperauthor{O.~Ates}{onur.ates@obspm.fr}{0000-0001-7885-9059}{Observatoire de Paris, Université PSL, Sorbonne Université, CNRS}{LUX}{Meudon}{}{92190}{France}
\paperauthor{M.~Servillat}{mathieu.servillat@obspm.fr}{0000-0001-5443-4128}{Observatoire de Paris, Université PSL, Sorbonne Université, CNRS}{LUX}{Meudon}{}{92190}{France}
\paperauthor{C.~Boisson}{catherine.boisson@obspm.fr}{0000-0001-5893-1797}{Observatoire de Paris, Université PSL, Sorbonne Université, CNRS}{LUX}{Meudon}{}{92190}{France}
\paperauthor{P.~Cristofari}{pierre.cristofari@obspm.fr}{0000-0002-5856-7662}{Observatoire de Paris, Université PSL, Sorbonne Université, CNRS}{LUX}{Meudon}{}{92190}{France}
\paperauthor{B.~Lamir\'{e}}{brice.lamire@obspm.fr}{}{Observatoire de Paris}{DIO}{Meudon}{}{92190}{France}
\paperauthor{R.~Savalle}{renaud.savalle@obspm.fr}{0000-0002-4826-246X}{Observatoire de Paris}{DIO}{Meudon}{}{92190}{France}

%\aindex{Ates,~O.}
%\aindex{Ates,~O.}
%\aindex{Servillat,~M.}
%\aindex{Boisson,~C.}
%\aindex{Cristofari,~P.}
%\aindex{Lamir\'{e},~B.}
%\aindex{Savalle,~R.}


\begin{abstract}
We are developing an open-source web platform that enables data search, visualization and preview jobs of Cherenkov Astronomy data products. This platform manages all the necessary metadata to support search criteria adapted to the specific nature of Cherenkov data. Built on the Virtual Observatory framework, the platform implements the IVOA ObsCore standard to describe the spatial, temporal, and spectral characteristics of observations. Additionally, we are contributing to a High-Energy extension of ObsCore, enhancing its capacity to describe high-energy Cherenkov data.
% ### this is detailed later in the text:
%The platform couples a FastAPI microservice layer to a React front-end, with authentication based on the OpenID Connect standard. The metadata is exposed via an IVOA TAP server receiving IVOA ADQL queries. The matched products are returned in a sortable table, plotted on an Aladin Lite sky map, and through interactive Plotly charts of temporal and energy coverage. Signed-in users benefit from a reproducible search workflow: all ADQL requests are stored in a PostgreSQL database and can be replayed to regenerate identical results. Selected records can be collected into persistent baskets --- named lists preserved across sessions for reuse or running preview jobs. Open-source licence and strict adherence to IVOA standards ensure alignment of the platform with FAIR and open-science principles.
\end{abstract}


%\section{Background and Motivation}
\section{Cherenkov Data and IVOA Standards}

Arrays of ground based imaging Cherenkov telescopes (IACT), as H.E.S.S., MAGIC and VERITAS, detect ultra-short (nanosecond) flashes of blue light produced when high-energy gamma-rays hit Earth's atmosphere, triggering particle cascades. The upcoming Cherenkov Telescope Array Observatory (CTAO) will generate hundreds of petabytes of raw data annually, requiring extensive atmospheric monitoring and rich metadata to reconstruct science-ready data products such as event lists, images, spectra, and light curves. 
These software telescopes depend on complex pipelines and statistical models, not just the instrument properties and acquisition settings. The full processing configuration and detailed provenance is thus critical information for the end user to enable the scientific analysis of such data.

%The architecture and interfaces are aligned with International Virtual Observatory Alliance (IVOA) standards and 

Open Science is now commonly illustrated by the FAIR principles for data management: Findability, Accessibility, Interoperability, and Reusability.
The integration of International Virtual Observatory Alliance (IVOA) standards into Cherenkov astronomy will help to create searchable public data archives that follow the FAIR principles \citep{Servillat2022}. These archives support both structured metadata and rich datasets, making it easier for users to find and access the data they need.

%We adopt the IVOA Observation Data Model Core Components (ObsCore, \citealt{2017ivoa.spec.0509L}) data model to index spatial, temporal, and spectral metadata, and use IVOA protocols for interoperable access: Table Access Protocol (TAP) with the Astronomical Data Query Language (ADQL). At present, matched products are returned with direct download links. A standards-compliant IVOA DataLink endpoint is planned to provide metadata download service when available.

We adopt the IVOA Observation Data Model Core Components (ObsCore, \citealt{2017ivoa.spec.0509L}) to index spatial, temporal, and spectral metadata, ensuring that Cherenkov data can be consistently described, stored, and shared across different observatories and data archives. This fosters interoperability between datasets from various instruments and observatories, facilitating broader collaboration within the astronomical community. 
The IVOA Table Access Protocol (TAP) is used to allow users to query large datasets remotely using the Astronomical Data Query Language (ADQL). This protocol is especially useful for Cherenkov astronomy, where datasets can be large and complex. With TAP, researchers can efficiently query datasets for specific criteria (e.g., time, energy range, sky location) and obtain relevant results.

The platform aligns also with the High-Energy (HE) ObsCore extension under development within the IVOA High Energy Interest Group (HEIG), adding fields tailored to High Energy data (see the dedicated IVOA Note\footnote{\url{https://www.ivoa.net/documents/Notes/VOHE/}}). 
By then expressing Cherenkov-specific metadata (e.g., energy bounds, zenith angle, muon efficiency, safe analysis range) in a common HE-ObsCore schema, the platform will issue the same TAP/ADQL queries across future CTAO and current IACT archives, enabling uniform discovery and precise filtering, regardless of the original archive or file naming.
%\citep{ivoa:obscore,ivoa:tap,ivoa:adql,ivoa:datalink}

We already implemented VO services to access H.E.S.S. public test data release\footnote{\url{https://hess-dr.obspm.fr/}}, though without a dedicated web interface. A survey of various data access platforms has been conducted to propose an initial design (e.g. ALMA Science Archive\footnote{\url{https://almascience.eso.org/aq/}}).

\section{Implementation of Cherenkov data access}

This contribution presents an open science platform\footnote{\url{https://padc-ctao-data-explorer.obspm.fr}}$^{,}$\footnote{\url{https://gitlab.obspm.fr/oates/ctao-data-explorer}} 
to discover and visualize IACT data, and get some insight on a selection of data products via preview jobs.

\paragraph{Web Platform Architecture}
We use FastAPI for the backend, with endpoints that forward ADQL queries to an external TAP service, object-resolve requests to SIMBAD/NED catalogues\footnote{\url{https://simbad.cds.unistra.fr/}}$^{,}$\footnote{\url{https://ned.ipac.caltech.edu/}}, and (for signed-in users) Basket, Query Store, as well as Preview Job submissions to the a job management service \citep[using the Observatoire de Paris UWS System, OPUS,][]{2022ASPC..532..451S}. %Authentication follows OpenID Connect via the CTAO IAM instance (implemented with Authlib).
%User state is kept minimal in PostgreSQL (user ID, IAM subject); an encrypted refresh token is stored server-side only. 
Redis caches ADQL results and object lookups and holds session data to reduce repeated external calls and resource usage.
The frontend is built with React. For visualization we embed Aladin Lite (interactive sky map with selectable markers) and Plotly (time coverage and energy-range plots). Styling uses Bootstrap.


\paragraph{Search and Visualization}
Snapshots are shown in Figure~\ref{fig:ui}.

In the current version, the user has the option to query with coordinates and/or observation dates via the search form. The time search area has the option to choose between time systems. 
%TT (default) or UTC. 
%Two rows capture observation start and end. 
%Each row has Gregorian calendar and time fields, followed by the Modified Julian Date (MJD) and the Mission Elapsed Time (MET). 
%The MET epoch is 2001-01-01 00:00:00 TT (as in H.E.S.S. metadata FITS files).
Filling one field automatically fills the other ones.
In order to answer use cases specific to Cherenkov astronomy, more criteria will be integrated to the search form, e.g.: data level, proposal ID, science target ID, object type, average azimuth, elevation, Moon level, live time, telescope/array configuration, pointing mode.

%On top, the cone search part offers an object-resolve functionality where users can directly search by object name via selecting one of the two external catalogues, SIMBAD and NED. While typing the source name, a drop-down suggests matching sources; selecting one returns its coordinates. Users can also enter coordinates in different coordinate systems.
%the following systems: Equatorial (deg) J2000; Equatorial (hms/dms) J2000; Galactic (l/b, deg). The default radius is 5 degrees.

\begin{figure*}[t]
  \noindent
  \begin{minipage}[t]{0.43\textwidth}
    \vspace{0pt}
    \includegraphics[width=\linewidth,height=0.36\textheight,keepaspectratio]{109_f1.png}
    \smallskip
    %{\small\parbox{\linewidth}{\centering (a) Search form}}
  \end{minipage}\hspace{0.02\textwidth}%
  \begin{minipage}[t]{0.56\textwidth}
    \vspace{0pt}
    \includegraphics[width=\linewidth,height=0.36\textheight,keepaspectratio]{109_f2.png}
    \smallskip
    %{\small\parbox{\linewidth}{\centering (b) Results page (table, sky map, timeline chart)}}
  \end{minipage}

  \caption{Data Explorer snapshots. Left: search form with cone search, object-resolve, and time filters; Right: results page with synchronized table, sky map, and timeline chart.}
  \label{fig:ui}
\end{figure*}


Search results are rendered in a sortable table with default columns on display (the remaining columns can be selected to show via Toggle Columns menu). The results are synchronized with an Aladin Lite\footnote{\url{https://aladin.cds.unistra.fr/AladinLite/}} view where each row appears as a marker with a field-of-view (FoV) circle. Results also appear on Plotly-based timeline and energy-range charts. Colors use a color-blind–safe palette. 

\paragraph{User Features}
Authentication is based on OpenID Connect and federated identity. We store minimal user information in a PostgreSQL database (a user identifier); we do not persist names or email addresses. We also support reproducible workflows: every ADQL query is stored and can be reloaded or deleted via the Query Store. Users can select items in the results table, sky map, or charts. Selected records can be added to persistent Baskets for later reuse, visualization, or Preview Jobs. Anonymous users retain session-scoped state.
Those features ensure a better traceability of actions and efficiency of the platform.

\paragraph{Preview Jobs}
Signed-in users can submit a Basket group to a job management service. An active Basket shows a Run Preview Job button that opens a form with job parameters.
%(RA, Dec, \texttt{nxpix}, \texttt{nypix}, \texttt{binsz}). 
On submission, the observation IDs in the Basket are passed to a Gammapy\footnote{\url{https://gammapy.org/}} source-analysis script running asynchronously on the job server. Users are redirected to a job-details page showing job phase (queued, executing, completed, or error) and logs. On success, the results include figures such as stacked excess maps and stacked source spectra, enabling rapid assessment of the selected data.

\paragraph{Testing and Monitoring}
We exercise the backend with \texttt{pytest} at unit, integration, and end-to-end levels. External services (TAP, SIMBAD/NED, OPUS/UWS) are stubbed where appropriate for determinism; session flows (cookie/Redis, token refresh, logout), \texttt{/users/me} profile hydration, query-history persistence, Basket operations, and Preview-Job submission paths are covered. On each push, \textit{GitLab CI} runs the test suite and triggers \texttt{SonarQube} analysis. Formatting with \texttt{Black}, linting with \texttt{Ruff}, and static typing with \texttt{mypy} are run locally using the project’s \texttt{pyproject.toml} configuration before pushing changes.

The service is deployed to \emph{staging} and \emph{production} behind \texttt{nginx} (reverse proxy) with \texttt{gunicorn} workers serving the FastAPI application. Both environments expose Prometheus-compatible metrics; \emph{Grafana} dashboards track availability, request rates, p95 latencies for VO/TAP/SIMBAD calls, OPUS job submissions/completions, cache hit/miss, and Redis usage. This setup lets us trial changes on staging while continuously observing their impact before promoting to production.

\section{Roadmap}
Upcoming work includes (i) frontend tests; (ii) additional search criteria (e.g., data product type, data level, proposal ID, average azimuth/elevation); (iii) deployment of DataLink 1.1 services; (iv) enhancements to Preview Jobs (e.g., background map in Aladin Lite or JS9 with interactive contrast/scale); (v) containerized deployment with Docker—Dockerfiles (backend/front end) are already in the repository and tested locally; next steps are CI builds of versioned images and a compose-based stack on staging before promoting to production; and (vi) integration with the CTAO portal and related services.

\section*{Acknowledgments}
We thank the CTAO community, colleagues contributing to the IVOA High Energy Interest Group and the support from the Paris Astronomical Data Center (PADC).

\medskip
\noindent CTAO: \url{https://www.ctao.org/}\\
\noindent H.E.S.S.: \url{https://www.hess-experiment.eu/}\\
\noindent MAGIC: \url{https://magic.mpp.mpg.de/}\\
\noindent VERITAS: \url{https://veritas.sao.arizona.edu/}

\bibliographystyle{asp2021}
\bibliography{109}

\end{document}
