Commit 81c782632450fe575a3bae95887900ca27cea335
1 parent
0c22baed
Reorganise tutorials
Showing
20 changed files
with
241 additions
and
280 deletions
doc/source/users/index.rst
| ... | ... | @@ -8,9 +8,9 @@ This documentation will guide you in the process of using ctools. |
| 8 | 8 | .. toctree:: |
| 9 | 9 | :maxdepth: 1 |
| 10 | 10 | |
| 11 | - tips/index | |
| 12 | 11 | user_manual/index |
| 13 | - tutorials/index | |
| 14 | 12 | reference_manual/index |
| 13 | + tips/index | |
| 14 | + tutorials/index | |
| 15 | 15 | user_contributed/index |
| 16 | 16 | glossary | ... | ... |
doc/source/users/tutorials/beyond/beyond_tsmap.rst deleted
| 1 | -.. _sec_tsmap: | |
| 2 | - | |
| 3 | -Generating a Test Statistic map | |
| 4 | -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| 5 | - | |
| 6 | -In the above examples you have always considering that you knew exactly | |
| 7 | -where the source is located, but in real life situations this may not | |
| 8 | -necessarily be the case. | |
| 9 | -You thus need a means to search for significant excess emission in your data. | |
| 10 | -One possibility to accomplish this task is to compute the Test Statistic | |
| 11 | -for a specific source at a grid of trial positions. | |
| 12 | -The :ref:`cttsmap` tool will do exactly that job. | |
| 13 | - | |
| 14 | -The Test Statistic is defined as twice the log-likelihood difference | |
| 15 | -between fitting a source at a given position on top of a model or fitting | |
| 16 | -no source. | |
| 17 | -Roughly speaken, the square root of the Test Statistic value gives | |
| 18 | -the source detection significance in Gaussian sigmas, although the | |
| 19 | -exact relation depends somewhat on the formulation of the statistical | |
| 20 | -problem. | |
| 21 | - | |
| 22 | -Here an example of how to apply the :ref:`cttsmap` tool to the two | |
| 23 | -simulated observations of the Crab nebula in unbinned mode. | |
| 24 | -On input you provide a source model XML file and the name of the source | |
| 25 | -in the XML file that should be moved on a grid of test positions. | |
| 26 | -This means that the position of the source given in the XML file is | |
| 27 | -in fact ignored and replaced by the grid positions that are defined by | |
| 28 | -the user parameters. | |
| 29 | -In the example you defined a grid of 10 x 10 positions around the | |
| 30 | -nominal position of the Crab nebula with a grid spacing of 0.02°. | |
| 31 | - | |
| 32 | -.. code-block:: bash | |
| 33 | - | |
| 34 | - $ cttsmap | |
| 35 | - Input event list, counts cube or observation definition XML file [events.fits] obs.xml | |
| 36 | - Calibration database [prod2] | |
| 37 | - Instrument response function [South_0.5h] | |
| 38 | - Test source name [Crab] | |
| 39 | - Input model definition XML file [$CTOOLS/share/models/crab.xml] | |
| 40 | - First coordinate of image center in degrees (RA or galactic l) (0-360) [83.63] | |
| 41 | - Second coordinate of image center in degrees (DEC or galactic b) (-90-90) [22.01] | |
| 42 | - Projection method (AIT|AZP|CAR|GLS|MER|MOL|SFL|SIN|STG|TAN) [CAR] | |
| 43 | - Coordinate system (CEL - celestial, GAL - galactic) (CEL|GAL) [CEL] | |
| 44 | - Image scale (in degrees/pixel) [0.02] | |
| 45 | - Size of the X axis in pixels [200] 10 | |
| 46 | - Size of the Y axis in pixels [200] 10 | |
| 47 | - Output Test Statistic map file [tsmap.fits] | |
| 48 | - | |
| 49 | -:ref:`cttsmap` writes the Test Statistic map in the ``tsmap.fits`` file | |
| 50 | -that contains one extension for the Test Statistic value and further | |
| 51 | -extensions for the spectral parameters that have been fitted for the | |
| 52 | -source at each position of the grid. | |
| 53 | -The figure below show the Test Statistic map which reaches a maximum | |
| 54 | -value of 42622 near the centre of the map. | |
| 55 | - | |
| 56 | -.. figure:: tsmap-crab.png | |
| 57 | - :height: 400px | |
| 58 | - :align: center | |
| 59 | - | |
| 60 | - *Test Statistic map of the Crab region* | |
| 61 | - | |
| 62 | -.. note:: | |
| 63 | - Similar to :ref:`ctlike` the :ref:`cttsmap` tool works either for unbinned, | |
| 64 | - binned or stacked analysis. On input it takes either a single event | |
| 65 | - list, a single counts cube, or an observation definition XML file that | |
| 66 | - allows a joint analysis of multiple observations. |
doc/source/users/tutorials/beyond/index.rst deleted
| 1 | -.. _sec_beyond: | |
| 2 | - | |
| 3 | -Beyond the first steps | |
| 4 | ----------------------- | |
| 5 | - | |
| 6 | -Now that you are familiar with the ctools basics, here are some sections | |
| 7 | -to read if you intend to do more complex analyses. | |
| 8 | -Once you have gone through these sections you should have a pretty complete | |
| 9 | -picture about the capabilities of ctools. | |
| 10 | -And you should be ready for doing your own cutting edge CTA science data | |
| 11 | -analyses. | |
| 12 | - | |
| 13 | -.. toctree:: | |
| 14 | - :maxdepth: 1 | |
| 15 | - | |
| 16 | - combining-observations | |
| 17 | - stacked-analysis | |
| 18 | - beyond_tsmap | |
| 19 | - advanced-python-fitting | |
| 20 | - beyond_irf | |
| 21 | - beyond_model |
doc/source/users/tutorials/beyond/tsmap-crab.png deleted
73.4 KB
doc/source/users/tutorials/beyond/advanced-python-fitting.ipynb renamed to doc/source/users/tutorials/howto/howto_advanced_python_fitting.ipynb
| ... | ... | @@ -4,7 +4,7 @@ |
| 4 | 4 | "cell_type": "markdown", |
| 5 | 5 | "metadata": {}, |
| 6 | 6 | "source": [ |
| 7 | - "# Advanced model manipulation and fitting in Python" | |
| 7 | + "# How to do advanced model manipulation and fitting in Python?" | |
| 8 | 8 | ] |
| 9 | 9 | }, |
| 10 | 10 | { |
| ... | ... | @@ -20,7 +20,7 @@ |
| 20 | 20 | "source": [ |
| 21 | 21 | "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", |
| 22 | 22 | "\n", |
| 23 | - "As usual we start by importing the gammalib, ctools, and cscripts Python modules." | |
| 23 | + "As usual start by importing the gammalib, ctools, and cscripts Python modules." | |
| 24 | 24 | ] |
| 25 | 25 | }, |
| 26 | 26 | { |
| ... | ... | @@ -38,7 +38,7 @@ |
| 38 | 38 | "cell_type": "markdown", |
| 39 | 39 | "metadata": {}, |
| 40 | 40 | "source": [ |
| 41 | - "For this tutorial we will also use the matplotlib package for plotting." | |
| 41 | + "Now import the matplotlib package for plotting." | |
| 42 | 42 | ] |
| 43 | 43 | }, |
| 44 | 44 | { |
| ... | ... | @@ -57,7 +57,7 @@ |
| 57 | 57 | "source": [ |
| 58 | 58 | "## Simulated dataset\n", |
| 59 | 59 | "\n", |
| 60 | - "For the tutorial we will simulate a small dataset. We start by defining the Instrument Response Function and energy range that we will use all along." | |
| 60 | + "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." | |
| 61 | 61 | ] |
| 62 | 62 | }, |
| 63 | 63 | { |
| ... | ... | @@ -76,7 +76,7 @@ |
| 76 | 76 | "cell_type": "markdown", |
| 77 | 77 | "metadata": {}, |
| 78 | 78 | "source": [ |
| 79 | - "Now we 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." | |
| 79 | + "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." | |
| 80 | 80 | ] |
| 81 | 81 | }, |
| 82 | 82 | { |
| ... | ... | @@ -105,9 +105,9 @@ |
| 105 | 105 | "cell_type": "markdown", |
| 106 | 106 | "metadata": {}, |
| 107 | 107 | "source": [ |
| 108 | - "We 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 of observation definition XML file.\n", | |
| 108 | + "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", | |
| 109 | 109 | "\n", |
| 110 | - "We will peek at the simulated dataset by displaying a skymap." | |
| 110 | + "Let's first peek at the simulated dataset by displaying a skymap." | |
| 111 | 111 | ] |
| 112 | 112 | }, |
| 113 | 113 | { |
| ... | ... | @@ -150,7 +150,7 @@ |
| 150 | 150 | } |
| 151 | 151 | ], |
| 152 | 152 | "source": [ |
| 153 | - "# We slightly smooth the map for display to suppress statistical fluctuations\n", | |
| 153 | + "# Slightly smooth the map for display to suppress statistical fluctuations\n", | |
| 154 | 154 | "skymap.skymap().smooth('GAUSSIAN',0.02)\n", |
| 155 | 155 | "\n", |
| 156 | 156 | "from matplotlib.colors import SymLogNorm\n", |
| ... | ... | @@ -174,7 +174,7 @@ |
| 174 | 174 | "source": [ |
| 175 | 175 | "## Model fitting and residual inspection\n", |
| 176 | 176 | "\n", |
| 177 | - "First, we will fit the usual Crab model to the data. We will be using a 3D unbinned analysis." | |
| 177 | + "First, fit the usual Crab model to the data using a 3D unbinned analysis." | |
| 178 | 178 | ] |
| 179 | 179 | }, |
| 180 | 180 | { |
| ... | ... | @@ -195,7 +195,7 @@ |
| 195 | 195 | "cell_type": "markdown", |
| 196 | 196 | "metadata": {}, |
| 197 | 197 | "source": [ |
| 198 | - "As usual it is wise to look at the output from the optimizer. We will also store the best-fit minus log-likelihood value for later usage." | |
| 198 | + "As usual it is wise to look at the output from the optimizer. Store the best-fit minus log-likelihood value for later usage." | |
| 199 | 199 | ] |
| 200 | 200 | }, |
| 201 | 201 | { |
| ... | ... | @@ -286,7 +286,7 @@ |
| 286 | 286 | "source": [ |
| 287 | 287 | "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", |
| 288 | 288 | "\n", |
| 289 | - "To assess whether the model reproduces well the data spatially we will calculate a residual map." | |
| 289 | + "To assess whether the model reproduces well the data spatially generate a residual map." | |
| 290 | 290 | ] |
| 291 | 291 | }, |
| 292 | 292 | { |
| ... | ... | @@ -313,7 +313,7 @@ |
| 313 | 313 | "cell_type": "markdown", |
| 314 | 314 | "metadata": {}, |
| 315 | 315 | "source": [ |
| 316 | - "We will be inspecting several of these residual maps along the tutorial, so we define a function to plot them, and apply it to our latest run." | |
| 316 | + "To easily inspecting the residual maps along the tutorial, define a function to plot them, and apply it to the latest run." | |
| 317 | 317 | ] |
| 318 | 318 | }, |
| 319 | 319 | { |
| ... | ... | @@ -323,15 +323,15 @@ |
| 323 | 323 | "outputs": [], |
| 324 | 324 | "source": [ |
| 325 | 325 | "def plot_residuals(resid):\n", |
| 326 | - " # We slightly smooth the map for display to suppress statistical fluctuations\n", | |
| 326 | + " # Slightly smooth the map for display to suppress statistical fluctuations\n", | |
| 327 | 327 | " resid.smooth('GAUSSIAN',0.04)\n", |
| 328 | - " #plotting\n", | |
| 328 | + " # Plotting\n", | |
| 329 | 329 | " fig = plt.figure()\n", |
| 330 | 330 | " ax = plt.subplot()\n", |
| 331 | 331 | " plt.imshow(resid.array(),origin='lower',\n", |
| 332 | 332 | " cmap='bwr',vmin=-3,vmax=3,\n", |
| 333 | 333 | " extent=[83.63+0.02*20,83.63-0.02*20,22.01-0.02*20,22.01+0.02*20])\n", |
| 334 | - " # boundaries of the coord grid\n", | |
| 334 | + " # Boundaries of the coord grid\n", | |
| 335 | 335 | " ax.set_xlabel('R.A. (deg)')\n", |
| 336 | 336 | " ax.set_ylabel('Dec (deg)')\n", |
| 337 | 337 | " cbar = plt.colorbar()\n", |
| ... | ... | @@ -364,7 +364,7 @@ |
| 364 | 364 | "source": [ |
| 365 | 365 | "## Adding model components\n", |
| 366 | 366 | "\n", |
| 367 | - "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 we will add a point source at the position that we can guess from the residual map." | |
| 367 | + "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." | |
| 368 | 368 | ] |
| 369 | 369 | }, |
| 370 | 370 | { |
| ... | ... | @@ -382,13 +382,13 @@ |
| 382 | 382 | "cell_type": "markdown", |
| 383 | 383 | "metadata": {}, |
| 384 | 384 | "source": [ |
| 385 | - "We have defined a sky model object that has three components:\n", | |
| 385 | + "You have defined a sky model object that has three components:\n", | |
| 386 | 386 | "\n", |
| 387 | 387 | "- a spatial model, which is a point source at the position guessed from the residual map;\n", |
| 388 | 388 | "- a spectral model which is a power law with spectral index 2, and a flux which approximately 1/10 of the Crab nebula;\n", |
| 389 | 389 | "- a temporal model which is a constant.\n", |
| 390 | 390 | "\n", |
| 391 | - "We will name this source Src1, and free its position (fixed by default when a new source is created), so that we can fit it to the data." | |
| 391 | + "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:" | |
| 392 | 392 | ] |
| 393 | 393 | }, |
| 394 | 394 | { |
| ... | ... | @@ -406,7 +406,7 @@ |
| 406 | 406 | "cell_type": "markdown", |
| 407 | 407 | "metadata": {}, |
| 408 | 408 | "source": [ |
| 409 | - "Finally we append the new source to the model" | |
| 409 | + "Finally append the new source to the model container" | |
| 410 | 410 | ] |
| 411 | 411 | }, |
| 412 | 412 | { |
| ... | ... | @@ -433,7 +433,7 @@ |
| 433 | 433 | "cell_type": "markdown", |
| 434 | 434 | "metadata": {}, |
| 435 | 435 | "source": [ |
| 436 | - "and we fit the model including the new source to the data." | |
| 436 | + "and fit the model including the new source to the data." | |
| 437 | 437 | ] |
| 438 | 438 | }, |
| 439 | 439 | { |
| ... | ... | @@ -449,7 +449,7 @@ |
| 449 | 449 | "cell_type": "markdown", |
| 450 | 450 | "metadata": {}, |
| 451 | 451 | "source": [ |
| 452 | - "Does the addition of the new source provide a better fit to the data? We can quantify this using the test statistic (TS) given by twice the log-likelihood difference." | |
| 452 | + "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." | |
| 453 | 453 | ] |
| 454 | 454 | }, |
| 455 | 455 | { |
| ... | ... | @@ -475,9 +475,9 @@ |
| 475 | 475 | "cell_type": "markdown", |
| 476 | 476 | "metadata": {}, |
| 477 | 477 | "source": [ |
| 478 | - "TS is expected to be distributed as a $\\chi^2$ 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$ 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", | |
| 478 | + "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", | |
| 479 | 479 | "\n", |
| 480 | - "To make sure the new source improves the data/model agreement we will look again at the residual map." | |
| 480 | + "To make sure the new source improves the data/model agreement look again at the residual map." | |
| 481 | 481 | ] |
| 482 | 482 | }, |
| 483 | 483 | { |
| ... | ... | @@ -506,7 +506,7 @@ |
| 506 | 506 | "cell_type": "markdown", |
| 507 | 507 | "metadata": {}, |
| 508 | 508 | "source": [ |
| 509 | - "The addition of the new point source has flattened the spatial residuals, even though the fit is not perfect yet obviously. From now on we will fix the position of Scr1." | |
| 509 | + "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`." | |
| 510 | 510 | ] |
| 511 | 511 | }, |
| 512 | 512 | { |
| ... | ... | @@ -527,7 +527,7 @@ |
| 527 | 527 | "source": [ |
| 528 | 528 | "## Modifying the spectral models\n", |
| 529 | 529 | "\n", |
| 530 | - "Next we will check if the model agrees well with the data at all energies. We will start by defining a function to make and plot residual maps in separate energy ranges." | |
| 530 | + "Next check if the model agrees well with the data at all energies. Start by defining a function to make and plot residual maps in separate energy ranges." | |
| 531 | 531 | ] |
| 532 | 532 | }, |
| 533 | 533 | { |
| ... | ... | @@ -583,15 +583,15 @@ |
| 583 | 583 | ], |
| 584 | 584 | "source": [ |
| 585 | 585 | "resmap_erange([[emin,1.],\n", |
| 586 | - " [1.,10.],\n", | |
| 587 | - " [10.,emax]])" | |
| 586 | + " [1.,10.],\n", | |
| 587 | + " [10.,emax]])" | |
| 588 | 588 | ] |
| 589 | 589 | }, |
| 590 | 590 | { |
| 591 | 591 | "cell_type": "markdown", |
| 592 | 592 | "metadata": {}, |
| 593 | 593 | "source": [ |
| 594 | - "The most obvious problem is a negative residual cluster at the position of the Crab nebula at the highest energies. We will change the spectral model of the crab nebula and test if this improves the fit. We will use an exponentially cutoff power-law rather than a simple power law. We will use as starting values for the Prefactor and Index the current best-fit values and tentatively set the cutoff energy at 1 TeV." | |
| 594 | + "The most obvious problem is a negative residual cluster at the position of the Crab nebula at the highest energies. Change the spectral model of the Crab nebula and test if this improves the fit. 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." | |
| 595 | 595 | ] |
| 596 | 596 | }, |
| 597 | 597 | { |
| ... | ... | @@ -613,7 +613,7 @@ |
| 613 | 613 | "cell_type": "markdown", |
| 614 | 614 | "metadata": {}, |
| 615 | 615 | "source": [ |
| 616 | - "We will now fit the modified model to the data" | |
| 616 | + "Now fit the modified model to the data" | |
| 617 | 617 | ] |
| 618 | 618 | }, |
| 619 | 619 | { |
| ... | ... | @@ -629,7 +629,7 @@ |
| 629 | 629 | "cell_type": "markdown", |
| 630 | 630 | "metadata": {}, |
| 631 | 631 | "source": [ |
| 632 | - "and use TS to quantify the model improvement (in this case we have only one additional degree of freedom, the ctuoff energy)." | |
| 632 | + "and use TS to quantify the model improvement (in this case there is only one additional degree of freedom, the ctuoff energy)." | |
| 633 | 633 | ] |
| 634 | 634 | }, |
| 635 | 635 | { |
| ... | ... | @@ -696,7 +696,7 @@ |
| 696 | 696 | "cell_type": "markdown", |
| 697 | 697 | "metadata": {}, |
| 698 | 698 | "source": [ |
| 699 | - "The best-fit cutoff energy is 3.3 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.83. We will check the residual maps again to make sure." | |
| 699 | + "The best-fit cutoff energy is 3.3 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.83. Check the residual maps again to make sure that the residuals are reduced." | |
| 700 | 700 | ] |
| 701 | 701 | }, |
| 702 | 702 | { |
| ... | ... | @@ -737,15 +737,15 @@ |
| 737 | 737 | ], |
| 738 | 738 | "source": [ |
| 739 | 739 | "resmap_erange([[emin,1.],\n", |
| 740 | - " [1.,10.],\n", | |
| 741 | - " [10.,emax]])" | |
| 740 | + " [1.,10.],\n", | |
| 741 | + " [10.,emax]])" | |
| 742 | 742 | ] |
| 743 | 743 | }, |
| 744 | 744 | { |
| 745 | 745 | "cell_type": "markdown", |
| 746 | 746 | "metadata": {}, |
| 747 | 747 | "source": [ |
| 748 | - "Now we 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? We will test if the addition of a power-law spectral component with a hard index (2). It will be added to the exponentially-cutoff power law in a composite spectral model." | |
| 748 | + "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." | |
| 749 | 749 | ] |
| 750 | 750 | }, |
| 751 | 751 | { |
| ... | ... | @@ -793,7 +793,7 @@ |
| 793 | 793 | "cell_type": "markdown", |
| 794 | 794 | "metadata": {}, |
| 795 | 795 | "source": [ |
| 796 | - "The likelihood improvement is again significant, but did we already find the best possible model of the sky?" | |
| 796 | + "The likelihood improvement is again significant, but is this the best possible model of the sky?" | |
| 797 | 797 | ] |
| 798 | 798 | }, |
| 799 | 799 | { | ... | ... |
doc/source/users/tutorials/beyond/combining-observations.ipynb renamed to doc/source/users/tutorials/howto/howto_combine_observations.ipynb
| ... | ... | @@ -4,7 +4,7 @@ |
| 4 | 4 | "cell_type": "markdown", |
| 5 | 5 | "metadata": {}, |
| 6 | 6 | "source": [ |
| 7 | - "# Combining observations" | |
| 7 | + "# How to combine observations?" | |
| 8 | 8 | ] |
| 9 | 9 | }, |
| 10 | 10 | { |
| ... | ... | @@ -133,7 +133,7 @@ |
| 133 | 133 | "cell_type": "markdown", |
| 134 | 134 | "metadata": {}, |
| 135 | 135 | "source": [ |
| 136 | - "The file contains a single `observation_list` tag that contains two observation tags that each define an observation. Each observation has a `name`, an `id` and an `instrument` attribute. The name attribute can have any arbitrary value, and may be the same for all observations. However, **the id attribute needs to be a unique character string for any given instrument**. The instrument attribute is a case-sensitive string that identifies the instrument with which the observation was taken. Please make sure that the instrument string is set correctly so that ctools knows which instrument specific functions need to be called.\n", | |
| 136 | + "The file contains a single `observation_list` tag that contains two `observation` tags that each define an observation. Each observation has a `name`, an `id` and an `instrument` attribute. The name attribute can have any arbitrary value, and may be the same for all observations. However, **the id attribute needs to be a unique character string for any given instrument**. The instrument attribute is a case-sensitive string that identifies the instrument with which the observation was taken. Please make sure that the instrument string is set correctly so that ctools knows which instrument specific functions need to be called.\n", | |
| 137 | 137 | "\n", |
| 138 | 138 | "**Note:** the instrument string for a CTA observation is unsurprisingly `CTA`. In case that you want to analyse data from an existing Imaging Air Cherenkov Telescope you can also set the instrument string to HESS, MAGIC, or VERITAS. You may also combine observations from different telescopes for a joint analysis in an observation definition file. Please recall that instrument strings are case sensitive.\n", |
| 139 | 139 | "\n", | ... | ... |
doc/source/users/tutorials/beyond/beyond_irf.rst renamed to doc/source/users/tutorials/howto/howto_connect_irfs.rst
| 1 | -.. _sec_connecting_irf: | |
| 1 | +.. _howto_connect_irfs: | |
| 2 | + | |
| 3 | +How to connect observations to dedicated instrument response functions? | |
| 4 | +----------------------------------------------------------------------- | |
| 5 | + | |
| 6 | + .. admonition:: What you will learn | |
| 7 | + | |
| 8 | + You will learn how to **connect individual observations to dedicated | |
| 9 | + Instrument Response Functions**. | |
| 2 | 10 | |
| 3 | -Connecting observations to dedicated instrument response functions | |
| 4 | -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| 5 | 11 | |
| 6 | 12 | So far you used the same instrument response function for all observations. |
| 7 | 13 | You always specified the calibration database ``prod2`` and the instrument | ... | ... |
doc/source/users/tutorials/beyond/resmap-bkg.png renamed to doc/source/users/tutorials/howto/howto_connect_models.png
261 KB
doc/source/users/tutorials/beyond/beyond_model.rst renamed to doc/source/users/tutorials/howto/howto_connect_models.rst
| 1 | -.. _sec_connecting_model: | |
| 1 | +.. _howto_connect_models: | |
| 2 | 2 | |
| 3 | -Connecting observations to specific models | |
| 4 | -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| 3 | +How to connecting observations to specific models? | |
| 4 | +-------------------------------------------------- | |
| 5 | + | |
| 6 | + .. admonition:: What you will learn | |
| 7 | + | |
| 8 | + You will learn how to **connect individual observations to specific | |
| 9 | + model components**. | |
| 5 | 10 | |
| 6 | 11 | In the previous examples there was always a single background model |
| 7 | 12 | component to describe the residual particle background in the |
| ... | ... | @@ -68,7 +73,6 @@ tied to the ``events2.fits`` file. |
| 68 | 73 | </source_library> |
| 69 | 74 | |
| 70 | 75 | .. note:: |
| 71 | - | |
| 72 | 76 | **Model components in a XML file need to have a unique name.** |
| 73 | 77 | For this reason the components are named here ``Background_00001`` |
| 74 | 78 | and ``Background_00002``. |
| ... | ... | @@ -86,7 +90,7 @@ Obviously, the upper observation has larger residuals owing to the ten |
| 86 | 90 | times larger background rate that was used in the simulation of the |
| 87 | 91 | associated data. |
| 88 | 92 | |
| 89 | -.. figure:: resmap-bkg.png | |
| 93 | +.. figure:: howto_connect_models.png | |
| 90 | 94 | :height: 400px |
| 91 | 95 | :align: center |
| 92 | 96 | |
| ... | ... | @@ -128,8 +132,3 @@ This is illustrated in the model definition file below where component |
| 128 | 132 | </spectrum> |
| 129 | 133 | </source> |
| 130 | 134 | </source_library> |
| 131 | - | |
| 132 | - | |
| 133 | - | |
| 134 | - | |
| 135 | - | ... | ... |
doc/source/users/tutorials/howto/howto_display.rst
| ... | ... | @@ -21,21 +21,27 @@ included in the ctools package that rely on the |
| 21 | 21 | Python module. You can find these scripts in the |
| 22 | 22 | ``$CTOOLS/share/examples/python`` folder. The following scripts are available: |
| 23 | 23 | |
| 24 | - +------------------------+-----------------------------+ | |
| 25 | - | Script | Usage | | |
| 26 | - +========================+=============================+ | |
| 27 | - | ``show_butterfly.py`` | Display a butterfly diagram | | |
| 28 | - +------------------------+-----------------------------+ | |
| 29 | - | ``show_lightcurve.py`` | Display a light curve | | |
| 30 | - +------------------------+-----------------------------+ | |
| 31 | - | ``show_obs.py`` | Display observation summary | | |
| 32 | - +------------------------+-----------------------------+ | |
| 33 | - | ``show_pointings.py`` | Display pointing directions | | |
| 34 | - +------------------------+-----------------------------+ | |
| 35 | - | ``show_phases.py`` | Display event phases | | |
| 36 | - +------------------------+-----------------------------+ | |
| 37 | - | ``show_spectrum.py`` | Display a spectrum | | |
| 38 | - +------------------------+-----------------------------+ | |
| 24 | + +------------------------+--------------------------------------+ | |
| 25 | + | Script | Usage | | |
| 26 | + +========================+======================================+ | |
| 27 | + | ``show_butterfly.py`` | Display a butterfly diagram | | |
| 28 | + +------------------------+--------------------------------------+ | |
| 29 | + | ``show_irf.py`` | Display Instrument Response Function | | |
| 30 | + +------------------------+--------------------------------------+ | |
| 31 | + | ``show_lightcurve.py`` | Display a light curve | | |
| 32 | + +------------------------+--------------------------------------+ | |
| 33 | + | ``show_obs.py`` | Display observation summary | | |
| 34 | + +------------------------+--------------------------------------+ | |
| 35 | + | ``show_phases.py`` | Display event phases | | |
| 36 | + +------------------------+--------------------------------------+ | |
| 37 | + | ``show_pointings.py`` | Display pointing directions | | |
| 38 | + +------------------------+--------------------------------------+ | |
| 39 | + | ``show_residuals.py`` | Display spectral residuals | | |
| 40 | + +------------------------+--------------------------------------+ | |
| 41 | + | ``show_spectrum.py`` | Display a spectrum | | |
| 42 | + +------------------------+--------------------------------------+ | |
| 43 | + | |
| 44 | +**Do not hesitate to copy and adapt these scripts to your needs.** | |
| 39 | 45 | |
| 40 | 46 | Below some usage examples and the expected output. |
| 41 | 47 | |
| ... | ... | @@ -44,7 +50,7 @@ show_butterfly.py |
| 44 | 50 | |
| 45 | 51 | .. code-block:: bash |
| 46 | 52 | |
| 47 | - $ $CTOOLS/share/examples/python/show_butterfly.py butterfly_src001.txt | |
| 53 | + $ $CTOOLS/share/examples/python/show_butterfly.py butterfly.txt | |
| 48 | 54 | |
| 49 | 55 | .. figure:: howto_display_butterfly.png |
| 50 | 56 | :width: 600px |
| ... | ... | @@ -53,6 +59,20 @@ show_butterfly.py |
| 53 | 59 | *Butterfly diagram displayed with show_butterfly.py* |
| 54 | 60 | |
| 55 | 61 | |
| 62 | +show_irf.py | |
| 63 | +^^^^^^^^^^^ | |
| 64 | + | |
| 65 | +.. code-block:: bash | |
| 66 | + | |
| 67 | + $ $CTOOLS/share/examples/python/show_irf.py prod2 South_50h | |
| 68 | + | |
| 69 | +.. figure:: howto_display_irf.png | |
| 70 | + :width: 800px | |
| 71 | + :align: center | |
| 72 | + | |
| 73 | + *Instrument Response Function displayed with show_irf.py* | |
| 74 | + | |
| 75 | + | |
| 56 | 76 | show_lightcurve.py |
| 57 | 77 | ^^^^^^^^^^^^^^^^^^ |
| 58 | 78 | |
| ... | ... | @@ -72,7 +92,7 @@ show_obs.py |
| 72 | 92 | |
| 73 | 93 | .. code-block:: bash |
| 74 | 94 | |
| 75 | - $ $CTOOLS/share/examples/python/show_obs.py obs_selected.xml | |
| 95 | + $ $CTOOLS/share/examples/python/show_obs.py obs.xml | |
| 76 | 96 | |
| 77 | 97 | .. figure:: howto_display_obs.png |
| 78 | 98 | :width: 600px |
| ... | ... | @@ -81,32 +101,46 @@ show_obs.py |
| 81 | 101 | *Observation summary displayed with show_obs.py* |
| 82 | 102 | |
| 83 | 103 | |
| 104 | +show_phases.py | |
| 105 | +^^^^^^^^^^^^^^ | |
| 106 | + | |
| 107 | +.. code-block:: bash | |
| 108 | + | |
| 109 | + $ $CTOOLS/share/examples/python/show_phases.py -n 50 events_phased.fits | |
| 110 | + | |
| 111 | +.. figure:: howto_display_phases.png | |
| 112 | + :width: 600px | |
| 113 | + :align: center | |
| 114 | + | |
| 115 | + *Event phases displayed with show_phases.py* | |
| 116 | + | |
| 117 | + | |
| 84 | 118 | show_pointings.py |
| 85 | 119 | ^^^^^^^^^^^^^^^^^ |
| 86 | 120 | |
| 87 | 121 | .. code-block:: bash |
| 88 | 122 | |
| 89 | - $ $CTOOLS/share/examples/python/show_pointings.py obs_selected.xml | |
| 123 | + $ $CTOOLS/share/examples/python/show_pointings.py obs.xml | |
| 90 | 124 | |
| 91 | 125 | .. figure:: howto_display_pointings.png |
| 92 | 126 | :width: 600px |
| 93 | 127 | :align: center |
| 94 | 128 | |
| 95 | - *Observation summary displayed with show_pointings.py (zoomed in)* | |
| 129 | + *Pointings displayed with show_pointings.py (zoomed in)* | |
| 96 | 130 | |
| 97 | 131 | |
| 98 | -show_phases.py | |
| 99 | -^^^^^^^^^^^^^^ | |
| 132 | +show_residuals.py | |
| 133 | +^^^^^^^^^^^^^^^^^ | |
| 100 | 134 | |
| 101 | 135 | .. code-block:: bash |
| 102 | 136 | |
| 103 | - $ $CTOOLS/share/examples/python/show_phases.py -n 50 events_phased.fits | |
| 137 | + $ $CTOOLS/share/examples/python/show_residuals.py residual.fits | |
| 104 | 138 | |
| 105 | -.. figure:: howto_display_phases.png | |
| 139 | +.. figure:: howto_display_residuals.png | |
| 106 | 140 | :width: 600px |
| 107 | 141 | :align: center |
| 108 | 142 | |
| 109 | - *Event phases displayed with show_phases.py* | |
| 143 | + *Spectral residuals displayed with show_residuals.py* | |
| 110 | 144 | |
| 111 | 145 | |
| 112 | 146 | show_spectrum.py |
| ... | ... | @@ -114,12 +148,10 @@ show_spectrum.py |
| 114 | 148 | |
| 115 | 149 | .. code-block:: bash |
| 116 | 150 | |
| 117 | - $ $CTOOLS/share/examples/python/show_spectrum.py spectrum_src001.fits | |
| 151 | + $ $CTOOLS/share/examples/python/show_spectrum.py spectrum.fits | |
| 118 | 152 | |
| 119 | 153 | .. figure:: howto_display_spectrum.png |
| 120 | 154 | :width: 600px |
| 121 | 155 | :align: center |
| 122 | 156 | |
| 123 | - *Observation summary displayed with show_spectrum.py* | |
| 124 | - | |
| 125 | - | |
| 157 | + *Spectrum displayed with show_spectrum.py* | ... | ... |
doc/source/users/tutorials/howto/howto_display_irf.png
0 → 100644
147 KB
doc/source/users/tutorials/howto/howto_display_residuals.png
0 → 100644
35.4 KB
doc/source/users/tutorials/beyond/stacked-analysis.ipynb renamed to doc/source/users/tutorials/howto/howto_stacked_analysis.ipynb
| ... | ... | @@ -4,7 +4,7 @@ |
| 4 | 4 | "cell_type": "markdown", |
| 5 | 5 | "metadata": {}, |
| 6 | 6 | "source": [ |
| 7 | - "# Performing a stacked analysis" | |
| 7 | + "# How to perform a stacked analysis?" | |
| 8 | 8 | ] |
| 9 | 9 | }, |
| 10 | 10 | { |
| ... | ... | @@ -38,7 +38,7 @@ |
| 38 | 38 | "cell_type": "markdown", |
| 39 | 39 | "metadata": {}, |
| 40 | 40 | "source": [ |
| 41 | - "The data and observation definition XML file obs.xml used here are those produced in the previous tutorial **Combining observations**.\n", | |
| 41 | + "The data and observation definition XML file `obs.xml` used here are those produced in the previous tutorial [How to combine observations?](howto_combine_observations.ipynb)\n", | |
| 42 | 42 | "\n", |
| 43 | 43 | "## Stacking Events\n", |
| 44 | 44 | "\n", |
| ... | ... | @@ -215,7 +215,7 @@ |
| 215 | 215 | "cell_type": "markdown", |
| 216 | 216 | "metadata": {}, |
| 217 | 217 | "source": [ |
| 218 | - "The Crab source component is the same that is also present in `$CTOOLS/share/models/crab.xml` and is not modified. The background component, however, has been replaced by a model of type \"CTACubeBackground\". This model is a 3-dimensional data cube that describes the expected background rate as function of spatial position and energy. The data cube is multiplied by a power law spectrum that allows to adjust the normalization and slope of the background spectrum in the fit. This power law could be replaced by any spectral model that is found as an appropriate multiplicator to the background cube.\n", | |
| 218 | + "The Crab source component is the same that is also present in `$CTOOLS/share/models/crab.xml` and is not modified. The background component, however, has been replaced by a model of type `CTACubeBackground`. This model is a 3-dimensional data cube that describes the expected background rate as function of spatial position and energy. The data cube is multiplied by a power law spectrum that allows to adjust the normalization and slope of the background spectrum in the fit. This power law could be replaced by any spectral model that is found as an appropriate multiplicator to the background cube.\n", | |
| 219 | 219 | "\n", |
| 220 | 220 | "**There is no constraint on providing the same spatial binning or the same energy binning for an exposure cube, a PSF cube, an energy dispersion cube, a background cube and a counts cube**. ctools interpolates internally all response cubes hence any arbitrary appropriate binning may be used. Using the same binning for the exposure cube, the background cube and the counts cube is only a convenience.\n", |
| 221 | 221 | "\n", | ... | ... |
doc/source/users/tutorials/howto/iact/high_level.rst
| ... | ... | @@ -266,7 +266,7 @@ In case a model cube can be provided, :ref:`csresmap` simply collapses both cube |
| 266 | 266 | Compute a test statistics (TS) map |
| 267 | 267 | ---------------------------------- |
| 268 | 268 | The test statistics quantity is a more precise measurement of statistic than the ``SUBDIVSQRT`` option in :ref:`csresmap`. |
| 269 | -To get familiar with the concept of this procedure, :ref:`read more about TS maps <sec_tsmap>`. | |
| 269 | +To get familiar with the concept of this procedure, :ref:`read more about TS maps <howto_ts>`. | |
| 270 | 270 | |
| 271 | 271 | .. code-block:: bash |
| 272 | 272 | ... | ... |
doc/source/users/tutorials/howto/index.rst
| 1 | 1 | .. _howto: |
| 2 | 2 | |
| 3 | -Analysis cookbook | |
| 4 | -================= | |
| 3 | +ctools How-tos | |
| 4 | +============== | |
| 5 | 5 | |
| 6 | 6 | The following sections teach you how to use ctools to address some typical |
| 7 | -science analysis. The sections provide examples that are based on the data | |
| 8 | -distributed within the CTA Consortium for the | |
| 9 | -:ref:`first CTA Data Challenge <glossary_1dc>`. | |
| 10 | -These examples can be easily adapted to any data you have at your disposal. | |
| 7 | +science analysis. | |
| 8 | + | |
| 9 | +CTA data analysis | |
| 10 | +----------------- | |
| 11 | 11 | |
| 12 | 12 | .. toctree:: |
| 13 | 13 | :maxdepth: 1 |
| 14 | 14 | |
| 15 | - howto_display | |
| 15 | + howto_combine_observations | |
| 16 | + howto_stacked_analysis | |
| 17 | + howto_advanced_python_fitting | |
| 18 | + howto_connect_irfs | |
| 19 | + howto_connect_models | |
| 16 | 20 | howto_ts |
| 17 | 21 | howto_tsmap |
| 18 | 22 | howto_extent |
| ... | ... | @@ -21,8 +25,13 @@ These examples can be easily adapted to any data you have at your disposal. |
| 21 | 25 | howto_lightcurve |
| 22 | 26 | howto_phasecurve |
| 23 | 27 | howto_exclude |
| 28 | + howto_display | |
| 24 | 29 | howto_vo |
| 25 | 30 | |
| 31 | + | |
| 32 | +Analysis of data from other instruments | |
| 33 | +--------------------------------------- | |
| 34 | + | |
| 26 | 35 | .. toctree:: |
| 27 | 36 | :maxdepth: 1 |
| 28 | 37 | ... | ... |
doc/source/users/tutorials/index.rst
doc/source/users/tutorials/notebooks.rst
| ... | ... | @@ -15,6 +15,6 @@ it on your computer. All notebooks are also available for download from |
| 15 | 15 | this page. |
| 16 | 16 | |
| 17 | 17 | * :download:`Using ctools from Python <quickstart/ctools-from-python.ipynb>` |
| 18 | -* :download:`Combining observations <beyond/combining-observations.ipynb>` | |
| 19 | -* :download:`Performing a stacked analysis <beyond/stacked-analysis.ipynb>` | |
| 20 | -* :download:`Advanced model manipulation and fitting in Python <beyond/advanced-python-fitting.ipynb>` | |
| 18 | +* :download:`Combining observations <howto/howto_combine_observations.ipynb>` | |
| 19 | +* :download:`Performing a stacked analysis <howto/howto_stacked_analysis.ipynb>` | |
| 20 | +* :download:`Advanced model manipulation and fitting in Python <howto/howto_advanced_python_fitting.ipynb>` | ... | ... |
doc/source/users/tutorials/quickstart/ctools-from-python.ipynb
| ... | ... | @@ -29,10 +29,8 @@ |
| 29 | 29 | }, |
| 30 | 30 | { |
| 31 | 31 | "cell_type": "code", |
| 32 | - "execution_count": 2, | |
| 33 | - "metadata": { | |
| 34 | - "collapsed": true | |
| 35 | - }, | |
| 32 | + "execution_count": 1, | |
| 33 | + "metadata": {}, | |
| 36 | 34 | "outputs": [], |
| 37 | 35 | "source": [ |
| 38 | 36 | "import gammalib\n", |
| ... | ... | @@ -51,24 +49,22 @@ |
| 51 | 49 | }, |
| 52 | 50 | { |
| 53 | 51 | "cell_type": "code", |
| 54 | - "execution_count": 3, | |
| 55 | - "metadata": { | |
| 56 | - "collapsed": true | |
| 57 | - }, | |
| 52 | + "execution_count": 2, | |
| 53 | + "metadata": {}, | |
| 58 | 54 | "outputs": [], |
| 59 | 55 | "source": [ |
| 60 | 56 | "sim = ctools.ctobssim()\n", |
| 61 | - "sim['inmodel'] = '${CTOOLS}/share/models/crab.xml'\n", | |
| 57 | + "sim['inmodel'] = '${CTOOLS}/share/models/crab.xml'\n", | |
| 62 | 58 | "sim['outevents'] = 'events.fits'\n", |
| 63 | - "sim['caldb'] = 'prod2'\n", | |
| 64 | - "sim['irf'] = 'South_0.5h'\n", | |
| 65 | - "sim['ra'] = 83.5\n", | |
| 66 | - "sim['dec'] = 22.8\n", | |
| 67 | - "sim['rad'] = 5.0\n", | |
| 68 | - "sim['tmin'] = '2020-01-01T00:00:00'\n", | |
| 69 | - "sim['tmax'] = '2020-01-01T01:00:00'\n", | |
| 70 | - "sim['emin'] = 0.03\n", | |
| 71 | - "sim['emax'] = 200.0\n", | |
| 59 | + "sim['caldb'] = 'prod2'\n", | |
| 60 | + "sim['irf'] = 'South_0.5h'\n", | |
| 61 | + "sim['ra'] = 83.5\n", | |
| 62 | + "sim['dec'] = 22.8\n", | |
| 63 | + "sim['rad'] = 5.0\n", | |
| 64 | + "sim['tmin'] = '2020-01-01T00:00:00'\n", | |
| 65 | + "sim['tmax'] = '2020-01-01T01:00:00'\n", | |
| 66 | + "sim['emin'] = 0.03\n", | |
| 67 | + "sim['emax'] = 150.0\n", | |
| 72 | 68 | "sim.execute()" |
| 73 | 69 | ] |
| 74 | 70 | }, |
| ... | ... | @@ -83,7 +79,7 @@ |
| 83 | 79 | }, |
| 84 | 80 | { |
| 85 | 81 | "cell_type": "code", |
| 86 | - "execution_count": 4, | |
| 82 | + "execution_count": 3, | |
| 87 | 83 | "metadata": {}, |
| 88 | 84 | "outputs": [ |
| 89 | 85 | { |
| ... | ... | @@ -112,7 +108,7 @@ |
| 112 | 108 | "provided by the hidden seed parameter. Changing this parameter for\r\n", |
| 113 | 109 | "subsequent runs will lead to different event samples.\r\n", |
| 114 | 110 | "\r\n", |
| 115 | - "ctobssim performs a safety check on the maximum photon rate for all model \r\n", | |
| 111 | + "ctobssim performs a safety check on the maximum photon rate for all model\r\n", | |
| 116 | 112 | "components to avoid that the tool locks up and requests huge memory \r\n", |
| 117 | 113 | "resources, which may happen if a mistake was made in setting up the input \r\n", |
| 118 | 114 | "model (for example if an error in the flux units is made). The maximum allowed\r\n", |
| ... | ... | @@ -140,19 +136,19 @@ |
| 140 | 136 | "\r\n", |
| 141 | 137 | "inmodel [file]\r\n", |
| 142 | 138 | " Input model XML file.\r\n", |
| 143 | - " \t \t \r\n", | |
| 139 | + "\r\n", | |
| 144 | 140 | "caldb [string]\r\n", |
| 145 | 141 | " Calibration database.\r\n", |
| 146 | - " \t \t \r\n", | |
| 142 | + "\r\n", | |
| 147 | 143 | "irf [string]\r\n", |
| 148 | 144 | " Instrumental response function.\r\n", |
| 149 | - " \t \t \r\n", | |
| 145 | + "\r\n", | |
| 150 | 146 | "(edisp = no) [boolean]\r\n", |
| 151 | 147 | " Apply energy dispersion?\r\n", |
| 152 | - " \t \t \r\n", | |
| 148 | + "\r\n", | |
| 153 | 149 | "outevents [file]\r\n", |
| 154 | 150 | " Output event list or observation definition XML file.\r\n", |
| 155 | - " \t \t \r\n", | |
| 151 | + "\r\n", | |
| 156 | 152 | "(prefix = sim_events_) [string]\r\n", |
| 157 | 153 | " Prefix for event list in observation definition XML file.\r\n", |
| 158 | 154 | "\r\n", |
| ... | ... | @@ -164,28 +160,29 @@ |
| 164 | 160 | " parameter at the same value for repeatable simulations, or increment \r\n", |
| 165 | 161 | " this value for subsequent runs if non-repeatable simulations are\r\n", |
| 166 | 162 | " required.\r\n", |
| 167 | - " \t \t \r\n", | |
| 163 | + "\r\n", | |
| 168 | 164 | "ra [real]\r\n", |
| 169 | 165 | " Right Ascension of CTA pointing (J2000, in degrees).\r\n", |
| 170 | - " \t \t \r\n", | |
| 166 | + "\r\n", | |
| 171 | 167 | "dec [real]\r\n", |
| 172 | 168 | " Declination of CTA pointing (J2000, in degrees).\r\n", |
| 173 | - " \t \t \r\n", | |
| 169 | + "\r\n", | |
| 174 | 170 | "rad [real]\r\n", |
| 175 | 171 | " Radius of CTA field of view (simulation cone radius) (in degrees).\r\n", |
| 176 | - " \t \t \r\n", | |
| 172 | + "\r\n", | |
| 177 | 173 | "tmin [time]\r\n", |
| 178 | 174 | " Start time (UTC string, JD, MJD or MET in seconds).\r\n", |
| 179 | - " \t \t \r\n", | |
| 175 | + "\r\n", | |
| 180 | 176 | "tmax [time]\r\n", |
| 181 | 177 | " Stop time (UTC string, JD, MJD or MET in seconds).\r\n", |
| 178 | + "\r", | |
| 182 | 179 | "\r\n", |
| 183 | 180 | "emin [real]\r\n", |
| 184 | 181 | " Lower energy limit of simulated events (in TeV).\r\n", |
| 185 | - " \t \t \r\n", | |
| 182 | + "\r\n", | |
| 186 | 183 | "emax [real]\r\n", |
| 187 | 184 | " Upper energy limit of simulated events (in TeV).\r\n", |
| 188 | - " \t \t \r\n", | |
| 185 | + "\r\n", | |
| 189 | 186 | "(deadc = 0.95) [real]\r\n", |
| 190 | 187 | " Average deadtime correction factor.\r\n", |
| 191 | 188 | "\r\n", |
| ... | ... | @@ -206,23 +203,23 @@ |
| 206 | 203 | "(chatter = 2) [integer]\r\n", |
| 207 | 204 | " Verbosity of the executable:\r\n", |
| 208 | 205 | " chatter = 0: no information will be logged\r\n", |
| 209 | - " \r\n", | |
| 206 | + "\r\n", | |
| 210 | 207 | " chatter = 1: only errors will be logged\r\n", |
| 211 | - " \r\n", | |
| 208 | + "\r\n", | |
| 212 | 209 | " chatter = 2: errors and actions will be logged\r\n", |
| 213 | - " \r\n", | |
| 210 | + "\r\n", | |
| 214 | 211 | " chatter = 3: report about the task execution\r\n", |
| 215 | - " \r\n", | |
| 212 | + "\r\n", | |
| 216 | 213 | " chatter = 4: detailed report about the task execution\r\n", |
| 217 | - " \t \t \r\n", | |
| 214 | + "\r\n", | |
| 218 | 215 | "(clobber = yes) [boolean]\r\n", |
| 219 | 216 | " Specifies whether existing files should be overwritten.\r\n", |
| 220 | - " \t \t \r\n", | |
| 217 | + "\r\n", | |
| 221 | 218 | "(debug = no) [boolean]\r\n", |
| 222 | 219 | " Enables debug mode. In debug mode the executable will dump any log file output to the console.\r\n", |
| 223 | - " \t \t \r\n", | |
| 220 | + "\r\n", | |
| 224 | 221 | "(mode = ql) [string]\r\n", |
| 225 | - " Mode of automatic parameters (default is \"ql\", i.e. \"query and learn\").\r\n", | |
| 222 | + " Mode of automatic parameters (default is ql, i.e. \"query and learn\").\r\n", | |
| 226 | 223 | "\r\n", |
| 227 | 224 | "(logfile = ctobssim.log) [string]\r\n", |
| 228 | 225 | " Name of log file.\r\n", |
| ... | ... | @@ -250,10 +247,8 @@ |
| 250 | 247 | }, |
| 251 | 248 | { |
| 252 | 249 | "cell_type": "code", |
| 253 | - "execution_count": 5, | |
| 254 | - "metadata": { | |
| 255 | - "collapsed": true | |
| 256 | - }, | |
| 250 | + "execution_count": 4, | |
| 251 | + "metadata": {}, | |
| 257 | 252 | "outputs": [], |
| 258 | 253 | "source": [ |
| 259 | 254 | "sim.run()" |
| ... | ... | @@ -270,7 +265,7 @@ |
| 270 | 265 | }, |
| 271 | 266 | { |
| 272 | 267 | "cell_type": "code", |
| 273 | - "execution_count": 6, | |
| 268 | + "execution_count": 5, | |
| 274 | 269 | "metadata": {}, |
| 275 | 270 | "outputs": [ |
| 276 | 271 | { |
| ... | ... | @@ -280,7 +275,7 @@ |
| 280 | 275 | "=== GObservations ===\n", |
| 281 | 276 | " Number of observations ....: 1\n", |
| 282 | 277 | " Number of models ..........: 2\n", |
| 283 | - " Number of observed events .: 202766\n", | |
| 278 | + " Number of observed events .: 200741\n", | |
| 284 | 279 | " Number of predicted events : 0\n" |
| 285 | 280 | ] |
| 286 | 281 | } |
| ... | ... | @@ -298,7 +293,7 @@ |
| 298 | 293 | }, |
| 299 | 294 | { |
| 300 | 295 | "cell_type": "code", |
| 301 | - "execution_count": 7, | |
| 296 | + "execution_count": 6, | |
| 302 | 297 | "metadata": {}, |
| 303 | 298 | "outputs": [ |
| 304 | 299 | { |
| ... | ... | @@ -307,7 +302,7 @@ |
| 307 | 302 | "text": [ |
| 308 | 303 | "=== GCTAObservation ===\n", |
| 309 | 304 | " Name ......................: \n", |
| 310 | - " Identifier ................: \n", | |
| 305 | + " Identifier ................: 000001\n", | |
| 311 | 306 | " Instrument ................: CTA\n", |
| 312 | 307 | " Event file ................: events.fits\n", |
| 313 | 308 | " Event type ................: EventList\n", |
| ... | ... | @@ -317,7 +312,7 @@ |
| 317 | 312 | " Deadtime correction .......: 0.98\n", |
| 318 | 313 | " User energy range .........: undefined\n", |
| 319 | 314 | "=== GCTAPointing ===\n", |
| 320 | - " Pointing direction ........: (RA,Dec)=(83.63,22.01)\n", | |
| 315 | + " Pointing direction ........: (RA,Dec)=(83.5,22.8)\n", | |
| 321 | 316 | "=== GCTAResponseIrf ===\n", |
| 322 | 317 | " Caldb mission .............: cta\n", |
| 323 | 318 | " Caldb instrument ..........: prod2\n", |
| ... | ... | @@ -325,10 +320,12 @@ |
| 325 | 320 | " Energy dispersion .........: Not used\n", |
| 326 | 321 | " Save energy range .........: undefined\n", |
| 327 | 322 | "=== GCTAEventList ===\n", |
| 328 | - " Number of events ..........: 202766 (disposed in \"events.fits\")\n", | |
| 323 | + " Number of events ..........: 200741 (disposed in \"events.fits\")\n", | |
| 329 | 324 | " Time interval .............: 58849.0008007407 - 58849.0424674074 days\n", |
| 330 | - " Energy interval ...........: 0.03 - 200 TeV\n", | |
| 331 | - " Region of interest ........: RA=83.63, DEC=22.01 [0,0] Radius=5 deg\n" | |
| 325 | + " Energy interval ...........: 0.03 - 150 TeV\n", | |
| 326 | + " Region of interest ........: RA=83.5, DEC=22.8 [0,0] Radius=5 deg\n", | |
| 327 | + "=== GSkyRegions ===\n", | |
| 328 | + " Number of regions .........: 0\n" | |
| 332 | 329 | ] |
| 333 | 330 | } |
| 334 | 331 | ], |
| ... | ... | @@ -345,14 +342,14 @@ |
| 345 | 342 | }, |
| 346 | 343 | { |
| 347 | 344 | "cell_type": "code", |
| 348 | - "execution_count": 8, | |
| 345 | + "execution_count": 7, | |
| 349 | 346 | "metadata": {}, |
| 350 | 347 | "outputs": [ |
| 351 | 348 | { |
| 352 | 349 | "name": "stdout", |
| 353 | 350 | "output_type": "stream", |
| 354 | 351 | "text": [ |
| 355 | - "Dir=RA=83.6182556152344, DEC=22.2843074798584 [0.00478756989312195,-0.000189682185722814] Energy=63.157357275486 GeV Time=315532804.699509 s (TT)\n" | |
| 352 | + "Dir=RA=83.7821807861328, DEC=22.0288944244385 [-0.0134540141482956,0.00456559645656115] Energy=36.9588024914265 GeV Time=315532804.286922 s (TT)\n" | |
| 356 | 353 | ] |
| 357 | 354 | } |
| 358 | 355 | ], |
| ... | ... | @@ -371,14 +368,14 @@ |
| 371 | 368 | }, |
| 372 | 369 | { |
| 373 | 370 | "cell_type": "code", |
| 374 | - "execution_count": 9, | |
| 371 | + "execution_count": 8, | |
| 375 | 372 | "metadata": {}, |
| 376 | 373 | "outputs": [ |
| 377 | 374 | { |
| 378 | 375 | "data": { |
| 379 | - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEKCAYAAAAcgp5RAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAEpJJREFUeJzt3X2wXVV5x/HvryBaXwpVqCIQgwbRdGwRr2jVdqC+BTFi\nrS9knCotNaUWR6vOmI5Oa2dsB23HjlaqTYWiHQ2iRZtILFWrg61oCRgUpGjK4BDGmiiK0lot+vSP\ns6On1/ty7j3n3H2z+H5m7mSftffZ+8ma3Cf7PHudtVJVSJLa9VN9ByBJmi4TvSQ1zkQvSY0z0UtS\n40z0ktQ4E70kNc5EL0mNM9FLUuNM9JLUuEP7DgDgyCOPrLVr1/YdhiQdV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fGu4CXgY8CcASS4CPtzksZIfNK/fMeqkkpxH58in5SOD\nHknXNwMJHOFL0txwhC9Jc8KCL0lzwoIvSXPCgi9Jc8KCL0lz4v8DiQ2Pubkbe1IAAAAASUVORK5C\nYII=\n", | |
| 380 | 377 | "text/plain": [ |
| 381 | - "<matplotlib.figure.Figure at 0x114dbb128>" | |
| 378 | + "<matplotlib.figure.Figure at 0x108a56950>" | |
| 382 | 379 | ] |
| 383 | 380 | }, |
| 384 | 381 | "metadata": {}, |
| ... | ... | @@ -412,10 +409,8 @@ |
| 412 | 409 | }, |
| 413 | 410 | { |
| 414 | 411 | "cell_type": "code", |
| 415 | - "execution_count": 10, | |
| 416 | - "metadata": { | |
| 417 | - "collapsed": true | |
| 418 | - }, | |
| 412 | + "execution_count": 9, | |
| 413 | + "metadata": {}, | |
| 419 | 414 | "outputs": [], |
| 420 | 415 | "source": [ |
| 421 | 416 | "like = ctools.ctlike(sim.obs())\n", |
| ... | ... | @@ -437,7 +432,7 @@ |
| 437 | 432 | }, |
| 438 | 433 | { |
| 439 | 434 | "cell_type": "code", |
| 440 | - "execution_count": 11, | |
| 435 | + "execution_count": 10, | |
| 441 | 436 | "metadata": {}, |
| 442 | 437 | "outputs": [ |
| 443 | 438 | { |
| ... | ... | @@ -445,7 +440,7 @@ |
| 445 | 440 | "output_type": "stream", |
| 446 | 441 | "text": [ |
| 447 | 442 | "=== GOptimizerLM ===\n", |
| 448 | - " Optimized function value ..: 757618.425\n", | |
| 443 | + " Optimized function value ..: 755051.482\n", | |
| 449 | 444 | " Absolute precision ........: 0.005\n", |
| 450 | 445 | " Acceptable value decrease .: 2\n", |
| 451 | 446 | " Optimization status .......: converged\n", |
| ... | ... | @@ -469,7 +464,7 @@ |
| 469 | 464 | }, |
| 470 | 465 | { |
| 471 | 466 | "cell_type": "code", |
| 472 | - "execution_count": 12, | |
| 467 | + "execution_count": 11, | |
| 473 | 468 | "metadata": {}, |
| 474 | 469 | "outputs": [ |
| 475 | 470 | { |
| ... | ... | @@ -491,8 +486,8 @@ |
| 491 | 486 | " RA .......................: 83.6331 [-360,360] deg (fixed,scale=1)\n", |
| 492 | 487 | " DEC ......................: 22.0145 [-90,90] deg (fixed,scale=1)\n", |
| 493 | 488 | " Number of spectral par's ..: 3\n", |
| 494 | - " Prefactor ................: 5.73901839854211e-16 +/- 5.75150678022232e-18 [1e-23,1e-13] ph/cm2/s/MeV (free,scale=1e-16,gradient)\n", | |
| 495 | - " Index ....................: -2.46442704108736 +/- 0.00738985717701118 [-0,-5] (free,scale=-1,gradient)\n", | |
| 489 | + " Prefactor ................: 5.69396634052842e-16 +/- 6.14427401423559e-18 [1e-23,1e-13] ph/cm2/s/MeV (free,scale=1e-16,gradient)\n", | |
| 490 | + " Index ....................: -2.4703556883579 +/- 0.00792538918685176 [-0,-5] (free,scale=-1,gradient)\n", | |
| 496 | 491 | " PivotEnergy ..............: 300000 [10000,1000000000] MeV (fixed,scale=1000000,gradient)\n", |
| 497 | 492 | " Number of temporal par's ..: 1\n", |
| 498 | 493 | " Normalization ............: 1 (relative value) (fixed,scale=1,gradient)\n", |
| ... | ... | @@ -504,8 +499,8 @@ |
| 504 | 499 | " Model type ................: \"PowerLaw\" * \"Constant\"\n", |
| 505 | 500 | " Number of parameters ......: 4\n", |
| 506 | 501 | " Number of spectral par's ..: 3\n", |
| 507 | - " Prefactor ................: 0.995734795709415 +/- 0.00725726198557001 [0.001,1000] ph/cm2/s/MeV (free,scale=1,gradient)\n", | |
| 508 | - " Index ....................: -0.00198344390952578 +/- 0.00257263793207067 [-5,5] (free,scale=1,gradient)\n", | |
| 502 | + " Prefactor ................: 0.9951294839032 +/- 0.00725734189801964 [0.001,1000] ph/cm2/s/MeV (free,scale=1,gradient)\n", | |
| 503 | + " Index ....................: -0.00197954530750781 +/- 0.00257407441298647 [-5,5] (free,scale=1,gradient)\n", | |
| 509 | 504 | " PivotEnergy ..............: 1000000 [10000,1000000000] MeV (fixed,scale=1000000,gradient)\n", |
| 510 | 505 | " Number of temporal par's ..: 1\n", |
| 511 | 506 | " Normalization ............: 1 (relative value) (fixed,scale=1,gradient)\n" |
| ... | ... | @@ -520,19 +515,19 @@ |
| 520 | 515 | "cell_type": "markdown", |
| 521 | 516 | "metadata": {}, |
| 522 | 517 | "source": [ |
| 523 | - "For example, in this way we can fetch the minimum of the optimized function (the opposite of the likelihood logarithm) to compare different model hypotheses." | |
| 518 | + "For example, in this way we can fetch the minimum of the optimized function (the negative of the natural logarithm of the likelihood) to compare different model hypotheses." | |
| 524 | 519 | ] |
| 525 | 520 | }, |
| 526 | 521 | { |
| 527 | 522 | "cell_type": "code", |
| 528 | - "execution_count": 13, | |
| 523 | + "execution_count": 12, | |
| 529 | 524 | "metadata": {}, |
| 530 | 525 | "outputs": [ |
| 531 | 526 | { |
| 532 | 527 | "name": "stdout", |
| 533 | 528 | "output_type": "stream", |
| 534 | 529 | "text": [ |
| 535 | - "757618.4249159902\n" | |
| 530 | + "755051.481962\n" | |
| 536 | 531 | ] |
| 537 | 532 | } |
| 538 | 533 | ], |
| ... | ... | @@ -550,7 +545,7 @@ |
| 550 | 545 | }, |
| 551 | 546 | { |
| 552 | 547 | "cell_type": "code", |
| 553 | - "execution_count": 14, | |
| 548 | + "execution_count": 13, | |
| 554 | 549 | "metadata": {}, |
| 555 | 550 | "outputs": [ |
| 556 | 551 | { |
| ... | ... | @@ -569,11 +564,11 @@ |
| 569 | 564 | " Model components ..........: \"PointSource\" * \"PowerLaw\" * \"Constant\"\n", |
| 570 | 565 | " Number of parameters ......: 6\n", |
| 571 | 566 | " Number of spatial par's ...: 2\n", |
| 572 | - " RA .......................: 83.6334964430607 +/- 0.000614768905318078 [-360,360] deg (free,scale=1)\n", | |
| 573 | - " DEC ......................: 22.0149467750683 +/- 0.000559548446961086 [-90,90] deg (free,scale=1)\n", | |
| 567 | + " RA .......................: 83.6324977668637 +/- 0.000645834980167342 [-360,360] deg (free,scale=1)\n", | |
| 568 | + " DEC ......................: 22.0156097018479 +/- 0.000603833638486857 [-90,90] deg (free,scale=1)\n", | |
| 574 | 569 | " Number of spectral par's ..: 3\n", |
| 575 | - " Prefactor ................: 5.73898570353797e-16 +/- 5.75155055360256e-18 [1e-23,1e-13] ph/cm2/s/MeV (free,scale=1e-16,gradient)\n", | |
| 576 | - " Index ....................: -2.46439956654049 +/- 0.00739170138357582 [-0,-5] (free,scale=-1,gradient)\n", | |
| 570 | + " Prefactor ................: 5.69123259664292e-16 +/- 6.14234382363775e-18 [1e-23,1e-13] ph/cm2/s/MeV (free,scale=1e-16,gradient)\n", | |
| 571 | + " Index ....................: -2.47037429659339 +/- 0.00792634862711166 [-0,-5] (free,scale=-1,gradient)\n", | |
| 577 | 572 | " PivotEnergy ..............: 300000 [10000,1000000000] MeV (fixed,scale=1000000,gradient)\n", |
| 578 | 573 | " Number of temporal par's ..: 1\n", |
| 579 | 574 | " Normalization ............: 1 (relative value) (fixed,scale=1,gradient)\n", |
| ... | ... | @@ -585,8 +580,8 @@ |
| 585 | 580 | " Model type ................: \"PowerLaw\" * \"Constant\"\n", |
| 586 | 581 | " Number of parameters ......: 4\n", |
| 587 | 582 | " Number of spectral par's ..: 3\n", |
| 588 | - " Prefactor ................: 0.995729516865969 +/- 0.0072572344873009 [0.001,1000] ph/cm2/s/MeV (free,scale=1,gradient)\n", | |
| 589 | - " Index ....................: -0.00198584806013523 +/- 0.00257264072051407 [-5,5] (free,scale=1,gradient)\n", | |
| 583 | + " Prefactor ................: 0.995120900180708 +/- 0.00725727612144389 [0.001,1000] ph/cm2/s/MeV (free,scale=1,gradient)\n", | |
| 584 | + " Index ....................: -0.00198038808966019 +/- 0.00257407550475833 [-5,5] (free,scale=1,gradient)\n", | |
| 590 | 585 | " PivotEnergy ..............: 1000000 [10000,1000000000] MeV (fixed,scale=1000000,gradient)\n", |
| 591 | 586 | " Number of temporal par's ..: 1\n", |
| 592 | 587 | " Normalization ............: 1 (relative value) (fixed,scale=1,gradient)\n" |
| ... | ... | @@ -609,20 +604,20 @@ |
| 609 | 604 | }, |
| 610 | 605 | { |
| 611 | 606 | "cell_type": "code", |
| 612 | - "execution_count": 16, | |
| 607 | + "execution_count": 14, | |
| 613 | 608 | "metadata": {}, |
| 614 | 609 | "outputs": [ |
| 615 | 610 | { |
| 616 | 611 | "name": "stdout", |
| 617 | 612 | "output_type": "stream", |
| 618 | 613 | "text": [ |
| 619 | - "1.0637600922491401\n" | |
| 614 | + "4.27571920515\n" | |
| 620 | 615 | ] |
| 621 | 616 | } |
| 622 | 617 | ], |
| 623 | 618 | "source": [ |
| 624 | 619 | "like2 = like.opt().value()\n", |
| 625 | - "ts = -2 * (like2 - like1)\n", | |
| 620 | + "ts = -2.0 * (like2 - like1)\n", | |
| 626 | 621 | "print(ts)" |
| 627 | 622 | ] |
| 628 | 623 | }, |
| ... | ... | @@ -630,27 +625,34 @@ |
| 630 | 625 | "cell_type": "markdown", |
| 631 | 626 | "metadata": {}, |
| 632 | 627 | "source": [ |
| 633 | - "The test statistic TS is expected to be distributed as a chi square with a number of degrees of freedom equal to the additional number of degrees of freedom of the (second) more complex model with respect to the (first) more parsimonious one, for our case two degrees of freedom. The chance probability that the likelihood improved that much because of pure statistical fluctuations is the integral from TS to infinity of the chi square with two degrees of freedom. In this case the improvement is negligible (i.e., the chance probability is very high), as expected since in the model the source is already at the true position." | |
| 628 | + "The test statistic (TS) is expected to be distributed as a $\\chi^2_n$ with a number of degrees of freedom $n$ equal to the additional number of degrees of freedom of the (second) more complex model with respect to the (first) more parsimonious one, for our case two degrees of freedom. The chance probability that the likelihood improved that much because of pure statistical fluctuations is the integral from TS to infinity of the chi square with two degrees of freedom. In this case the improvement is negligible (i.e., the chance probability is very high), as expected since in the model the source is already at the true position." | |
| 634 | 629 | ] |
| 630 | + }, | |
| 631 | + { | |
| 632 | + "cell_type": "code", | |
| 633 | + "execution_count": null, | |
| 634 | + "metadata": {}, | |
| 635 | + "outputs": [], | |
| 636 | + "source": [] | |
| 635 | 637 | } |
| 636 | 638 | ], |
| 637 | 639 | "metadata": { |
| 638 | 640 | "kernelspec": { |
| 639 | - "display_name": "Python 3", | |
| 641 | + "display_name": "Python 2", | |
| 640 | 642 | "language": "python", |
| 641 | - "name": "python3" | |
| 643 | + "name": "python2" | |
| 642 | 644 | }, |
| 643 | 645 | "language_info": { |
| 644 | 646 | "codemirror_mode": { |
| 645 | 647 | "name": "ipython", |
| 646 | - "version": 3 | |
| 648 | + "version": 2 | |
| 647 | 649 | }, |
| 648 | 650 | "file_extension": ".py", |
| 649 | 651 | "mimetype": "text/x-python", |
| 650 | 652 | "name": "python", |
| 651 | 653 | "nbconvert_exporter": "python", |
| 652 | - "pygments_lexer": "ipython3", | |
| 653 | - "version": "3.6.2" | |
| 654 | + "pygments_lexer": "ipython2", | |
| 655 | + "version": "2.7.11" | |
| 654 | 656 | } |
| 655 | 657 | }, |
| 656 | 658 | "nbformat": 4, | ... | ... |
doc/source/users/user_contributed/index.rst
| ... | ... | @@ -3,6 +3,7 @@ |
| 3 | 3 | User Contributed Material |
| 4 | 4 | ========================= |
| 5 | 5 | |
| 6 | -This section of the manual provides examples and Jupyter Notebooks contributed | |
| 7 | -by ctools users. | |
| 6 | +This section provides examples and Jupyter Notebooks contributed by ctools | |
| 7 | +users. Feel free to send your material to ctools@irap.omp.eu so that it can | |
| 8 | +be integrated into the documentation. | |
| 8 | 9 | ... | ... |
models/crab_beyond.xml
| ... | ... | @@ -3,17 +3,17 @@ |
| 3 | 3 | <source name="Crab" type="PointSource"> |
| 4 | 4 | <spectrum type="Composite"> |
| 5 | 5 | <spectrum type="LogParabola"> |
| 6 | - <parameter name="Prefactor" scale="1e-17" value="3.0" min="1e-07" max="1000.0" free="1"/> | |
| 7 | - <parameter name="Index" scale="-1" value="2.5" min="0.0" max="+5.0" free="1"/> | |
| 8 | - <parameter name="Curvature" scale="-1" value="0.45" min="-5.0" max="+5.0" free="1"/> | |
| 9 | - <parameter name="PivotEnergy" scale="1e6" value="1.0" min="0.01" max="1000.0" free="0"/> | |
| 6 | + <parameter name="Prefactor" scale="1e-17" value="3.0" min="1e-07" max="1000.0" free="1"/> | |
| 7 | + <parameter name="Index" scale="-1" value="2.5" min="0.0" max="+5.0" free="1"/> | |
| 8 | + <parameter name="Curvature" scale="-1" value="0.45" min="-5.0" max="+5.0" free="1"/> | |
| 9 | + <parameter name="PivotEnergy" scale="1e6" value="1.0" min="0.01" max="1000.0" free="0"/> | |
| 10 | 10 | </spectrum> |
| 11 | 11 | <spectrum type="PowerLaw"> |
| 12 | - <parameter name="Prefactor" scale="1e-18" value="2.9" min="1.e-7" max="1000.0" free="1"/> | |
| 13 | - <parameter name="Index" scale="-1" value="2.05" min="0.0" max="+5.0" free="1"/> | |
| 14 | - <parameter name="PivotEnergy" scale="1e6" value="1.0" min="0.01" max="1000.0" free="0"/> | |
| 12 | + <parameter name="Prefactor" scale="1e-18" value="2.9" min="1.e-7" max="1000.0" free="1"/> | |
| 13 | + <parameter name="Index" scale="-1" value="2.05" min="0.0" max="+5.0" free="1"/> | |
| 14 | + <parameter name="PivotEnergy" scale="1e6" value="1.0" min="0.01" max="1000.0" free="0"/> | |
| 15 | 15 | </spectrum> |
| 16 | - </spectrum> | |
| 16 | + </spectrum> | |
| 17 | 17 | <spatialModel type="PointSource"> |
| 18 | 18 | <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="0"/> |
| 19 | 19 | <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="0"/> |
| ... | ... | @@ -24,7 +24,7 @@ |
| 24 | 24 | <parameter name="Prefactor" scale="1e-15" value="1.8" min="1e-07" max="1000.0" free="1"/> |
| 25 | 25 | <parameter name="Index" scale="-1" value="2.35" min="0.0" max="+5.0" free="1"/> |
| 26 | 26 | <parameter name="CutoffEnergy" scale="1e6" value="0.3" min="0.01" max="1000.0" free="1"/> |
| 27 | - <parameter name="PivotEnergy" scale="1e6" value="0.1" min="0.01" max="1000.0" free="0"/> | |
| 27 | + <parameter name="PivotEnergy" scale="1e6" value="0.1" min="0.01" max="1000.0" free="0"/> | |
| 28 | 28 | </spectrum> |
| 29 | 29 | <spatialModel type="PointSource"> |
| 30 | 30 | <parameter name="RA" scale="1.0" value="83.72" min="-360" max="360" free="0"/> | ... | ... |