{ "cells": [ { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Working with the public 10-year IceCube point-source data\n", "==" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "This tutorial shows how to use the IceCube public 10-year point-source data with SkyLLH." ] }, { "attachments": {}, "cell_type": "raw", "metadata": { "raw_mimetype": "text/restructuredtext" }, "source": [ "**Disclaimer**\n", "\n", " The released 10-year IceCube point-source data can reproduce the published results only within\n", " a certain amount of uncertainty due to the limited instrument response function binning \n", " provided in the data release. The IceCube collaboration is able to reproduce the published \n", " results using detailed direct simulation data, as done for the publication." ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "from matplotlib import pyplot as plt\n", "import scipy.stats" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Creating a configuration\n", "---" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "First we have to create a configuration instance." ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "from skyllh.core.config import Config\n", "cfg = Config()" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Getting the datasets\n", "---" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Now we import the dataset definition of the public 10-year point-source data set:" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "from skyllh.datasets.i3.PublicData_10y_ps import create_dataset_collection" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "The collection of datasets can be created using the ``create_dataset_collection`` function. This function requires the base path to the data repository. It's the path where the public point-source data is stored. The public point-source data can be downloaded from the [IceCube website](http://icecube.wisc.edu/data-releases/20210126_PS-IC40-IC86_VII.zip)." ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "dsc = create_dataset_collection(\n", " cfg=cfg, \n", " base_path='/home/mwolf/projects/publicdata_ps/')" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "The ``dataset_names`` property provides a list of all the data sets defined in the data set collection of the public point-source data." ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "['IC40',\n", " 'IC59',\n", " 'IC79',\n", " 'IC86_I',\n", " 'IC86_II',\n", " 'IC86_II-VII',\n", " 'IC86_III',\n", " 'IC86_IV',\n", " 'IC86_V',\n", " 'IC86_VI',\n", " 'IC86_VII']" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "dsc.dataset_names" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "The individual data sets ``IC86_II``, ``IC86_III``, ``IC86_IV``, ``IC86_V``, ``IC86_VI``, and ``IC86_VII`` are also available as a single combined data set ``IC86_II-VII``, because these data sets share the same detector simulation and event selection. Hence, we can get a list of data sets via the access operator ``[dataset1, dataset2, ...]`` of the ``dsc`` instance:" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [], "source": [ "datasets = dsc['IC40', 'IC59', 'IC79', 'IC86_I', 'IC86_II-VII']" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Getting the analysis\n", "---" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "The analysis used for the published PRL results is referred in SkyLLH as \"*traditional point-source analysis*\" and is pre-defined:" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [], "source": [ "from skyllh.analyses.i3.publicdata_ps.time_integrated_ps import create_analysis" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Help on function create_analysis in module skyllh.analyses.i3.publicdata_ps.time_integrated_ps:\n", "\n", "create_analysis(cfg, datasets, source, refplflux_Phi0=1, refplflux_E0=1000.0, refplflux_gamma=2.0, ns_seed=100.0, ns_min=0.0, ns_max=1000.0, gamma_seed=3.0, gamma_min=1.0, gamma_max=5.0, kde_smoothing=False, minimizer_impl='LBFGS', cut_sindec=None, spl_smooth=None, cap_ratio=False, compress_data=False, keep_data_fields=None, evt_sel_delta_angle_deg=10, construct_sig_generator=True, tl=None, ppbar=None, logger_name=None)\n", " Creates the Analysis instance for this particular analysis.\n", " \n", " Parameters\n", " ----------\n", " cfg : instance of Config\n", " The instance of Config holding the local configuration.\n", " datasets : list of Dataset instances\n", " The list of Dataset instances, which should be used in the\n", " analysis.\n", " source : PointLikeSource instance\n", " The PointLikeSource instance defining the point source position.\n", " refplflux_Phi0 : float\n", " The flux normalization to use for the reference power law flux model.\n", " refplflux_E0 : float\n", " The reference energy to use for the reference power law flux model.\n", " refplflux_gamma : float\n", " The spectral index to use for the reference power law flux model.\n", " ns_seed : float\n", " Value to seed the minimizer with for the ns fit.\n", " ns_min : float\n", " Lower bound for ns fit.\n", " ns_max : float\n", " Upper bound for ns fit.\n", " gamma_seed : float | None\n", " Value to seed the minimizer with for the gamma fit. If set to None,\n", " the refplflux_gamma value will be set as gamma_seed.\n", " gamma_min : float\n", " Lower bound for gamma fit.\n", " gamma_max : float\n", " Upper bound for gamma fit.\n", " kde_smoothing : bool\n", " Apply a KDE-based smoothing to the data-driven background pdf.\n", " Default: False.\n", " minimizer_impl : str\n", " Minimizer implementation to be used. Supported options are ``\"LBFGS\"``\n", " (L-BFG-S minimizer used from the :mod:`scipy.optimize` module), or\n", " ``\"minuit\"`` (Minuit minimizer used by the :mod:`iminuit` module).\n", " Default: \"LBFGS\".\n", " cut_sindec : list of float | None\n", " sin(dec) values at which the energy cut in the southern sky should\n", " start. If None, np.sin(np.radians([-2, 0, -3, 0, 0])) is used.\n", " spl_smooth : list of float\n", " Smoothing parameters for the 1D spline for the energy cut. If None,\n", " [0., 0.005, 0.05, 0.2, 0.3] is used.\n", " cap_ratio : bool\n", " If set to True, the energy PDF ratio will be capped to a finite value\n", " where no background energy PDF information is available. This will\n", " ensure that an energy PDF ratio is available for high energies where\n", " no background is available from the experimental data.\n", " If kde_smoothing is set to True, cap_ratio should be set to False!\n", " Default is False.\n", " compress_data : bool\n", " Flag if the data should get converted from float64 into float32.\n", " keep_data_fields : list of str | None\n", " List of additional data field names that should get kept when loading\n", " the data.\n", " evt_sel_delta_angle_deg : float\n", " The delta angle in degrees for the event selection optimization methods.\n", " construct_sig_generator : bool\n", " Flag if the signal generator should be constructed (``True``) or not\n", " (``False``).\n", " tl : TimeLord instance | None\n", " The TimeLord instance to use to time the creation of the analysis.\n", " ppbar : ProgressBar instance | None\n", " The instance of ProgressBar for the optional parent progress bar.\n", " logger_name : str | None\n", " The name of the logger to be used. If set to ``None``, ``__name__`` will\n", " be used.\n", " \n", " Returns\n", " -------\n", " ana : instance of SingleSourceMultiDatasetLLHRatioAnalysis\n", " The Analysis instance for this analysis.\n", "\n" ] } ], "source": [ "help(create_analysis)" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "As source we use TXS 0506+056." ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [], "source": [ "from skyllh.core.source_model import PointLikeSource" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [], "source": [ "source = PointLikeSource(ra=np.deg2rad(77.35), dec=np.deg2rad(5.7))" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ " 0%| | 0/5 [00:00" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "from matplotlib.colors import LogNorm\n", "plt.figure(figsize=(8,6))\n", "plt.pcolormesh(gamma_edges, ns_edges, delta_ts, cmap='nipy_spectral')\n", "cbar = plt.colorbar()\n", "cbar.set_label(r'$\\Delta$TS')\n", "plt.contour(gamma_vals, ns_vals, delta_ts, [chi2_68_quantile], colors='#FFFFFF')\n", "plt.contour(gamma_vals, ns_vals, delta_ts, [chi2_90_quantile], colors='#AAAAAA')\n", "plt.contour(gamma_vals, ns_vals, delta_ts, [chi2_95_quantile], colors='#444444')\n", "plt.plot(gamma_best, ns_best, marker='x', color='white', ms=10)\n", "plt.xlabel(r'$\\gamma$')\n", "plt.ylabel(r'$n_{\\mathrm{s}}$')\n", "plt.ylim(ns_min, ns_max)\n", "plt.xlim(gamma_min, gamma_max)" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Calculating the significance (local p-value)\n", "---" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "The significance of the source, i.e. the local p-value, can be calculated by generating the test-statistic distribution of background-only data trials, i.e. for zero injected signal events. SkyLLH provides the helper function ``create_trial_data_file`` to do that:" ] }, { "cell_type": "code", "execution_count": 27, "metadata": {}, "outputs": [], "source": [ "from skyllh.core.utils.analysis import create_trial_data_file" ] }, { "cell_type": "code", "execution_count": 28, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Help on function create_trial_data_file in module skyllh.core.utils.analysis:\n", "\n", "create_trial_data_file(ana, rss, n_trials, mean_n_sig=0, mean_n_sig_null=0, mean_n_bkg_list=None, bkg_kwargs=None, sig_kwargs=None, pathfilename=None, ncpu=None, ppbar=None, tl=None)\n", " Creates and fills a trial data file with `n_trials` generated trials for\n", " each mean number of injected signal events from `ns_min` up to `ns_max` for\n", " a given analysis.\n", " \n", " Parameters\n", " ----------\n", " ana : instance of Analysis\n", " The Analysis instance to use for the trial generation.\n", " rss : instance of RandomStateService\n", " The RandomStateService instance to use for generating random\n", " numbers.\n", " n_trials : int\n", " The number of trials to perform for each hypothesis test.\n", " mean_n_sig : ndarray of float | float | 2- or 3-element sequence of float\n", " The array of mean number of injected signal events (MNOISEs) for which\n", " to generate trials. If this argument is not a ndarray, an array of\n", " MNOISEs is generated based on this argument.\n", " If a single float is given, only this given MNOISEs are injected.\n", " If a 2-element sequence of floats is given, it specifies the range of\n", " MNOISEs with a step size of one.\n", " If a 3-element sequence of floats is given, it specifies the range plus\n", " the step size of the MNOISEs.\n", " mean_n_sig_null : ndarray of float | float | 2- or 3-element sequence of float\n", " The array of the fixed mean number of signal events (FMNOSEs) for the\n", " null-hypothesis for which to generate trials. If this argument is not a\n", " ndarray, an array of FMNOSEs is generated based on this argument.\n", " If a single float is given, only this given FMNOSEs are used.\n", " If a 2-element sequence of floats is given, it specifies the range of\n", " FMNOSEs with a step size of one.\n", " If a 3-element sequence of floats is given, it specifies the range plus\n", " the step size of the FMNOSEs.\n", " mean_n_bkg_list : list of float | None\n", " The mean number of background events that should be generated for\n", " each dataset. This parameter is passed to the ``do_trials`` method of\n", " the ``Analysis`` class. If set to None (the default), the background\n", " generation method needs to obtain this number itself.\n", " bkg_kwargs : dict | None\n", " Additional keyword arguments for the `generate_events` method of the\n", " background generation method class. An usual keyword argument is\n", " `poisson`.\n", " sig_kwargs : dict | None\n", " Additional keyword arguments for the `generate_signal_events` method\n", " of the `SignalGenerator` class. An usual keyword argument is\n", " `poisson`.\n", " pathfilename : string | None\n", " Trial data file path including the filename.\n", " If set to None generated trials won't be saved.\n", " ncpu : int | None\n", " The number of CPUs to use.\n", " ppbar : instance of ProgressBar | None\n", " The optional instance of the parent progress bar.\n", " tl: instance of TimeLord | None\n", " The instance of TimeLord that should be used to measure individual\n", " tasks.\n", " \n", " Returns\n", " -------\n", " seed : int\n", " The seed used to generate the trials.\n", " mean_n_sig : 1d ndarray\n", " The array holding the mean number of signal events used to generate the\n", " trials.\n", " mean_n_sig_null : 1d ndarray\n", " The array holding the fixed mean number of signal events for the\n", " null-hypothesis used to generate the trials.\n", " trial_data : structured numpy ndarray\n", " The generated trial data.\n", "\n" ] } ], "source": [ "help(create_trial_data_file)" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "At first we will generate 10k trials and look at the test-statistic distribution. We will time the trial generation using the ``TimeLord`` class." ] }, { "cell_type": "code", "execution_count": 29, "metadata": {}, "outputs": [], "source": [ "from skyllh.core.timing import TimeLord\n", "tl = TimeLord()" ] }, { "cell_type": "code", "execution_count": 31, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "100%|██████████| 10001/10001 [08:52<00:00, 18.78it/s]\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "TimeLord: Executed tasks:\n", "[Generating background events for data set 0.] 0.002 sec/iter (10000)\n", "[Generating background events for data set 1.] 0.003 sec/iter (10000)\n", "[Generating background events for data set 2.] 0.003 sec/iter (10000)\n", "[Generating background events for data set 3.] 0.006 sec/iter (10000)\n", "[Generating background events for data set 4.] 0.019 sec/iter (10000)\n", "[Generating pseudo data. ] 0.027 sec/iter (10000)\n", "[Initializing trial. ] 0.030 sec/iter (10000)\n", "[Get sig probability densities and grads. ] 4.4e-06 sec/iter (1950580)\n", "[Get bkg probability densities and grads. ] 3.3e-06 sec/iter (1950580)\n", "[Calculate PDF ratios. ] 9.9e-05 sec/iter (1950580)\n", "[Calc pdfratio value Ri ] 5.4e-04 sec/iter (975290)\n", "[Calc logLamds and grads ] 2.7e-04 sec/iter (975290)\n", "[Evaluate llh-ratio function. ] 0.003 sec/iter (195058)\n", "[Minimize -llhratio function. ] 0.058 sec/iter (10000)\n", "[Maximizing LLH ratio function. ] 0.058 sec/iter (10000)\n", "[Calculating test statistic. ] 5.1e-05 sec/iter (10000)\n" ] } ], "source": [ "rss = RandomStateService(seed=1)\n", "(_, _, _, trials) = create_trial_data_file(\n", " ana=ana,\n", " rss=rss,\n", " n_trials=1e4,\n", " mean_n_sig=0,\n", " pathfilename='/home/mwolf/projects/publicdata_ps/txs_bkg_trails.npy',\n", " ncpu=8,\n", " tl=tl)\n", "print(tl)" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "After generating the background trials, we can histogram the test-statistic values and plot the TS distribution." ] }, { "cell_type": "code", "execution_count": 32, "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAjoAAAGwCAYAAACgi8/jAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpA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r18/LViwQDfffLO6d++uxMREPffccw7P2bx5s3784x+rS5cuSktL00cffeTW7xf+hRodLwgLDlThrEylzVvr61AAfK9+TWt7K3o4S+Ehrn/cvvTSS7rlllu0efNmFRYW6rbbblNiYqKmTp2qqqoqPfLII0pOTtaBAweUm5urm266SW+++aYkqXT/t7r56st00ahRWrdunSIiIvThhx+qurq6wXXWrVunK6+8Uk888YRuu+02SdJf/vIXzZ8/X7/73e80fPhw/fWvf9XChQvVv39/h+fm5+crIiJC77zzjiSpoqJCWVlZysjI0JYtW3TgwAHdeuutmjZtmpYvX+7W72vhwoV65JFH9MADD+jvf/+77rjjDl144YVKTk7W8ePHdfnll+uSSy7Rn//8ZxUXF2vGjBlulQ//QqLjBRaLReEhbV+IDIB/6tu3r55++mlZLBYlJyfr008/1dNPP62pU6fq5ptvtp93+umn65lnntHQoUN1/PhxhYV31YqXXlC3iAi9/Mor6hJa15w0YMCABtdYtWqVbrzxRr3wwguaOHGiff/ixYt1yy23aMqUKZKk2bNn69///rdDzYwkde3aVS+88IK9yer555/XyZMn9cc//lFdu3aVJD377LO64oor9Pjjjys2Ntbl1z927FjdeeedkqT7779fTz/9tNavX6/k5GS9/PLLqq2t1YsvvqguXbpo4MCB+uabb3THHXe4XD78C4kOAL8QFhyoooezfHZtd5x//vkO/foyMjK0cOFC1dTUaPv27Zo7d64+/vhjHT16VLW1tZKkvXv3Kvmss7Wr6FOdl56h4ODgJsvftGmTVq9erb///e8NRmDt2rXLnmTYpKena926dQ77Bg0a5NAvZ+fOnRo8eLA9yZGk4cOHq7a2Vrt27XIr0Tn33HPtP1ssFsXFxdmb53bu3Klzzz1XXbp0sZ+TkZHhctnwPyQ6APxCXU1r5/7IO3nypLKyspSVlaW//OUvOu2007R3715lZWXJarVKkkK7hLVYzhlnnKGePXtq6dKluuyyy5pNippSP6FxVUBAQIP+So1N7e8cj8VisSd0gLvojAwAHcymTZsctjdu3Kgf/ehH+uyzz3T48GE99thjuuCCC3TWWWfZazpsBpw9UN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pT1VbWytJ+vjjjzVu3DjFxMSoS5cu6tevnyZOnNhgJfX6DMPQ7NmzFR8fr7CwMGVmZuqLL75wOKdfv34N4nrssccczvnkk090wQUXqEuXLurbt6+eeOKJBtcqKytTTk6O4uPjFRoaqgEDBujNN9909W1o4MiRI7r++usVERGhHj166JZbbtHx48ftx7/66qtGf6fOq6q3FNesWbM0f/58HTt2rNWxbtiwQVdccYUSEhJksVj06quvNjhn7ty5Ouuss9S1a1dFRUUpMzNTmzZtanO59d1+++2yWCxatGiRw35X3mNP89tEBwA6mv3799sfixYtUkREhMO+X/7yl8rPz9fEiRN11VVXafPmzdq6davmz5+vqqoqh7IWP7tYU6ZMUUBAgH7yk584lHPttddq9OjRDvt+8pOf6OGHH1a3bt2Um5trL2fp0qVav369li1bpoCAAB08eFAXX3yxoqOjtWbNGu3cuVPLli1TQkKCKioqmnxtTzzxhJ555hktWbJEmzZtUteuXZWVlaWTJ086nPfwww87xDV9+nT7sfLycl166aVKSkrS1q1b9eSTT2ru3Ll67rnn7OdYrVZdcskl+uqrr/T3v/9du3bt0vPPP6/evXs3GdvIkSO1fPnyJo9ff/31+u9//6t33nlHq1ev1oYNG3Tbbbc1OG/t2rUOsaemproV1znnnKMzzjhDf/7zn5uMpSUVFRUaPHiw8vLymjxnwIABevbZZ/Xpp5/qgw8+UL9+/XTppZfq4MGDbSrXZtWqVdq4caMSEhIaPd7ce+wVhp87duyYIck4duyYR8utOFVlJN2/2ki6f7VRcarKo2UDaN6JEyeMoqIi48SJEw2OVZyqatdHay1btsyIjIxssH/GjBnGyJEjG31OdU2t8fHXR431278wLBaLsWPHjkbPy87ONn72s581eqywsNAIDg423nrrLWPPnj1GRESEkZeXZz++atUqIygoyKiqcv211dbWGnFxccaTTz5p31dWVmaEhoYar7zyin1fUlKS8fTTTzdZzu9+9zsjKirKOHXqlH3f/fffbyQnJ9u3f//73xunn366YbVaXY7vwgsvNJYtW9bosaKiIkOSsWXLFvu+t956y7BYLMa+ffsMwzCM4uJiQ5Lx0UcfNXkNV+P69a9/bYwYMcLl2JsjyVi1alWL59m+B9euXdvmcr/55hujd+/exo4dOxp9P1t6j501dy+7+v3NEhAA/ErK7DXter2vHrvMo+XFxcXp5Zdf1o4dO3TOOec0es5HmzcqPDxcZ599ttvlp6amaubMmbr11lt1xhlnKD09XXfccYfD9aurq7Vq1SpdffXVslhaXiG9uLhYJSUlDutlRUZGatiwYSooKNCkSZPs+x977DE98sgjSkxM1OTJk/WLX/xCQUF1X1UFBQX66U9/qpCQEPv5WVlZevzxx3X06FFFRUXpX//6lzIyMpSTk6PXXntNp512miZPnqz7779fgYGBbv8+CgoK1KNHD6Wlpdn3ZWZmKiAgQJs2bdKECRPs+8eNG6eTJ09qwIABuu+++zRu3Dj7MVfjSk9P1/z583Xq1CmFhoZq7969SklJaTbGBx54QA888IDbr02qq2l67rnnFBkZqcGDB7eqDJva2lrdcMMNuvfeezVw4MAmz2vuPfYGEh0A6ESmT5+u999/X4MGDVJSUpLOP/98XXrppbr++usVFFyXAOzf97ViY2MVENC63gmzZs3SsmXLtGnTJn3++ecOycz555+vBx54QJMnT9btt9+u9PR0XXTRRbrxxhsVGxvbaHklJSWS1OB4bGys/Zgk3XXXXTrvvPMUHR2t//znP5o5c6b279+vp556yl5O//79G5RhOxYVFaX//e9/Wrduna6//nq9+eab2r17t+68805VVVVpzpw5bv8uSkpKFBMT47AvKChI0dHR9ti7deumhQsXavjw4QoICNA//vEPjR8/Xq+++qo92XE1roSEBFmtVpWUlCgpKUkJCQnavn17szFGR0e7/bpWr16tSZMmqbKyUvHx8XrnnXfUq1cvt8up7/HHH1dQUJDuuuuuJs9p6T32BhIdAH6l6OEsX4fQJl27dtUbb7yhL7/8UuvXr9fGjRt1zz336Le//a0++PA/kqRTJ0+oS5curb7GO++8Y/8S37JlixITEx2Oz58/X7m5uVq3bp02bdqkJUuWaMGCBdqwYYMGDRrU6uvW7xt07rnnKiQkRD//+c/16KOPKjQ01KUyamtrFRMTo+eee06BgYFKTU3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mA1qi0Vqv2VKXDvvLyclU7rV7e0jnNlWv7fKi/3dhznZ9THRLU5LWdy2uu/OZi+a68vE2vrSWNld/SdZorv7HfS0vxtqQ1729ry6//+2jtNbwdb0fgyfe3KbZ7oaW5+CxGS2eY3DfffKO+ffv6OgwAANAKX3/9tfr06dPkcb9PdGpra/Xtt9+qe/fuslgsHimzvLxcffv21ddff62IiAiPlAnv4j3rnHjfOh/es86pI75vhmHou+++U0JCggICmu6JY556slYKCAhoNhNsi4iIiA7zHwKu4T3rnHjfOh/es86po71vkZGRLZ7jt52RAQCA+ZHoAAAA0yLR8YLQ0FDNmTNHoaGhvg4FLuI965x43zof3rPOqTO/b37fGRkAAJgXNToAAMC0SHQAAIBpkegAAADTItEBAACmRaLjBXl5eerXr5+6dOmiYcOGafPmzb4OCU2YO3euLBaLw+Oss87ydVhwsmHDBl1xxRVKSEiQxWLRq6++6nDcMAzNnj1b8fHxCgsLU2Zmpr744gvfBAtJLb9nN910U4N7b/To0b4JFpKkRx99VEOHDlX37t0VExOj8ePHa9euXQ7nnDx5Ujk5OerZs6e6deumq666SqWlpT6K2DUkOh62YsUK5ebmas6cOdq2bZsGDx6srKwsHThwwNehoQkDBw7U/v377Y8PPvjA1yHBSUVFhQYPHqy8vLxGjz/xxBN65plntGTJEm3atEldu3ZVVlaWTp482c6Rwqal90ySRo8e7XDvvfLKK+0YIZy99957ysnJ0caNG/XOO++oqqpKl156qSoqKuzn/OIXv9Drr7+ulStX6r333tO3336rK6+80odRu8CAR6Wnpxs5OTn27ZqaGiMhIcF49NFHfRgVmjJnzhxj8ODBvg4DbpBkrFq1yr5dW1trxMXFGU8++aR9X1lZmREaGmq88sorPogQzpzfM8MwjOzsbONnP/uZT+KBaw4cOGBIMt577z3DMOruq+DgYGPlypX2c3bu3GlIMgoKCnwVZouo0fEgq9WqrVu3KjMz074vICBAmZmZKigo8GFkaM4XX3yhhIQEnX766br++uu1d+9eX4cENxQXF6ukpMThvouMjNSwYcO47zq4d999VzExMUpOTtYdd9yhw4cP+zok1HPs2DFJUnR0tCRp69atqqqqcrjXzjrrLCUmJnboe41Ex4MOHTqkmpoaxcbGOuyPjY1VSUmJj6JCc4YNG6bly5fr7bff1u9//3sVFxfrggsu0Hfffefr0OAi273Ffde5jB49Wn/84x+Vn5+vxx9/XO+9957GjBmjmpoaX4cGSbW1tbr77rs1fPhwnXPOOZLq7rWQkBD16NHD4dyOfq/5/erl8G9jxoyx/3zuuedq2LBhSkpK0t/+9jfdcsstPowMMLdJkybZfx40aJDOPfdcnXHGGXr33Xd18cUX+zAySFJOTo527Nhhij6L1Oh4UK9evRQYGNigB3ppaani4uJ8FBXc0aNHDw0YMEC7d+/2dShwke3e4r7r3E4//XT16tWLe68DmDZtmlavXq3169erT58+9v1xcXGyWq0qKytzOL+j32skOh4UEhKi1NRU5efn2/fV1tYqPz9fGRkZPowMrjp+/Li+/PJLxcfH+zoUuKh///6Ki4tzuO/Ky8u1adMm7rtO5JtvvtHhw4e593zIMAxNmzZNq1at0rp169S/f3+H46mpqQoODna413bt2qW9e/d26HuNpisPy83NVXZ2ttLS0pSenq5FixapoqJCU6ZM8XVoaMQvf/lLXXHFFUpKStK3336rOXPmKDAwUNddd52vQ0M9x48fd/hLv7i4WNu3b1d0dLQSExN19913a968efrRj36k/v3766GHHlJCQoLGjx/vu6D9XHPvWXR0tH7961/rqquuUlxcnL788kvdd999OvPMM5WVleXDqP1bTk6OXn75Zb322mvq3r27vd9NZGSkwsLCFBkZqVtuuUW5ubmKjo5WRESEpk+froyMDJ1//vk+jr4Zvh72ZUaLFy82EhMTjZCQECM9Pd3YuHGjr0NCEyZOnGjEx8cbISEhRu/evY2JEycau3fv9nVYcLJ+/XpDUoNHdna2YRh1Q8wfeughIzY21ggNDTUuvvhiY9euXb4N2s81955VVlYal156qXHaaacZwcHBRlJSkjF16lSjpKTE12H7tcbeL0nGsmXL7OecOHHCuPPOO42oqCgjPDzcmDBhgrF//37fBe0Ci2EYRvunVwAAAN5HHx0AAGBaJDoAAMC0SHQAAIBpkegAAADTItEBAACmRaIDAABMi0QHAACYFokOAAAwLRIdAABgWiQ6ADoti8XS7GPu3LmSpFWrVun8889XZGSkunfvroEDB+ruu+/2aewA2geLegLotPbv32//ecWKFZo9e7Z27dpl39etWzfl5+dr4sSJmj9/vsaNGyeLxaKioiK98847vggZQDsj0QHQacXFxdl/joyMlMVicdgnSa+//rqGDx+ue++9175vwIABrGwO+AmargCYWlxcnP773/9qx44dvg4FgA+Q6AAwtenTp2vo0KEaNGiQ+vXrp0mTJmnp0qU6deqUr0MD0A5IdACYWteuXfXGG29o9+7dmjVrlrp166Z77rlH6enpqqys9HV4ALyMRAeAXzjjjDN066236oUXXtC2bdtUVFSkFStW+DosAF5GogPA7/Tr10/h4eGqqKjwdSgAvIxRVwBMbe7cuaqsrNTYsWOVlJSksrIyPfPMM6qqqtIll1zi6/AAeBk1OgBM7cILL9T//vc/3XjjjTrrrLM0ZswYlZSU6N///reSk5N9HR4AL7MYhmH4OggAAABvoEYHAACYFokOAAAwLRIdAABgWiQ6AADAtEh0AACAaZHoAAAA0yLRAQAApkWiAwAATItEBwAAmBaJDgAAMC0SHQAAYFr/D2Q++YNysY+8AAAAAElFTkSuQmCC", "text/plain": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "(h, be) = np.histogram(trials['ts'], bins=np.arange(0, np.max(trials['ts'])+0.1, 0.1))\n", "plt.plot(0.5*(be[:-1]+be[1:]), h, drawstyle='steps-mid', label='background')\n", "plt.vlines(ts, 1, np.max(h), label=f'TS(TXS 0506+056)={ts:.3f}')\n", "plt.yscale('log')\n", "plt.xlabel('TS')\n", "plt.ylabel('#trials per bin')\n", "plt.legend()\n", "pass" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "We can see that the TS value of the unblinded data for TXS is rather large and 10k trials are not enough to calculate a reliable estimate for the p-value. Hence, we will generate a few more trials. SkyLLH provides also a helper function to extend the trial data file we just created. It is called ``extend_trial_data_file``: " ] }, { "cell_type": "code", "execution_count": 32, "metadata": {}, "outputs": [], "source": [ "from skyllh.core.utils.analysis import extend_trial_data_file" ] }, { "cell_type": "code", "execution_count": 33, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Help on function extend_trial_data_file in module skyllh.core.utils.analysis:\n", "\n", "extend_trial_data_file(ana, rss, n_trials, trial_data, mean_n_sig=0, mean_n_sig_null=0, mean_n_bkg_list=None, bkg_kwargs=None, sig_kwargs=None, pathfilename=None, **kwargs)\n", " Appends to the trial data file `n_trials` generated trials for each\n", " mean number of injected signal events up to `ns_max` for a given analysis.\n", " \n", " Parameters\n", " ----------\n", " ana : Analysis\n", " The Analysis instance to use for sensitivity estimation.\n", " rss : RandomStateService\n", " The RandomStateService instance to use for generating random\n", " numbers.\n", " n_trials : int\n", " The number of trials the trial data file needs to be extended by.\n", " trial_data : structured numpy ndarray\n", " The structured numpy ndarray holding the trials.\n", " mean_n_sig : ndarray of float | float | 2- or 3-element sequence of float\n", " The array of mean number of injected signal events (MNOISEs) for which\n", " to generate trials. If this argument is not a ndarray, an array of\n", " MNOISEs is generated based on this argument.\n", " If a single float is given, only this given MNOISEs are injected.\n", " If a 2-element sequence of floats is given, it specifies the range of\n", " MNOISEs with a step size of one.\n", " If a 3-element sequence of floats is given, it specifies the range plus\n", " the step size of the MNOISEs.\n", " mean_n_sig_null : ndarray of float | float | 2- or 3-element sequence of\n", " float\n", " The array of the fixed mean number of signal events (FMNOSEs) for the\n", " null-hypothesis for which to generate trials. If this argument is not a\n", " ndarray, an array of FMNOSEs is generated based on this argument.\n", " If a single float is given, only this given FMNOSEs are used.\n", " If a 2-element sequence of floats is given, it specifies the range of\n", " FMNOSEs with a step size of one.\n", " If a 3-element sequence of floats is given, it specifies the range plus\n", " the step size of the FMNOSEs.\n", " bkg_kwargs : dict | None\n", " Additional keyword arguments for the `generate_events` method of the\n", " background generation method class. An usual keyword argument is\n", " `poisson`.\n", " sig_kwargs : dict | None\n", " Additional keyword arguments for the `generate_signal_events` method\n", " of the `SignalGenerator` class. An usual keyword argument is\n", " `poisson`.\n", " pathfilename : string | None\n", " Trial data file path including the filename.\n", " \n", " Additional keyword arguments\n", " ----------------------------\n", " Additional keyword arguments are passed-on to the ``create_trial_data_file``\n", " function.\n", " \n", " Returns\n", " -------\n", " trial_data :\n", " Trial data file extended by the required number of trials for each\n", " mean number of injected signal events..\n", "\n" ] } ], "source": [ "help(extend_trial_data_file)" ] }, { "cell_type": "code", "execution_count": 34, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "100%|██████████| 40001/40001 [1:33:15<00:00, 7.15it/s]\n" ] } ], "source": [ "tl = TimeLord()\n", "rss = RandomStateService(seed=2)\n", "trials = extend_trial_data_file(\n", " ana=ana,\n", " rss=rss,\n", " n_trials=4e4,\n", " trial_data=trials,\n", " pathfilename='/home/mwolf/projects/publicdata_ps/txs_bkg_trails.npy',\n", " ncpu=8,\n", " tl=tl)" ] }, { "cell_type": "code", "execution_count": 35, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "TimeLord: Executed tasks:\n", "[Generating background events for data set 0.] 0.003 sec/iter (40000)\n", "[Generating background events for data set 1.] 0.005 sec/iter (40000)\n", "[Generating background events for data set 2.] 0.004 sec/iter (40000)\n", "[Generating background events for data set 3.] 0.008 sec/iter (40000)\n", "[Generating background events for data set 4.] 0.029 sec/iter (40000)\n", "[Generating pseudo data. ] 0.045 sec/iter (40000)\n", "[Initializing trial. ] 0.126 sec/iter (40000)\n", "[Get sig probability densities and grads. ] 2.6e-04 sec/iter (7959160)\n", "[Evaluating bkg log-spline. ] 3.3e-04 sec/iter (7959160)\n", "[Get bkg probability densities and grads. ] 4.0e-04 sec/iter (7959160)\n", "[Calculate PDF ratios. ] 1.3e-04 sec/iter (7959160)\n", "[Calc pdfratio value Ri ] 0.002 sec/iter (3979580)\n", "[Calc logLamds and grads ] 4.4e-04 sec/iter (3979580)\n", "[Evaluate llh-ratio function. ] 0.008 sec/iter (795916)\n", "[Minimize -llhratio function. ] 0.166 sec/iter (40000)\n", "[Maximizing LLH ratio function. ] 0.166 sec/iter (40000)\n", "[Calculating test statistic. ] 6.1e-05 sec/iter (40000)\n" ] } ], "source": [ "print(tl)" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "The local p-value is defined as the fraction of background trials with TS value greater than the unblinded TS value of the source. " ] }, { "cell_type": "code", "execution_count": 36, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "-log10(p_local) = 2.89\n" ] } ], "source": [ "minus_log10_pval = -np.log10(len(trials[trials['ts'] > ts]) / len(trials))\n", "print(f'-log10(p_local) = {minus_log10_pval:.2f}')" ] }, { "cell_type": "code", "execution_count": 37, "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEGCAYAAACKB4k+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nO3deXiU9bn/8fdtEMEFlE0jIQJCLUEwYDRup6IVhSoC/SGbtlItKEK3X1ulnLaovVqptupPrSJU3FpRjz2IKLX2KBQXCorNKZssBYqBgCxlsYps9++PyfM4GWYmE5LJZDKf13XlSuZ55nnmHhxz57vdX3N3REREAI7KdAAiItJwKCmIiEhISUFEREJKCiIiElJSEBGRUJNMB1Abbdq08Y4dO2Y6DBGRrLJ48eJt7t423rmsTgodO3bkvffey3QYIiJZxcz+meicuo9ERCSkpCAiIiElBRERCWXlmIKZDQAGdOnSJdOhSI7Yv38/5eXl7N27N9OhiKSsWbNmFBQUcPTRR6d8jWVz7aOSkhLXQLPUh3Xr1nHCCSfQunVrzCzT4YhUy93Zvn07e/bsoVOnTlXOmdlidy+Jd526j0RSsHfvXiUEySpmRuvWrWvculVSEEmREoJkmyP5zGblmEJt3TF7Gcs37WZgcXtGlhZmOhwRkQYjZ1sKC9ftYFbZxkyHIXKYlStXsnLlysOOr1+/njPPPLNW9543bx5XXXVVre6RLqNGjeKFF17IdBg5LydbCpMGdGf5pt2ZDkMkq7g77s5RR+Xs35I5Qf91RbLIgQMHuP766+nZsydDhgzhk08+4c477+Scc87hzDPPZMyYMQQzCtesWcNll13GWWedRe/evfnHP/5R5V7vvvsuvXr1Yu3atWzdupW+ffvSu3dvbrrpJk477TS2bdvG+vXr6datG7fccgu9e/fmww8/ZMaMGfTo0YMzzzyT2267Lbzf8ccfH/78wgsvMGrUKCDSAvj2t7/NBRdcQOfOncPWgLszfvx4ioqKuPLKK/noo4/S/K8nqcjKloLWKUgmBWNSdano1BZMGtC92uetXLmSxx57jAsvvJAbbriBhx9+mPHjx/PTn/4UgK997Wu8/PLLDBgwgGuvvZYJEyYwePBg9u7dy6FDh/jwww8BeOedd/jWt77FrFmzKCwsZPz48Vx66aX86Ec/4tVXX2Xq1KlVXvPxxx/n4YcfZtOmTdx2220sXryYk046icsvv5wXX3yRQYMGJY27oqKCt956iw8++ICrr76aIUOGMHPmTFauXMmSJUvYsmULRUVF3HDDDbX4V5S6kJUtBXef7e5jWrZsmelQROpVhw4duPDCCwG47rrreOutt5g7dy6lpaX06NGDN954g2XLlrFnzx42btzI4MGDgcgipmOPPRaAFStWMGbMGGbPnk1hYWSixVtvvcXw4cMB6NevHyeddFL4mqeddhrnnXceEGld9OnTh7Zt29KkSROuvfZa5s+fX23cgwYN4qijjqKoqIgtW7YAMH/+fEaMGEFeXh6nnnoql156aR39K0ltZGVLQSSTUvmLPl1ipxiaGbfccgvvvfceHTp04Pbbb2fv3r0kW5San5/P3r17+dvf/sapp54KkPT5xx13XPhzsudFxxY7N/6YY46Jew9N8214srKlIJKrNmzYwIIFCwCYMWMGF110EQBt2rTh448/DvvrW7RoQUFBAS+++CIAn332GZ988gkAJ554Iq+88goTJ05k3rx5AFx00UU8//zzALz22mv861//ivv6paW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3bvX3d23bt3qGzdudHf3pUuX+qBBg6pc+/jjj/u4ceOqHHvuuee8b9++7u7+i1/8wseMGVPtvaP98Ic/9Lvuusvd3e+66y6/9dZb3d193bp13r1797jv4ZxzzvF33nnHDx065P369fM5c+a4u/uqVau8uLjYd+zY4e7uW7ZsOezaxx9/3CdNmnTY8WuuucZnzJjh7u433XSTP/zww+7uPnfuXL/yyivjxvH1r3/dp02b5u7un332mf/rX/9yd/f169eH/yap2LJliy9atMgnTpwY/rdxdz906JDv2bPH3d337dvn5557ri9YsCDl6wO//vWvfcSIEVXeR/TnIJl4n13gPU/wOzYT6xTiVcAK/0xw9yeSXezuU4GpEFnRXKeRiaSoT58+dXq/oAZRTVVUVNCmTZuw4FybNm3Cc7///e/DEhTJDB06lOnTp3P33XczZcqUcL1CsntHmzVrVhj/9ddfT58+ffjlL3+ZNObdu3dz/vmRagJf//rXefHFF+nfvz/Tpk1j3LhxYZXWdu3aVRs/RP64feONN3jmmWfCOG6//XbGjh2b8Jrdu3czf/58nnjiCQCaNm1K06ZNgUhl2O3bt7N582ZOOeWUal+/Xbt2tGvXjldeeaXKcTML95nYv38/+/fvj1sEMNH1AOXl5bzyyiv853/+J/fee2+1sdRWJrpoyoEOUY8LgE01uYGZDTCzqbt27arTwESyzeWXX86HH37IF77wBW655Rb+8pe/hOfefvttzj777JTuc//993Pbbbfx4x//mFatWlV772hbtmwJax3l5+dX2Sxn3bp19OrVi4svvpg333wTgI0bN1JQUBA+p6CggI0bI1vjrlq1ilWrVnHhhRdy3nnn8eqrr6YU//bt2znxxBNp0qTJYfcEWLBgAWeddRb9+/dn2bJlAKxdu5a2bdvyjW98g169evHNb36Tf//73+E1vXv35u233wbge9/7XthNE/01efLkamM7ePAgxcXFtGvXjr59+1JaWprSewp897vf5e677467491DDz1Ez549ueGGGxIWMaypTLQU3gW6mlknYCMwnMg4QsrcfTYwu6SkZHQa4hOp1pH+ZV/Xjj/+eBYvXsybb77J3LlzGTZsGJMnT2bUqFFUVFTQ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Xu/n7lz3uIlOxvTw59Bmoi15JCvP2h4++E3ng58JqZLTazMZkOJoNOdvcKiPzSANplOJ5MGG9mf6/sXsqJrhMz6wj0Ahaiz0BcuZYU4u4PXe9RZNaF7t6bSBfaODP7UqYDkox4BDgdKAYqgF9nNpz0M7PjgT8A33X33ZmOp6HKtaRQ6/2hs527b6r8/hEwk0iXWi7aYmb5AJXfP8pwPPXK3be4+0F3PwRMo5F/DszsaCIJ4ffu/t+Vh3P6M5BIriWFWu8Pnc3M7DgzOyH4GbgcWJr8qkbrJeD6yp+vB2ZlMJZ6F/wyrDSYRvw5MDMDHgNWuPu9Uady+jOQSM6taK6cenc/kAdMd/efZzikemNmnYm0DiCyFeszufD+K/cK70OkXPIWYBLwIvA8UAhsAK5x90Y5GJvg/fch0nXkwHrgpqB/vbExs4uAN4ElwKHKwxOJjCvkxGegJnIuKYiISGK51n0kIiJJKCmIiEhISUFEREJKCiIiElJSEBGRUJNMByCSzcysNZFiagCnAAeBrZWPZwJDK48dIjLtc2G9BylSA5qSKlJHzOx24GN3/5WZnQ/cC/Rx98/MrA3QNFhRLtJQqaUgkh75wDZ3/wzA3bdlOB6RlGhMQSQ9XgM6mNkqM3vYzC7OdEAiqVBSEEkDd/8YOBsYQ2SM4TkzG5XRoERSoO4jkTRx94PAPGCemS0hUnTtiUzGJFIdtRRE0sDMzjCzrlGHioF/ZioekVSppSCSHscDD5rZiUT2CF5DpCtJpEHTlFQREQmp+0hEREJKCiIiElJSEBGRkJKCiIiElBRERCSkpCAiIiElBRERCf1/8bTF09INVrAAAAAASUVORK5CYII=", "text/plain": [ "
" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "(h, be) = np.histogram(trials['ts'], bins=np.arange(0, np.max(trials['ts'])+0.1, 0.1))\n", "plt.plot(0.5*(be[:-1]+be[1:]), h, drawstyle='steps-mid', label='background')\n", "plt.vlines(ts, 1, np.max(h), label=f'TS(TXS 0506+056)={ts:.3f}')\n", "plt.yscale('log')\n", "plt.xlabel('TS')\n", "plt.ylabel('#trials per bin')\n", "plt.legend()\n", "pass" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.6" } }, "nbformat": 4, "nbformat_minor": 4 }