Commit 87403836b9c392741a2d33c75f7ac056814c3566

Authored by Luigi Tibaldo
1 parent 0526c208

corrected for use of model in dealing with source extension

doc/source/users/tutorials/quickstart/onoff.rst
... ... @@ -13,10 +13,6 @@ Doing an On/Off analysis
13 13 (background) regions. An On/Off analysis is recommended if you
14 14 want to assure minimal dependency on the Monte Carlo background model.
15 15  
16   - .. warning::
17   - For the time being the **On/Off analysis only works for point sources**. Make
18   - sure that the spatial component of the model you want to analyse is of
19   - type ``PointSource``.
20 16  
21 17 Finally, we consider the classical technique for IACT spectral analysis,
22 18 in which 1D spectra for On and Off regions are used jointly to
... ... @@ -64,6 +60,21 @@ To derive On/Off observations from the ``events_edisp.fits`` event list, type:
64 60 Declination of source region centre (deg) (-90-90) [22.01]
65 61 Radius of source region circle (deg) (0-180) [0.2]
66 62  
  63 +We have provided in input a model definition file. This serves
  64 +a twofold purpose: 1) a source model is used to compute the instrument
  65 +response in the On region taking into account the source morphology
  66 +and instrument PSF; 2) a background model is used to calculate the
  67 +background response, namely the expected background rate in each
  68 +energy bin and the ratio of background rate in the On region over the
  69 +rate in the Off regions. You can skip using a background model by
  70 +setting the hidden parameter ``use_model_bkg=no``: in this case the
  71 +background rate as a function of energy will be determined later
  72 +during the fit, and the ratio of background rate in the On region over the
  73 +rate in the Off regions is set to the ratio of the respective solid
  74 +angles. Furthermore, you can skip passing a model definition file
  75 +(pass ``NONE``): in this case the response will be calculated for a
  76 +pointlike source at the centre of the On region.
  77 +
67 78 .. note::
68 79 We have used the events simulated accounting for energy dispersion, since
69 80 energy dispersion is always used in On/Off analysis.
... ... @@ -253,7 +264,14 @@ Alternatively, you can use ``WSTAT`` for an On/Off analysis, which treats the
253 264 number of background counts in each energy bin as a nuisance parameter that is
254 265 derived from the On and Off counts by profiling the likelihood function. In
255 266 this case, the only assumption is that the background rate spectrum is the same
256   -in the On and Off regions. Below the results for a :ref:`ctlike` run with
  267 +in the On and Off regions.
  268 +
  269 +.. note::
  270 + You must use ``WSTAT`` if you have selected
  271 + ``use_model_bkg=no`` in `csphagen` . `csphagen` sets automatically ``WSTAT`` as
  272 + statistic in the :ref:`observation definition file <glossary_obsdef>` in this case.
  273 +
  274 +Below the results for a :ref:`ctlike` run with
257 275 the ``statistic=wstat`` option.
258 276  
259 277 .. code-block:: none
... ...