{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# How to do advanced model manipulation and fitting in Python?" ] }, { "cell_type": "raw", "metadata": {}, "source": [ "
\"Download
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "In this tutorial you will learn to perform some more advanced model manipulation and fitting from Python. You can use these methods in an interactive Python session to explore your dataset and improve the known model of the sky. You can also use them in a Python pipeline to test multiple model hypotheses and select the one that is most appropriate.\n", "\n", "As usual start by importing the gammalib, ctools, and cscripts Python modules." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import gammalib\n", "import ctools\n", "import cscripts" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now import the matplotlib package for plotting." ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "%matplotlib inline\n", "import matplotlib.pyplot as plt" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Simulated dataset\n", "\n", "For the tutorial you will simulate a small dataset. Start by defining the Instrument Response Function and energy range that will be used all along." ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "caldb = 'prod2'\n", "irf = 'South_0.5h'\n", "emin = 0.1 # TeV\n", "emax = 160.0 # TeV" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now proceed to simulate the dataset. It consists of an hour of observations of the Crab nebula region, as usual pointed at a slightly offset position from the target. The input model is different from the one you have been using so far and contains some surprises. Don't look at it until you have completed the exercises at the end of the tutorial." ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "evfile = 'events.fits'\n", "obssim = ctools.ctobssim()\n", "obssim['ra'] = 83.63\n", "obssim['dec'] = 22.51\n", "obssim['rad'] = 5.0\n", "obssim['tmin'] = 0\n", "obssim['tmax'] = 3600\n", "obssim['emin'] = emin\n", "obssim['emax'] = emax\n", "obssim['caldb'] = caldb\n", "obssim['irf'] = irf\n", "obssim['inmodel'] = '$CTOOLS/share/models/crab_beyond.xml'\n", "obssim['outevents'] = evfile\n", "obssim.execute()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "You have saved the events on disk in the file `events.fits`. In this way you can easily re-use the code below by substituting `events.fits` with your own event list or observation definition XML file.\n", "\n", "Let's first peek at the simulated dataset by displaying a skymap." ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "skymap = ctools.ctskymap()\n", "skymap['inobs'] = evfile\n", "skymap['emin'] = emin\n", "skymap['emax'] = emax\n", "skymap['nxpix'] = 40\n", "skymap['nypix'] = 40\n", "skymap['binsz'] = 0.02\n", "skymap['proj'] = 'TAN'\n", "skymap['coordsys'] = 'CEL'\n", "skymap['xref'] = 83.63\n", "skymap['yref'] = 22.01\n", "skymap['bkgsubtract'] = 'IRF'\n", "skymap['caldb'] = caldb\n", "skymap['irf'] = irf\n", "skymap.run()" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAVYAAAEKCAYAAABJ430PAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAIABJREFUeJztvXmUZEd95/v55lJ7dbe6JZDUaiyxeeAwgMYyxpY9YARG1mCwMXjABvOMHxqPwYNsPGMEcx7H4+d5g+Hosc5gGbHZeixGgsMiI9q2gNEckLUgtLhhEGCgUVut3qqX2nL5vT9uNmRV/KLqVnVmdmX176OTR51RceNG3HszMjK+v0VmRhAEQdA7Kqe7A0EQBJuNmFiDIAh6TEysQRAEPSYm1iAIgh4TE2sQBEGPiYk1CIKgx8TEGgRB0GNiYg2CIOgxfZtYJe2SdIukPZLul/TaTvlbJH1d0j2SPiFp2wptVCV9VdJn+tXPIAiCXqN+eV5JOg84z8zukjQN3An8MnAB8Pdm1pT0ZgAz+6NMG38AXAJsMbPnrX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D1nX58ARgDHkUR2eojAGZ2H0Xw6272U0STCoKBM/SxAoK+MmdmT5W0FfgMxR7rO7ordFazvwo8X9IbKfzhd0iaNrNjK7VNMUmeJOdbLeBXzewby87rhXzsZqxzjiAYOLFiDVbFzGaA/wD8oaT6sj8/G/iame3qRGf6MYr0Ir+8SrN7KEI7QhHt6SJJj+m8717x3gz83smJVNLFnfJbgV/rlD0R+JcnD+jUPZciHU0QDJyYWINSmNlXKSIzvQSg89MciknwE8uq30ARDxZJN0nyfpJ/Fnhmp+154Ergsx3x6rtd9f4EqAP3SLqv8x7gvwPnSLqHIvL+PcBM528/AXzFzJrrGmwQnCIR3So4bXQm0eeZ2ZF1HFsF6mY231np/h3weDNblPR2irQ8f9fjLgdBKWKPNTidvI5CiFrzxEqRqO+WztaEgH9vZoudv90Xk2pwOokVaxAEQY+JPdYgCIIeExNrEARBj4mJNQiCoMfExBoEQdBjYmINgiDoMTGxBkEQ9Jj/H03zi6SCZqFuAAAAAElFTkSuQmCC\n", "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# Slightly smooth the map for display to suppress statistical fluctuations\n", "skymap.skymap().smooth('GAUSSIAN',0.02)\n", "\n", "from matplotlib.colors import SymLogNorm\n", "# The SymLogNorm scale is a Log scale for both positive and negative values\n", "# and is linear within a certain range around 0\n", "\n", "ax = plt.subplot()\n", "plt.imshow(skymap.skymap().array(),origin='lower',\n", " extent=[83.63+0.02*20,83.63-0.02*20,22.01-0.02*20,22.01+0.02*20],\n", " # boundaries of the coord grid\n", " norm=SymLogNorm(1)) # the scale will be linear within +-1 count \n", "ax.set_xlabel('R.A. (deg)')\n", "ax.set_ylabel('Dec (deg)')\n", "cbar = plt.colorbar()\n", "cbar.set_label('Counts')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Model fitting and residual inspection\n", "\n", "First, fit the usual Crab model to the data using a 3D unbinned analysis." ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [], "source": [ "like = ctools.ctlike()\n", "like['inobs'] = evfile\n", "like['caldb'] = caldb\n", "like['irf'] = irf\n", "like['inmodel'] = '$CTOOLS/share/models/crab.xml'\n", "like.run()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "As usual it is wise to look at the output from the optimizer. Store the best-fit minus log-likelihood value for later usage." ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "=== GOptimizerLM ===\n", " Optimized function value ..: 314283.848\n", " Absolute precision ........: 0.005\n", " Acceptable value decrease .: 2\n", " Optimization status .......: converged\n", " Number of parameters ......: 10\n", " Number of free parameters .: 4\n", " Number of iterations ......: 10\n", " Lambda ....................: 1e-09\n" ] } ], "source": [ "print(like.opt())\n", "like1 = like.opt().value()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The fit has properly converged after 10 iterations. Let's take a look at the best-fit model." ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "=== GModels ===\n", " Number of models ..........: 2\n", " Number of parameters ......: 10\n", "=== GModelSky ===\n", " Name ......................: Crab\n", " Instruments ...............: all\n", " Observation identifiers ...: all\n", " Model type ................: PointSource\n", " Model components ..........: \"PointSource\" * \"PowerLaw\" * \"Constant\"\n", " Number of parameters ......: 6\n", " Number of spatial par's ...: 2\n", " RA .......................: 83.6331 [-360,360] deg (fixed,scale=1)\n", " DEC ......................: 22.0145 [-90,90] deg (fixed,scale=1)\n", " Number of spectral par's ..: 3\n", " Prefactor ................: 3.53420581059778e-16 +/- 6.13986803854443e-18 [1e-23,1e-13] ph/cm2/s/MeV (free,scale=1e-16,gradient)\n", " Index ....................: -2.27926367934528 +/- 0.0145867159374822 [-0,-5] (free,scale=-1,gradient)\n", " PivotEnergy ..............: 300000 [10000,1000000000] MeV (fixed,scale=1000000,gradient)\n", " Number of temporal par's ..: 1\n", " Normalization ............: 1 (relative value) (fixed,scale=1,gradient)\n", " Number of scale par's .....: 0\n", "=== GCTAModelIrfBackground ===\n", " Name ......................: CTABackgroundModel\n", " Instruments ...............: CTA\n", " Observation identifiers ...: all\n", " Model type ................: \"PowerLaw\" * \"Constant\"\n", " Number of parameters ......: 4\n", " Number of spectral par's ..: 3\n", " Prefactor ................: 0.996370165375849 +/- 0.0082156655736933 [0.001,1000] ph/cm2/s/MeV (free,scale=1,gradient)\n", " Index ....................: -0.00225668505770844 +/- 0.00508689620095184 [-5,5] (free,scale=1,gradient)\n", " PivotEnergy ..............: 1000000 [10000,1000000000] MeV (fixed,scale=1000000,gradient)\n", " Number of temporal par's ..: 1\n", " Normalization ............: 1 (relative value) (fixed,scale=1,gradient)\n" ] } ], "source": [ "print(like.obs().models())" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The background model reproduces well the data, since its best-fit normalization is 1 and the index/tilt is 0. The Crab nebula has a best-fit spectral index of 2.28.\n", "\n", "To assess whether the model reproduces well the data spatially generate a residual map." ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [], "source": [ "resmap = cscripts.csresmap(like.obs())\n", "resmap['algorithm'] = 'SIGNIFICANCE'\n", "resmap['emin'] = emin\n", "resmap['emax'] = emax\n", "resmap['nxpix'] = 40\n", "resmap['nypix'] = 40\n", "resmap['binsz'] = 0.02\n", "resmap['proj'] = 'TAN'\n", "resmap['coordsys'] = 'CEL'\n", "resmap['xref'] = 83.63\n", "resmap['yref'] = 22.01\n", "resmap.run()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "To easily inspecting the residual maps along the tutorial, define a function to plot them, and apply it to the latest run." ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [], "source": [ "def plot_residuals(resid):\n", " # Slightly smooth the map for display to suppress statistical fluctuations\n", " resid.smooth('GAUSSIAN',0.04)\n", " # Plotting\n", " fig = plt.figure()\n", " ax = plt.subplot()\n", " plt.imshow(resid.array(),origin='lower',\n", " cmap='bwr',vmin=-3,vmax=3,\n", " extent=[83.63+0.02*20,83.63-0.02*20,22.01-0.02*20,22.01+0.02*20])\n", " # Boundaries of the coord grid\n", " ax.set_xlabel('R.A. (deg)')\n", " ax.set_ylabel('Dec (deg)')\n", " cbar = plt.colorbar()\n", " cbar.set_label('Significance ($\\sigma$)')" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAVYAAAEKCAYAAABJ430PAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAIABJREFUeJztnXu0XVV97z/fhEACBBESL5KER31Vh+Wh0apYrYAtpqhF8RarSKW31Epb6KCjitxRaq0dWloqaltNi4pK8cFDrVAhWpRShUpieHmoz2KR3JKIvAoJhHzvH2sd3Zwz5zlrnrXWPvuc/D5j7JHsueeca8699vntuX9P2SYIgiDojgWzvYAgCIL5RgjWIAiCjgnBGgRB0DEhWIMgCDomBGsQBEHHhGANgiDomBCsQRDMSSQtlvTvkm6UdKukt8/2msZR+LEGQTAXkSRgD9sPSFoEXAucZvu6WV4au8z2AoIgCGaCq1PhA/XTRfVjJE6KvQlWSauAjwL7ATuAtbbPk3QO8HLgYeC7wBtt35OZYyFwA/BD28dOd81ly5b5oAMPbLrASU25w/tsH+pz109sIUtJ3x07mrVBem3DfB9z+1qQUHKV9G1LyV5z60q1l9zHLC1uxH/efjtbtmxptYpjJG9p2Hc93ApsHWhaa3vt+JNaRqwHngz8je3r26ytK/o8sW4HzrC9QdJSYL2kdcA64Ezb2yW9GzgTeEtmjtOAMWCvJhc86MADueGrX31sY+6vZpfJW39ke/rzsn375LZHH22yonJSn/mcUEttLbGtbHtu3q1bm7UBPPxwszZIv4+5NaRI7XfXXdN9Fy9u3jfVnnsfU/e95J6lWLgw3b5oUfN1Jb9IdmQ+pCWLm9B39Qte0Hxsh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NnCd7e0z2mwQtCSyWwWzRi1Ej7V9zwzGLgQW2d5an3S/BDzV9sOSzqMqy/OljpccBI0IHWswm5xBZYgqFqxUhfqurlUTAn7H9sP1a7eEUA1mkzixBkEQdEzoWIMgCDomBGsQBEHHhGANgiDomBCsQRAEHROCNQiCoGP+P4PxOlE8RTI2AAAAAElFTkSuQmCC\n", "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "plot_residuals(resmap._resmap)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Adding model components\n", "\n", "The residual map shows a cluster of positive residuals on the South-West of the Crab nebula. Is this another source? To test this hypothesis add a point source at the position that you can guess from the residual map." ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [], "source": [ "newpntsrc = gammalib.GModelSky(gammalib.GModelSpatialPointSource(83.7,21.9),\n", " gammalib.GModelSpectralPlaw(1.e-17,-2.,gammalib.GEnergy(3.e5,'MeV')),\n", " gammalib.GModelTemporalConst(1))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "You have defined a sky model object that has three components:\n", "\n", "- a spatial model, which is a point source at the position guessed from the residual map;\n", "- a spectral model which is a power law with spectral index 2, and a flux which approximately 1/10 of the Crab nebula;\n", "- a temporal model which is a constant.\n", "\n", "Name this source `Src1`, and free its position (fixed by default when a new source is created), so that you can fit it to the data:" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [], "source": [ "newpntsrc.name('Src1')\n", "newpntsrc['RA'].free()\n", "newpntsrc['DEC'].free()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Finally append the new source to the model container" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "data": { "text/plain": [ " >" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "like.obs().models().append(newpntsrc)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "and fit the model including the new source to the data." ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [], "source": [ "like.run()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Does the addition of the new source provide a better fit to the data? You can quantify this using the test statistic (TS) given by twice the log-likelihood difference." ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "189.90216831723228\n" ] } ], "source": [ "like2 = like.opt().value()\n", "ts = -2.0 * (like2 - like1)\n", "print(ts)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "TS is expected to be distributed as a $\\chi^2_n$ with n degrees of freedom, where n is the additional number of degrees of freedom in the model including the new source, in our case 4 (RA, Dec, Prefactor, and Index). The integral of the $\\chi^2_n$ from TS to $\\infty$ is the chance probability that the likelihood improved by that much due to statistical fluctuations. A large value, like the one we got, means that the chance probability is very low, thus we are likely to have found a new source.\n", "\n", "To make sure the new source improves the data/model agreement look again at the residual map." ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAVYAAAEKCAYAAABJ430PAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAIABJREFUeJztnXmUZVV97z/fHqAZVaB9SHczRNToMgzaErSJKGCCHcSg+IJRJJIXYiQJZJEVRd4KMcYsDQkRNYl2gopKQGUQI0RoDUqIQqTbZrKIigaC9AvdYQ70RH/fH+cU3K7ap+rsOkPdqv591rqr6u579j57n3Pqd3f9RtkmCIIgaI850z2BIAiC2UYI1iAIgpYJwRoEQdAyIViDIAhaJgRrEARBy4RgDYIgaJkQrEEQzEgkLZD0b5JulXSnpPdP95xGUfixBkEwE5EkYBfbj0uaD9wInGH7pmmeGvOmewJBEARTwcWu8PHy7fzyNRQ7xc4Eq6QlwGeBvYGtwArbF0g6D3gDsAm4G3in7YcrxpgL3AL81PZxk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R1rEARBy4RgDYIgaJkQrEEQBC0TgjUIgqBlQrAGQRC0zP8H6TAUXD3xj8wAAAAASUVORK5CYII=\n", "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "resmap.models(like.obs().models())\n", "resmap.run()\n", "plot_residuals(resmap._resmap)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The addition of the new point source has flattened the spatial residuals, even though the fit is obviously not perfect yet. From now on fix the position of `Src1`." ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [], "source": [ "like.obs().models()['Src1']['RA'].fix()\n", "like.obs().models()['Src1']['DEC'].fix()" ] }, { "cell_type": "markdown", "metadata": { "collapsed": true }, "source": [ "## Modifying the spectral models\n", "\n", "Next check if the model spectrum satisfactorily reproduces the data in the region around the Crab." ] }, { "cell_type": "code", "execution_count": 20, "metadata": {}, "outputs": [], "source": [ "resspec = cscripts.csresspec(like.obs())\n", "resspec['algorithm'] = 'SIGNIFICANCE'\n", "resspec['mask'] = True\n", "resspec['ra'] = 83.63\n", "resspec['dec'] = 22.01\n", "resspec['rad'] = 0.2\n", "resspec['components'] = True\n", "resspec['outfile'] = 'resspec_1.fits'\n", "resspec.execute()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We can use an example script to display the residuals." ] }, { "cell_type": "code", "execution_count": 21, "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAY4AAAEOCAYAAACetPCkAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAIABJREFUeJzt3Xl4VOXZ+PHvTUAhoKgsLkQSNrEiIbK+KigIrbgAghuQCFRLymulr61Kpa0F6xuLv0ppXarGFvCFCG7ggq0LFHAprYBQRBFRCYqoQJQIJEgI9++PmYlZZiYzc87s9+e65iJ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4axe/fuiOqUk5PD3r17Hb83t61atYrLL78cgPnz5yMirFixoub1pUuXIiI8/XTo01t9ZQbLCPyvN19ncn7g8YT3Pv+G5zZ+FvI5E0LPqzxTeSP1xTuRTyM2KSnUMY7VInIy3w2S293/wqSqjB49mokTJ7J48WLAs3p8//79DBo0iEmTJnH55Zdz1VV1P7QWLVpEv379WLp0KZMmTarZPmjQoJrFg9OnT+fBBx90dJ/iSBw5coSmTUOdX+FMz549WbRoEUOHDgVg8eLF9OrVK6Kygo2RfHpCCzKPaep3jcjhvcdy1qnHR3TOuHIyPgI2RmIaCLWr6hrg98AqPKlB7heR21TVvoaEaOXKlTRr1owpU6bUbMvLywt6zEcffcSBAwf4/e9/z913310ncPioKvv376dr164AvPXWW9x8881UVlbSokUL5s2bR/fu3amuruYXv/gFL7/8MiLC5MmTmTr1uzkPlZWVjB49miuvvJLJkydz1113UVJSwumnn07btm3p06cPt956K4MHD+a8887jzTffZOTIkVx11VVcf/317Nmzh3bt2jFv3jw6duzYIBC2atWKAwcOsGrVKmbOnEnbtm3ZvHkzffr0YeHChYgIL730EjfffDNt27ald++69wgbNGgQr7/+OlVVVXz77bd8+OGHdX5/K1as4NZbb+XIkSP069ePhx56iGOPPTZgmQcPHmTq1Km88847HDlyhJkzZzJq1KiQ/pbvff4N1z6yJqR960vKbi5j6gn16+KvgH6quhtARNoBywELHCHyfUiGY9GiRYwbN45BgwaxdetWdu/eTfv27QF4/fXXycvLo6ysjJYtW3L33XcDcOaZZ/Laa6/RtGlTli9fzi9/+UueeeYZiouL2b59Oxs2bKBp06Z89dV32WIOHDjA2LFjmTBhAhMmTGDdunU888wzbNiwgSNHjtC7d+86dd+3bx+rV68GYMSIEUyYMIGJEycyd+5cfvrTn/Lss88GfV8bNmzg3Xff5bTTTuP888/nzTffpG/fvkyePJl//OMfdO3atSZjsI+IMGzYMF5++WXKy8sZOXIk27d7EhocOnSISZMmsWLFCs444wwmTJjAQw89xJQpUwKWWVRUxEUXXcTcuXPZt28f/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fjzG1WeAw6aZFva6q2ndF26uqvYGHgFu9234F/ENV+wFDgN+LSEvva+cCE1X1Ijx3ccwBegI/8r4G8A/geyLSzvv8h8A8P/U6H1gfrOIi0h64HRjqrecm4H+8Ly/Ck5/IV9YuVd0OoKp7geNE5IRg5RsTKkurbtJNparmBXjN1xJYjycQAPwAGCkivkDSHOjo/flVVfXdUGcg8JSqHgW+EJGV4MlrLSILgAIRmYcnoEzwc+5TgT2N1P08PHd3+6enUcExwBve1xYBq0VkGp4AsqjesXu859jXyDmMaZQFDmO+863332q++78hwJWqurX2jiIyADhYe1OQcufhuUHXITzBxd94SCWeoBSMAC+p6nX1X1DVUhHZBQwCRgN96u3S3HsOYxyzripjgnsZmOodN0BEzgmw3xt47uLYREROBgb7XlDVXXjujfBrPPeL9mcL0LWRuvwTuFBEOnvr0lJEutV6fRGem/ZsUdUvfBtFpAnQlrp3iDMmYhY4TLqpP8Yxq5H97wKaAZtEZLP3uT/P4LmZzmbgEeDfQHmt10uAT1X1vQDHv0itYOOPqn4J3AA8ISL/wRNIzqi1y5PA2Xw3KO7TH3hDVauDlW9MqGw6rjEuEZFWqnpARNoAbwHn+775i8gDwAZV/WuAY1sAK73HuPoBLyIP4rk/w2o3yzXpy8Y4jHHPMu/MpWOAu2oFjfV4xkNuCXSgqlaKyAygA/CJy/XaYEHDuMlaHMYYY8JiYxzGGGPCYoHDGGNMWCxwGGOMCYsFDmOMMWGxwGGMMSYsFjiMMcaE5f8DMhLDSE0glyoAAAAASUVORK5CYII=\n", "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "import sys\n", "import os\n", "sys.path.append(os.environ['CTOOLS']+'/share/examples/python/')\n", "\n", "from show_residuals import plot_residuals\n", "plot_residuals('resspec_1.fits','',0)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "From the residuals it is clear that the model does not reproduce the data well. There is an excess at low energies and the model overshoots the data at high energies. You may try to change the spectral model for the Crab nebula.Try for example an exponentially cutoff power-law rather than a simple power law. Let's use as starting values for the Prefactor and Index the current best-fit values and tentatively set the cutoff energy at 1 TeV." ] }, { "cell_type": "code", "execution_count": 22, "metadata": {}, "outputs": [], "source": [ "crab = like.obs().models()['Crab']\n", "expplaw = gammalib.GModelSpectralExpPlaw()\n", "expplaw['Prefactor'].value(crab['Prefactor'].value())\n", "expplaw['Index'].value(crab['Index'].value())\n", "expplaw['PivotEnergy'].value(crab['PivotEnergy'].value())\n", "expplaw['CutoffEnergy'].value(1.e6)\n", "crab.spectral(expplaw)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now fit the modified model to the data" ] }, { "cell_type": "code", "execution_count": 23, "metadata": {}, "outputs": [], "source": [ "like.run()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "and use TS to quantify the model improvement (in this case there is only one additional degree of freedom, the cutoff energy)." ] }, { "cell_type": "code", "execution_count": 24, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "319.8230714731617\n" ] } ], "source": [ "like3 = like.opt().value()\n", "ts = -2.0 * (like3 - like2)\n", "print(ts)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The model improvement was again significant. Let's look at the fit results for the Crab nebula." ] }, { "cell_type": "code", "execution_count": 25, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "=== GModelSky ===\n", " Name ......................: Crab\n", " Instruments ...............: all\n", " Observation identifiers ...: all\n", " Model type ................: PointSource\n", " Model components ..........: \"PointSource\" * \"ExponentialCutoffPowerLaw\" * \"Constant\"\n", " Number of parameters ......: 7\n", " Number of spatial par's ...: 2\n", " RA .......................: 83.6331 [-360,360] deg (fixed,scale=1)\n", " DEC ......................: 22.0145 [-90,90] deg (fixed,scale=1)\n", " Number of spectral par's ..: 4\n", " Prefactor ................: 3.5947627991423e-16 +/- 7.19602031907029e-18 [0,infty[ ph/cm2/s/MeV (free,scale=1,gradient)\n", " Index ....................: -1.82160233651441 +/- 0.0226092875383086 [-10,10] (free,scale=1,gradient)\n", " CutoffEnergy .............: 3206969.84019295 +/- 117128.52342759 [0.1,infty[ MeV (free,scale=1,gradient)\n", " PivotEnergy ..............: 300000 MeV (fixed,scale=1,gradient)\n", " Number of temporal par's ..: 1\n", " Normalization ............: 1 (relative value) (fixed,scale=1,gradient)\n", " Number of scale par's .....: 0\n" ] } ], "source": [ "print(crab)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The best-fit cutoff energy is 3.2 TeV, which seems consistent with the behavior in the energy-bands residual maps above. Note that this has changed significantly the Index value, that now is 1.82. Check the residual spectrum again to make sure that the residuals are reduced." ] }, { "cell_type": "code", "execution_count": 26, "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAY4AAAEOCAYAAACetPCkAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAIABJREFUeJzt3Xt4VNW5+PHvS7iGWxXEC0gClEtFQrgrgqAgRVQQKwISQWiN/Cw9bU+tRVsraHPUUzxU1KPGFvBABEXBC6IoKCKVKiARAY0oBEVEMNQIhiiE9/fHzMRJMpPMzN5zS97P88xD9p69114TdvY7a6+13yWqijHGGBOqevGugDHGmORigcMYY0xYLHAYY4wJiwUOY4wxYbHAYYwxJiwWOIwxxoTFAocxxpiwWOAwxhgTloQPHCLyExF5RESeFpH/F+/6GGNMXReXwCEi80XkoIhsr7R+pIgUiMjHIjITQFU/UNXpwDVA33jU1xhjzA8kHilHRORC4Cjwf6p6rnddCvARcAmwD9gETFTVnSIyGpgJPKiqT9RUfuvWrTU9PT1a1TfGmFppy5YtX6nqaTVtVz8WlalMVdeLSHql1f2Bj1V1N4CILAXGADtV9XngeRF5EagxcKSnp7N582Z3K22MMbWciOwNZbtE6uNoC3zmt7wPaCsiQ0Vknog8CqwKtrOIZIvIZhHZfOjQ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Ij8HWqvqvU7qaAxYi8OYciJSKCKzReRdEXlfRLp51zf1Tp6zSUS2isgY7/rrRWSZiLwAvCIi9UTkf0Vkh4isFJFVInK1iAwTkRV+x7lERJYHqMIk4LkQ6nmpiGz01vNJEWnqfUq4VET6eLcRYBye9Np4y73Wye/HGB8LHKYualLpVpX/zGhfqWpv4GHgZu+6PwKvqWo/4CLgryLS1Pve+cAUVb0Yz0yO6UAP4Bfe9wBeA34iIqd5l6cCCwLU6wJgS3UVF5E2wExgmLee24Bfe99egidHka+s/aq6B0BVvwKai8iPqivfmFBYWnVTFx1T1cwg7/laAlvwBAKAEcBoEfEFksZAe+/Pr6qqb1KdQcAyVT0JHBCR18GT21pEFgFZIrIAT0CZHODYZwKHaqj7QDwzvL3laVTQENjgfW8J8IaI3IIngCyptO8h7zG+ruEYxlTLAocxFX3n/beMH/4+BPiZqhb4bygiA4Bv/VdVU+4CPJN0leIJLoH6Q47hCUrVEeBlVb2u8huqWigi+4HBwFigT6VNGnuPYYwjdqvKmJqtBn7l7TdARHoF2W4Dnpkc64nI6cBQ3xuquh/P/Ah/wjNndCAfAD+uoS5vAUNEpKO3Lk1FpLPf+0vwTNzzgaoe8K0UkXpAayrOEmdMRCxwmLqoch/HPTVsfxfQANgmItu9y4E8g2dCne3Ao8DbQLHf+3nAZ6q6M8j+L+IXbAJR1S+BnwNPish7eAJJF79NngLO5YdOcZ/+wAZVLauufGNCYcNxjXGRiDRT1aMi0gp4B7jA981fRB4EtqrqP4Ls2wR43buPqxd4EXkIzxwNb7hZrqmbrI/DGHet9I5cagjc5Rc0tuDpD/ldsB1V9ZiI3AG0BT51uV5bLWgYt1iLwxhjTFisj8MYY0xYLHAYY4wJiwUOY4wxYbHAYYwxJiwWOIwxxoTFAocxxpiw/H84ixcgqRVATQAAAABJRU5ErkJggg==\n", "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "resspec = cscripts.csresspec(like.obs())\n", "resspec['algorithm'] = 'SIGNIFICANCE'\n", "resspec['mask'] = True\n", "resspec['ra'] = 83.63\n", "resspec['dec'] = 22.01\n", "resspec['rad'] = 0.2\n", "resspec['components'] = True\n", "resspec['outfile'] = 'resspec_2.fits'\n", "resspec.execute()\n", "\n", "plot_residuals('resspec_2.fits','',0)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now you actually have an excess at the highest energies. In spite of the significant likelihood improvement the model is not quite perfect yet. Is there perhaps a new spectral component appearing at high energies? Test if the addition of a power-law spectral component with a hard index (2) improves things. To do this, add the hard spectral component to the exponentially-cutoff power law using a composite spectral model." ] }, { "cell_type": "code", "execution_count": 27, "metadata": {}, "outputs": [], "source": [ "expplaw2 = like.obs().models()['Crab'].spectral().clone() \n", "newcomp = gammalib.GModelSpectralPlaw(1.e-18,-2.,gammalib.GEnergy(1,'TeV'))\n", "comp_spec = gammalib.GModelSpectralComposite()\n", "comp_spec.append(expplaw2)\n", "comp_spec.append(newcomp)\n", "like.obs().models()['Crab'].spectral(comp_spec)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's fit this new model to the data and check the likelihood improvement." ] }, { "cell_type": "code", "execution_count": 28, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "311.12034105171915\n" ] } ], "source": [ "like.run()\n", "like4 = like.opt().value()\n", "ts = -2.0 * (like4 - like3)\n", "print(ts)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The likelihood improvement is again significant, but is this the best possible model of the sky?" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Exercises \n", "\n", "- Test other spectral models for the Crab nebula, such as log-parabola and broken power law. Can you say what the best spectral model is?\n", "- What can you say from the residual maps about the spectrum of `Src1`? Try looking at the residuals below and above 300 GeV, or calculate the residual spectrum at the position of this source.\n", "- Replace the 2 sources with a single extended source (disk). Can you say which of the two hypotheses is describing the data better?" ] } ], "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.5.4" } }, "nbformat": 4, "nbformat_minor": 2 }