Commit a7737cd8346843590d26adbf586baf2926bc037f

Authored by Jürgen Knödlseder
1 parent 7da6e885

Add On/Off analysis to ctlike reference manual (#3154)

ChangeLog
... ... @@ -5,6 +5,7 @@
5 5  
6 6 Add Interface Manual to User documentation (#3163)
7 7 Adapt show_pull_histogram.py to matplotlib > 3.1.0 (#3156)
  8 + Add On/Off analysis to ctlike reference manual (#3154)
8 9 Avoid negative squared standard deviations in cssrcdetect
9 10 Update user manual for latest CTA IRF (#3075)
10 11 Fix log file header repetition in some cscripts (#3066)
... ...
... ... @@ -19,6 +19,8 @@ Documentation
19 19 Add Interface Manual to User documentation that provides links to the
20 20 ctools and GammaLib Doxygen documentation (#3163).
21 21  
  22 +Add On/Off analysis to ctlike reference manual (#3154).
  23 +
22 24 Update user manual to indicate where to get the latest CTA IRF (#3075).
23 25  
24 26  
... ...
doc/source/admin/release_history/1.7.rst
... ... @@ -29,6 +29,8 @@ Improvements
29 29  
30 30 * [`3163 <https://cta-redmine.irap.omp.eu/issues/3163>`_] -
31 31 Add Interface Manual to User documentation
  32 +* [`3154 <https://cta-redmine.irap.omp.eu/issues/3154>`_] -
  33 + Add On/Off analysis to ctlike reference manual
32 34 * [`3075 <https://cta-redmine.irap.omp.eu/issues/3075>`_] -
33 35 Update user manual for latest CTA IRF
34 36 * [`3065 <https://cta-redmine.irap.omp.eu/issues/3065>`_] -
... ...
doc/source/users/reference_manual/ctlike.rst
... ... @@ -9,47 +9,58 @@ Perform maximum likelihood model fitting.
9 9 Synopsis
10 10 --------
11 11  
12   -This tool performs a maximum likelihood fitting of a model to unbinned or
13   -binned data. All model parameters marked with the attribute ``free="1"``
  12 +This tool performs a maximum likelihood fitting of a model to unbinned, binned
  13 +or On/Off data. All model parameters marked with the attribute ``free="1"``
14 14 in the input model XML file will be adjusted to the value that maximises
15   -the probability that the observed data have been drawn from the model.
16   -The tool can mix the analysis of unbinned and binned data, and is also able
17   -to perform a joint maximum likelihood analysis of data collected in
18   -separate observations or with different instruments.
19   -
20   -:ref:`ctlike` will automatically switch between unbinned, binned and joint analysis
21   -on basis of the file provided on input (parameter ``inobs``). Providing an
22   -event list will lead to an unbinned analysis while providing a counts cube
23   -will lead to a binned analysis. If several observations have been stacked
24   -into a single counts cube, an exposure cube, a point spread function cube and
25   -a background cube need also to be provided. :ref:`ctlike` will automatically prompt
  15 +the probability that the observed data have been drawn from the model. The tool
  16 +can mix the analysis of unbinned, binned and On/Off data, and is also able to
  17 +perform a joint maximum likelihood analysis of data collected in separate
  18 +observations or with different instruments.
  19 +
  20 +:ref:`ctlike` will automatically switch between unbinned, binned, On/Off and joint
  21 +analysis on basis of the file provided on input (parameter ``inobs``). Providing
  22 +an event list will lead to an unbinned analysis while providing a counts cube
  23 +will lead to a binned analysis. If several observations have been stacked into a
  24 +single counts cube, an exposure cube, a point spread function cube and a
  25 +background cube need also to be provided. :ref:`ctlike` will automatically prompt
26 26 for these parameters in case that a counts cube is given. Answering ``NONE``
27 27 will ignore the exposure cube, point spread function cube and background cube
28 28 and handle the data as a single observation using the specified instrument
29 29 response function (parameters ``caldb`` and ``irf``).
30 30  
31   -Multiple observations, including data collected with different instruments,
32   -can be handled by specifying an observation definition file on input. Each of
33   -the observations will be kept separately and associated with its appropriate
34   -instrument response functions, as opposed to a stacked analysis where average
35   -response functions, computed using :doc:`ctexpcube`, :doc:`ctpsfcube` and :doc:`ctbkgcube`,
36   -are used. If an observation definition file is provided, :ref:`ctlike` will use the
37   -joint likelihood of all the observations for parameter optimisation.
38   -
39   -By default, :ref:`ctlike` will use the Poisson statistics for likelihood computation,
40   -but for binned analysis also Gaussian statistics can be specified (parameter
41   -``stat``). Optionally, a refit can be requested after an initial fit (parameter
42   -``refit``), but normally this is not needed. For all model components that
43   -have the ``tscalc="1"`` attribute set, :ref:`ctlike` will also compute the Test
44   -Statistics value that is a measure of the source significance. Optionally,
45   -the spatial model parameters can be kept fixed during that computation
46   -(parameter ``fix_spat_for_ts``).
  31 +Providing an observation definition XML file containing an On/Off observation
  32 +will trigger an On/Off analysis. Multiple observations, including data collected
  33 +with different instruments, can also be handled by specifying an observation
  34 +definition XML file on input. Each of the observations will be kept separately
  35 +and associated with its appropriate instrument response functions, as opposed to
  36 +a stacked analysis where average response functions, computed using :doc:`ctexpcube`,
  37 +:doc:`ctpsfcube` and :doc:`ctbkgcube`, are used. If an observation definition XML
  38 +file is provided, :ref:`ctlike` will use the joint likelihood of all the
  39 +observations for parameter optimisation.
  40 +
  41 +By default, :ref:`ctlike` will use the Poisson statistic for likelihood computation,
  42 +but for binned analysis also Gaussian statistic can be specified (parameter
  43 +``statistic``). In case of an On/Off analysis, data can be fitted using either the
  44 +``CSTAT`` or the ``WSTAT`` statistic. The former will adjust a background model to
  45 +the On and Off data, while the latter will assume that the background rates per
  46 +solid angle are identical in the On and Off regions, and will marginalise over
  47 +the corresponding background rates. The fit statistic can also be specified in
  48 +the observation definition XML file for each observation using the ``statistic``
  49 +attribute.
  50 +
  51 +For all model components that have the ``tscalc="1"`` attribute set in the input
  52 +model XML file, :ref:`ctlike` will also compute the Test Statistic value that is a
  53 +measure of the source significance. Optionally, the spatial model parameters can
  54 +be kept fixed during that computation (parameter ``fix_spat_for_ts``).
  55 +
  56 +Optionally, a refit can be requested after an initial fit (parameter ``refit``),
  57 +but normally this is not needed.
47 58  
48 59 :ref:`ctlike` generates an output model XML file that contains the values of the
49 60 best fitting model parameters. For all free parameters, an ``error`` attribute
50 61 is added that provides the statistical uncertainty in the parameter estimate.
51   -If computation of the Test Statistics has been requested for a model component,
52   -a ``ts`` attribute providing the Test Statistics value is added. The output model
  62 +If computation of the Test Statistic has been requested for a model component,
  63 +a ``ts`` attribute providing the Test Statistic value is added. The output model
53 64 can be used as an input model for other ctools.
54 65  
55 66 In addition, the covariance matrix can be saved into a file by specifying a
... ...