Commit 3c7154eabaa73e7d0d1d8001894b2277ad50c5a8
1 parent
1ae5c76b
Update quickstart tutorial
Showing
1 changed file
with
39 additions
and
17 deletions
doc/source/user_manual/getting_started/quickstart.rst
| ... | ... | @@ -336,8 +336,8 @@ and we do the fit by typing: |
| 336 | 336 | |
| 337 | 337 | $ ctlike |
| 338 | 338 | Event list, counts cube or observation definition file [events.fits] cntcube.fits |
| 339 | - Exposure cube file [NONE] | |
| 340 | - PSF cube file [NONE] | |
| 339 | + Exposure cube file (only needed for stacked analysis) [NONE] | |
| 340 | + PSF cube file (only needed for stacked analysis) [NONE] | |
| 341 | 341 | Calibration database [dummy] |
| 342 | 342 | Instrument response function [cta_dummy_irf] |
| 343 | 343 | Source model [$CTOOLS/share/models/crab.xml] |
| ... | ... | @@ -361,7 +361,7 @@ the XML result file that has been produced by the run: |
| 361 | 361 | |
| 362 | 362 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
| 363 | 363 | <source_library title="source library"> |
| 364 | - <source name="Crab" type="PointSource" tscalc="0"> | |
| 364 | + <source name="Crab" type="PointSource"> | |
| 365 | 365 | <spectrum type="PowerLaw"> |
| 366 | 366 | <parameter name="Prefactor" value="6.07928" error="0.204582" scale="1e-16" min="1e-07" max="1000" free="1" /> |
| 367 | 367 | <parameter name="Index" value="2.5009" error="0.0252057" scale="-1" min="0" max="5" free="1" /> |
| ... | ... | @@ -387,20 +387,6 @@ Crab as well as the ``Normalization`` and ``Sigma`` parameter of the radial |
| 387 | 387 | acceptance model have been fitted (all parameters having the attribute |
| 388 | 388 | ``free="1"`` are fitted). |
| 389 | 389 | |
| 390 | -.. note:: | |
| 391 | - | |
| 392 | - You may have noticed that the Crab source contains an additional | |
| 393 | - ``tscalc`` attribute in the XML result file. This attribute can be | |
| 394 | - used to instruct :ref:`ctlike` to compute the Test Statistics | |
| 395 | - (which is a measure of the detection significance) of the source. | |
| 396 | - To do so, add ``tscalc="1"`` to the XML file on input | |
| 397 | - and then re-run :ref:`ctlike`. This will then give the following result: | |
| 398 | - | |
| 399 | - .. code-block:: xml | |
| 400 | - | |
| 401 | - <source name="Crab" type="PointSource" ts="6875.350" tscalc="1"> | |
| 402 | - | |
| 403 | - | |
| 404 | 390 | To get more details about the model fitting you can inspect the log file. |
| 405 | 391 | Below the last lines of the ctlike.log log file that has been produced by |
| 406 | 392 | this run: |
| ... | ... | @@ -490,6 +476,42 @@ are not too far of the best fitting values). |
| 490 | 476 | then free some of the model parameters so that the fit can correctly |
| 491 | 477 | describe the data. |
| 492 | 478 | |
| 479 | +.. note:: | |
| 480 | + | |
| 481 | + The :ref:`ctlike` tool has the ability to estimate the detection | |
| 482 | + significance for sources in the XML model. This is done by computing | |
| 483 | + the Test Statistic value which is defined as twice the log-likelihood | |
| 484 | + difference between fitting a source at a given position on top of a | |
| 485 | + (background) model or fitting no source. Roughly speaken, the square | |
| 486 | + root of the Test Statistic value gives the source detection significance | |
| 487 | + in Gaussian sigmas, although the exact relation depends somewhat on | |
| 488 | + the formulation of the statistical problem. | |
| 489 | + | |
| 490 | + To instruct :ref:`ctlike` to compute the Test Statistic value for a | |
| 491 | + given source you need to add the attribute ``tscalc="1"`` to the XML | |
| 492 | + file: | |
| 493 | + | |
| 494 | + .. code-block:: xml | |
| 495 | + | |
| 496 | + <source name="Crab" type="PointSource" tscalc="1"> | |
| 497 | + | |
| 498 | + :ref:`ctlike` will then compute the Test Statistic value for that | |
| 499 | + source and dump the result in the log file: | |
| 500 | + | |
| 501 | + .. code-block:: xml | |
| 502 | + | |
| 503 | + 2015-02-05T08:29:07: === GModelSky === | |
| 504 | + 2015-02-05T08:29:07: Name ......................: Crab | |
| 505 | + 2015-02-05T08:29:07: Instruments ...............: all | |
| 506 | + 2015-02-05T08:29:07: Test Statistic ............: 6875.35 | |
| 507 | + | |
| 508 | + The Test Statistic value will also be added as new attribute | |
| 509 | + ``ts`` to the XML result file: | |
| 510 | + | |
| 511 | + .. code-block:: xml | |
| 512 | + | |
| 513 | + <source name="Crab" type="PointSource" ts="6875.350" tscalc="1"> | |
| 514 | + | |
| 493 | 515 | |
| 494 | 516 | .. _sec_unbinned_cta: |
| 495 | 517 | ... | ... |