From 2c17597d0a05c24f1ad7a758b508fad88bf58ae3 Mon Sep 17 00:00:00 2001 From: Jürgen Knödlseder Date: Sun, 31 Mar 2019 22:27:59 +0200 Subject: [PATCH] Update model section of User Manual --- doc/source/users/user_manual/models_concept.rst | 2 +- doc/source/users/user_manual/models_implementation.rst | 4 ++-- doc/source/users/user_manual/models_spatial_bgd.rst | 256 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------------------------- doc/source/users/user_manual/models_spatial_src.rst | 2 +- doc/source/users/user_manual/models_spectral.rst | 2 +- doc/source/users/user_manual/models_temporal.rst | 2 +- 6 files changed, 197 insertions(+), 71 deletions(-) diff --git a/doc/source/users/user_manual/models_concept.rst b/doc/source/users/user_manual/models_concept.rst index 3aafe8c..2ade405 100644 --- a/doc/source/users/user_manual/models_concept.rst +++ b/doc/source/users/user_manual/models_concept.rst @@ -1,4 +1,4 @@ -.. _sec_models_concept: +.. _um_models_concept: Overall concept ------------------ diff --git a/doc/source/users/user_manual/models_implementation.rst b/doc/source/users/user_manual/models_implementation.rst index ae2269e..121e420 100644 --- a/doc/source/users/user_manual/models_implementation.rst +++ b/doc/source/users/user_manual/models_implementation.rst @@ -1,4 +1,4 @@ -.. _sec_models_implementation: +.. _um_models_implementation: Implementation -------------- @@ -8,7 +8,7 @@ Below is a simple example of such a file comprising one source and one background model. Each model is factorised into a spectral (tag ````), -a spatial (tags ```` and ````), and +a spatial (tags ```` or ````), and a temporal component (tag ````). .. math:: diff --git a/doc/source/users/user_manual/models_spatial_bgd.rst b/doc/source/users/user_manual/models_spatial_bgd.rst index 7da8fca..709a3e6 100644 --- a/doc/source/users/user_manual/models_spatial_bgd.rst +++ b/doc/source/users/user_manual/models_spatial_bgd.rst @@ -1,32 +1,54 @@ -.. _sec_models_spatial_bgd: +.. _um_models_spatial_bgd: Spatial background model components ----------------------------------- The following sections present the spatial model components that are available -in ctools for instrumental background modelling for CTA. +in ctools for instrumental background modelling for Imaging Air Cherenkov +Telescopes (IACTs) such as H.E.S.S., VERITAS, MAGIC and CTA. -CTA radial background -^^^^^^^^^^^^^^^^^^^^^ - There exist a number of radial CTA background models that factorise into a - spatial and spectral component, and that model the spatial component as a - function that only dependends on the offset angle :math:`\theta` from the - pointing direction. These models have the type ``RadialAcceptance`` and - require a ```` tag as the spatial component. +General IACT background +^^^^^^^^^^^^^^^^^^^^^^^ - The first radial model is of type ``Gaussian`` + The general IACT background model is factorised in a spatial and spectral + component and has the type ``CTABackground``. It has the following XML + structure: .. code-block:: xml - - + + + ... + + + ... + + + + .. note:: + Please speficy the ``instrument`` label in the XML file that corresponds + to the ``instrument`` label of the data. Otherwise the model will not be used + for your data. Valid ``instrument`` labels are ``HESS``, ``VERITAS``, + ``MAGIC`` and ``CTA``. + + The following sections describe the spatial model components that are + available. + + +Gaussian +~~~~~~~~ + + The ``Gaussian`` model describes a 2D Gaussian shape in offset angle squared + + .. code-block:: xml + + + - - - - - + + + ... @@ -40,21 +62,31 @@ CTA radial background * :math:`\sigma` = ``Sigma`` (degrees) - The second radial model is of type ``Profile`` + and + + .. math:: + \theta = \sqrt{\mathrm{DETX} \times \mathrm{DETX} + \mathrm{DETY} \times\mathrm{DETY}} + + with :math:`\mathrm{DETX}` and :math:`\mathrm{DETY}` being the detector + coordinates in the nominal system. + + +Profile +~~~~~~~ + + The ``Profile`` model describes a radial profile .. code-block:: xml - - + + - - - - - - + + + ... + and implements @@ -68,26 +100,25 @@ CTA radial background * :math:`c_1` = ``Core`` * :math:`c_2` = ``Tail`` - The third radial model is of type ``Polynom`` + +Polynom +~~~~~~~ + + The ``Polynom`` model describes a polynomial with an arbitrary number of + coefficients .. code-block:: xml - - + + - - - - - - - - - - + ... + + + ... @@ -100,9 +131,116 @@ CTA radial background * :math:`c_0` = ``Coeff0`` * :math:`c_1` = ``Coeff1`` + * :math:`c_2` = ``Coeff2`` + * :math:`c_3` = ``Coeff3`` * ... - (the number of polynomial coefficients is arbitrary). + +Gradient +~~~~~~~~ + + The ``Gradient`` model describes a bilinear gradient over the field of + view + + .. code-block:: xml + + + + + + + + ... + + + + and implements + + .. math:: + M_{\rm spatial}(\mathrm{DETX},\mathrm{DETY}) = + 1 + \nabla_\mathrm{x} \mathrm{DETX} + \nabla_\mathrm{y} \mathrm{DETY} + + where + + * :math:`\nabla_\mathrm{x}` = ``Grad_DETX`` (per degree) + * :math:`\nabla_\mathrm{y}` = ``Grad_DETY`` (per degree) + + + +Multiplicative +~~~~~~~~~~~~~~ + + The ``Multiplicative`` model describes a multiplication of spatial models + + .. code-block:: xml + + + + + ... + + + ... + + ... + + + ... + + + + and implements + + .. math:: + M_{\rm spatial}(\mathrm{DETX},\mathrm{DETY}) = + \prod_{i=0}^{N-1} M^{(i)}_{\rm spatial}(\mathrm{DETX},\mathrm{DETY}) + + where :math:`M^{(i)}_{\rm spatial}(\mathrm{DETX},\mathrm{DETY})` is any + spatial model component, including another multiplicative model, and + :math:`N` is the number of model components that are multiplied. + For example, the default model for a H.E.S.S. data analysis is specified + by + + .. code-block:: xml + + + + + + + + + + + + + ... + + + + +Radial acceptance background +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + For legacy reasons, there exists a class of radially symmetric background + models of the type ``RadialAcceptance`` with the following XML structure: + + .. code-block:: xml + + + + ... + + + ... + + + + These models require a ```` tag as the spatial component and + accept all spatial model types that take the offset angle :math:`\theta` + as variable, such as ``Gaussian``, ``Profile`` and ``Polynom``. The use + of the radial acceptance model is deprecated, and the ``CTABackground`` + model should be used instead. CTA IRF background @@ -115,17 +253,12 @@ CTA IRF background can be used by specifying a model of type ``CTAIrfBackground``. No spatial component will be specified explicitly since the spatial (and spectral) information is already contained in the template. The model will be multiplied by a spectral law. - In the example below, the template is multiplied by a power law with normalization - of 1 and slope 0 (i.e. the template is taken as is, but a fit can adjust the model - to compensate for inaccuracies): .. code-block:: xml - - - - + + ... @@ -135,10 +268,8 @@ CTA IRF background .. code-block:: xml - - - - + + ... @@ -148,16 +279,13 @@ CTA effective area background Instead of using the background template the effective area for gamma rays can also be used to model the instrumental background. Note that in this case the - effective area has to be scaled to a reasonable background rate. An example is - given below: + effective area has to be scaled to a reasonable background rate. .. code-block:: xml - - - - + + ... @@ -165,17 +293,15 @@ CTA effective area background CTA cube background ^^^^^^^^^^^^^^^^^^^ - For a stacked analysis, the background rate is predicted by a so called background - cube. The background cube is used by specifying a model of type ``CTACubeBackground``. - Similar to the ``CTAIrfBackground`` model, the background cube is multplied by - a spectral model. + For a stacked analysis, the background rate is predicted by a so called + background cube. The background cube is used by specifying a model of type + ``CTACubeBackground``. Similar to the ``CTAIrfBackground`` model, the + background cube is multplied by a spectral model. .. code-block:: xml - - - - + + ... diff --git a/doc/source/users/user_manual/models_spatial_src.rst b/doc/source/users/user_manual/models_spatial_src.rst index 1c9b2b8..198cfc3 100644 --- a/doc/source/users/user_manual/models_spatial_src.rst +++ b/doc/source/users/user_manual/models_spatial_src.rst @@ -1,4 +1,4 @@ -.. _sec_models_spatial_src: +.. _um_models_spatial_src: Spatial source model components ------------------------------- diff --git a/doc/source/users/user_manual/models_spectral.rst b/doc/source/users/user_manual/models_spectral.rst index 8e75d40..ce52015 100644 --- a/doc/source/users/user_manual/models_spectral.rst +++ b/doc/source/users/user_manual/models_spectral.rst @@ -1,4 +1,4 @@ -.. _sec_models_spectral: +.. _um_models_spectral: Spectral model components ------------------------- diff --git a/doc/source/users/user_manual/models_temporal.rst b/doc/source/users/user_manual/models_temporal.rst index 77ab3d0..3290979 100644 --- a/doc/source/users/user_manual/models_temporal.rst +++ b/doc/source/users/user_manual/models_temporal.rst @@ -1,4 +1,4 @@ -.. _sec_models_temporal: +.. _um_models_temporal: Temporal model components ------------------------- -- libgit2 0.21.4