---
title: 'TITRATE: Gamma-Ray Dark Matter Analysis'
url: https://www.emergentmind.com/topics/titrate
type: topic
---

# TITRATE: Gamma-Ray Dark Matter Analysis

TITRATE is an open-source Python package introduced for gamma-ray dark-matter searches with imaging atmospheric Cherenkov telescopes, and specifically presented in a three-dimensional analysis of the Coma Berenices dwarf spheroidal galaxy with the MAGIC telescopes. Its central contribution is the introduction of Asimov datasets and the \(CL_s\) prescription into Gammapy’s high-level analysis workflow, allowing expected test statistics and upper limits to be approximated analytically rather than through large toy-Monte-Carlo campaigns. In the reported application, TITRATE was used for spatial-plus-energy searches for annihilation into \(b\bar b\), \(W^+W^-\), \(\mu^+\mu^-\), and \(\tau^+\tau^-\) over dark-matter masses \(m_\chi\) between \(0.17\ \mathrm{TeV}\) and \(100\ \mathrm{TeV}\); no evidence of a dark-matter-induced signal was found [2509.18861].

## 1. Scientific context and intended role

Traditional dark-matter searches with imaging atmospheric Cherenkov telescopes such as MAGIC have commonly relied on toy-Monte-Carlo campaigns to build sensitivity bands and compute upper limits. In the formulation summarized for TITRATE, this entails simulating thousands of background-only and signal-plus-background realizations, performing full likelihood fits on each realization, and extracting median expected limits together with \(\pm1\sigma\) and \(\pm2\sigma\) bands from the resulting distribution of test statistics. The reported limitations are very high CPU cost, difficulty scaling to large samples of targets or to joint multi-messenger fits, and difficulty implementing the \(CL_s\) prescription consistently [2509.18861].

TITRATE is positioned as a remedy to those limitations. The package introduces Asimov datasets into Gammapy’s high-level API so that expected test statistics can be evaluated analytically through a non-central \(\chi^2\) approximation, and it enables the \(CL_s\) method directly inside Gammapy. The package is also described as providing helper routines for dark-matter spatial and spectral models, Asimov data generation, profiled log-likelihood-ratio evaluation, and upper-limit computation without large ensembles of toy Monte Carlo. This suggests that TITRATE’s principal novelty lies in inference-layer acceleration and standardization rather than in instrument-specific low-level reconstruction [2509.18861].

The motivating astrophysical application was a three-dimensional search in the Coma Berenices dwarf spheroidal galaxy using approximately \(25\) hours of MAGIC stereo observations. The analysis explicitly incorporated spatial information from the assumed dark-matter density distribution in addition to energy information, with the stated aim of enhancing sensitivity for faint annihilation signals [2509.18861].

## 2. Statistical formalism: profile likelihood, Asimov datasets, and \(CL_s\)

TITRATE is built around a standard profile-likelihood construction. For signal strength \(\mu\), the one-sided test statistic is defined as

\[
q_\mu = -2 \log \left[\frac{L(\mu,\hat\theta_\mu)}{L(\hat\mu,\hat\theta)}\right],
\]

where \(\theta\) denotes nuisance parameters. The paper notes two recurrent issues in direct use of this framework: unphysical best fits with \(\hat\mu<0\), and the need for toy Monte Carlo to construct the sampling distribution \(f(q_\mu\mid\mu)\) [2509.18861].

The Asimov approximation addresses this by constructing a dataset \(D_A\) such that the maximum-likelihood estimators coincide with their true values,

\[
\hat\mu = \mu', \qquad \hat\theta = \theta'.
\]

TITRATE then evaluates a modified one-sided statistic

\[
\tilde q_\mu(D) =
\begin{cases}
-2\log L(\mu,\hat\theta_\mu)+2\log L(0,\hat\theta_0), & \text{if } \hat\mu \ge 0,\\
0, & \text{if } \hat\mu < 0.
\end{cases}
\]

On the Asimov dataset, \(\tilde q_{\mu,A}\) is computed without toy Monte Carlo, and the distribution \(f(\tilde q_\mu\mid\mu)\) is approximated by a non-central \(\chi^2\) law with non-centrality parameter \(\lambda=\tilde q_{\mu,A}\). The corresponding one-sided \(p\)-value is written as

\[
p_\mu = \int_{\tilde q_{\mu,\mathrm{obs}}}^{\infty}\chi^2(s;\nu=1,\lambda=0)\,ds,
\]

and the \(CL_s\) prescription is

\[
CL_s(\mu)=\frac{p_\mu}{1-p_0}.
\]

The \(95\%\) upper limit \(\mu_{\mathrm{up}}\) is then the solution of \(CL_s(\mu_{\mathrm{up}})=0.05\) [2509.18861].

Within this framework, TITRATE’s purpose is not merely to compute a best-fit model, but to approximate expected sensitivities and upper limits in a way that is compatible with high-level likelihood analysis while avoiding the computational burden of repeated pseudo-experiment generation. The package description therefore sits at the intersection of asymptotic likelihood theory and practical gamma-ray data analysis.

## 3. Gammapy integration and package functionality

The package is described as integrating directly with Gammapy’s high-level dataset abstractions. In particular, the overview states that TITRATE provides an `AsimovDataset` class that wraps a Gammapy `MapDataset` or `SpectrumDataset`, and that it exposes methods such as `.compute_tilde_q(mu)` and `.compute_upper_limit(alpha=0.05, method='cls')`. It is also described as offering helper components for dark-matter spatial and spectral modeling and for profiled likelihood fitting. Because the overview explicitly notes that some code-level details are sketched to illustrate how TITRATE hooks into Gammapy, these class and method names are best read as the package’s described interface rather than as a complete formal specification [2509.18861].

The same overview describes a current release denoted v0.1.x and a rough organization into modules for Asimov-dataset handling, dark-matter models, likelihood profiling, limit calculation, and utilities. Example scripts are described for an end-to-end three-dimensional MAGIC Coma Berenices analysis and for an Asimov quickstart. The package is said to work “seamlessly” with Gammapy’s `MapDataset` and `SpectrumDataset` APIs and to support both \(CL_s\) and Feldman–Cousins limits [2509.18861].

A central practical implication is scalability. Because no toy Monte Carlo are required, the overview states that one can trivially loop over multiple targets and reuse the same instrument response functions and background recipes. Joint fits are likewise described as straightforward: for example, a MAGIC plus Fermi-LAT analysis would instantiate two Asimov datasets and a joint \(CL_s\) calculator. Memory usage is correspondingly limited to storing high-level Gammapy datasets rather than large ensembles of pseudo-data [2509.18861].

## 4. Relationship to three-dimensional background modeling

TITRATE is not itself the background-construction algorithm used in the MAGIC Coma Berenices analysis. The paper explicitly states that TITRATE does **not** build the background; instead, the user may feed a custom three-dimensional background model into Gammapy, and the paper summarizes the exclusion-rotation method as the relevant recipe for the reported analysis [2509.18861].

In that method, three-dimensional cubes \(N_{\mathrm{eff}}(\bar E,\mathrm{Az},\mathrm{Alt})\), \(T_{\mathrm{eff}}(\bar E,\mathrm{Az},\mathrm{Alt})\), and \(T_{\mathrm{tot}}(\bar E,\mathrm{Az},\mathrm{Alt})\) are constructed. For each observation, and for each sub-observation chunk used to limit field-of-view rotation, \(N_{\mathrm{eff}}\) is filled with counts excluding a circular ON region of radius \(r=0.4^\circ\), while \(T_{\mathrm{eff}}\) and \(T_{\mathrm{tot}}\) are filled with live times with and without exclusion. A principal-component analysis is then performed on the event azimuthal pattern in each energy bin to obtain an empirical rotation \(\gamma_{\mathrm{PCA}}\). Events are “de-rotated” by \(-\gamma_{\mathrm{PCA}}\) and then “re-rotated” to the theory-blob orientation \(\gamma_{\mathrm{theory}}=\mathrm{Az}-\Delta\gamma\), with \(\Delta\gamma=34.23^\circ\). All observations are stacked to maximize statistics [2509.18861].

The resulting background-rate expression is

\[
\frac{dN}{dt\,dE\,d\Omega}=
\frac{N_{\mathrm{eff}}}{T_{\mathrm{eff}}\,T_{\mathrm{tot}}\,\Delta E\,\Delta\Omega\,T_{\mathrm{obs}}}.
\]

As summarized in the paper, this data-driven three-dimensional background model preserves the MAGIC stereo-blob feature at low energy and the “donut” shape at high energy, while accounting for azimuthal acceptance. TITRATE then operates on top of such dataset-level ingredients by providing the Asimov-based statistical layer for profiling and limit setting [2509.18861].

## 5. Computational performance, validation, and reported results

The reported computational advantage of TITRATE is large. On a \(16\)-core Intel Xeon benchmark, a traditional Monte Carlo workflow with \(5{,}000\) toys and \(20\) mass points required approximately \(12{,}000\ \mathrm{s}\) on a single core, or approximately \(2\times10^6\ \mathrm{s}\) total, whereas the TITRATE Asimov approach with direct \(CL_s\) computation required approximately \(400\ \mathrm{s}\) wall-time on \(8\) cores. The corresponding headline figure is a speed-up of more than \(100\times\) per channel scan [2509.18861].

The trade-off between speed and accuracy was assessed empirically. The non-central \(\chi^2\) approximation is reported to reproduce the median expected limit and the \(\pm1\sigma\) band to better than \(5\%\) in \(\langle\sigma v\rangle\), and end-to-end tests against small toy-Monte-Carlo ensembles of \(1000\) toys showed agreement within statistical fluctuations. In the MAGIC Coma Berenices application, a further validation statement is that the observed limits lay within the \(\pm1\sigma\) expected \(CL_s\) band, consistent with no signal, and that small Monte Carlo cross-checks confirmed that the Asimov approximation leads to median limits within \(10\%\) of the toy-Monte-Carlo median [2509.18861].

Astrophysically, the analysis used \(25\) hours of high-quality MAGIC stereo observations of the Coma Berenices dwarf spheroidal galaxy and considered annihilation into \(b\bar b\), \(W^+W^-\), \(\mu^+\mu^-\), and \(\tau^+\tau^-\) for masses from \(0.17\ \mathrm{TeV}\) to \(100\ \mathrm{TeV}\). No evidence for a dark-matter-induced gamma-ray signal was found. The paper reports the first upper limits on the thermally averaged cross-section in energy and spatial dimensions using TITRATE, with a sensitivity improvement over previous MAGIC results relative to the assumed dark-matter density in the target halo. For \(m\approx1\ \mathrm{TeV}\), the \(95\%\ CL_s\) limit is approximately \(4\times10^{-24}\ \mathrm{cm}^3\ \mathrm{s}^{-1}\) in the \(b\bar b\) channel. Up to \(m\sim4\ \mathrm{TeV}\) in non-leptonic channels and \(\sim7\ \mathrm{TeV}\) in leptonic channels, the three-dimensional plus Asimov method outperformed one-dimensional fitting by approximately \(20\%\)–\(40\%\). Compared with the previous MAGIC Coma Berenices result based on \(50\) hours and one-dimensional analysis, the new three-dimensional analysis with \(25\) hours was reported to be more sensitive by up to a factor of approximately \(2\) in non-lepton channels for \(m<10\ \mathrm{TeV}\) [2509.18861].

## 6. Scope, limitations, and terminological distinctions

TITRATE should be understood as a specialized inference package for gamma-ray dark-matter analyses rather than as a general-purpose titration or dose-adjustment framework. A common misunderstanding would be to treat it as the entirety of the MAGIC three-dimensional pipeline; in the paper, background construction is explicitly externalized through the exclusion-rotation method, while TITRATE supplies Asimov-based test-statistic approximation, \(CL_s\) evaluation, and upper-limit machinery. Another potential misunderstanding would be to read the Asimov method as eliminating validation requirements; the paper instead reports targeted Monte Carlo cross-checks and quantitative agreement studies alongside the asymptotic approximation [2509.18861].

The package’s broader significance is its scalability. The paper states that reducing the need for Monte Carlo simulations paves the way for computationally efficient and scalable large-scale analyses across multiple targets and cosmic messengers. In that sense, TITRATE is presented as infrastructure for high-level likelihood analysis in dark-matter searches, particularly when energy-plus-spatial fits and repeated scans over channels and masses would otherwise make toy-Monte-Carlo campaigns prohibitive [2509.18861].

The name should also be distinguished from unrelated uses of “titrate” in other research areas. In the provided arXiv literature, the term appears in basal-insulin titration from short-term closed-loop data in type 2 diabetes [2211.14149], in the Joint TITE-CRM for phase I/II dose-finding with late-onset safety and efficacy outcomes [2203.15803], and in PACTS, a polyelectrolyte-assisted charge titration spectrometry method for nanoparticles [1604.08033]. Those works concern titration in clinical endocrinology, Bayesian dose-escalation design, and colloidal electrostatics, respectively, and are conceptually separate from the TITRATE package used in gamma-ray dark-matter searches.

Source: https://www.emergentmind.com/topics/titrate