Commit f5880b0de8348ec8a81275ea9a2f8016a8f1cd2f

Authored by Jürgen Knödlseder
1 parent 696c32c2

Update documentation on CTA response handling

doc/source/user_manual/getting_started/irfs.jpg 0 → 100644

27.6 KB

doc/source/user_manual/getting_started/response.rst
... ... @@ -18,7 +18,31 @@ CTA Instrument Response Functions
18 18 What are instrument response functions?
19 19 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 20  
21   -(will provide a general description of what are IRFs)
  21 +The instrument response functions provide a mathematical description that
  22 +links the measured quantities :math:`\vec{d}` of an event to the physical
  23 +quantities :math:`\vec{p}` of the incident photon. The following figure
  24 +illustrates this relationship:
  25 +
  26 +.. figure:: irfs.jpg
  27 + :width: 70%
  28 +
  29 +:math:`I(\vec{p})` is the gamma-ray intensity arriving at Earth as a
  30 +function of photon properties :math:`\vec{p}`
  31 +(which usually are true photon energy, true photon incident direction,
  32 +and true photon arrival time),
  33 +while :math:`e(\vec{d})` is the expected event rate as function of event
  34 +properties :math:`\vec{d}` (which usually are the measured photon energy,
  35 +measured or reconstructued photon incident direction, and measured photon
  36 +arrival time). The expected event rate is obtained by integrating the
  37 +product of
  38 +the instrumental response function :math:`R(\vec{d}|\vec{p},\vec{a}`)
  39 +and the emitted intensity :math:`I(\vec{p})` over the photon properties
  40 +:math:`\vec{p}`.
  41 +The argument :math:`\vec{a}` in the response function comprises any
  42 +auxiliary parameter on which the response function may depend on (e.g.
  43 +pointing direction, triggered telescopes, optical efficiencies,
  44 +atmospheric conditions, etc.). All these quantities and hence the
  45 +instrument response function may depend on time.
22 46  
23 47  
24 48 Data formats
... ... @@ -26,8 +50,126 @@ Data formats
26 50  
27 51 So far the data format of the CTA instrument response functions has not
28 52 yet been defined, and information about instrument response functions is
29   -provided in various ways.
  53 +provided in various ways. Three types of data formats are so far supported:
  54 +
  55 +- :ref:`sec_cta_rsp_perftable`
  56 +
  57 +- :ref:`sec_cta_rsp_xspec`
  58 +
  59 +- :ref:`sec_cta_rsp_rsptable`
  60 +
  61 +All formats provide the instrument response as function of true (and
  62 +sometimes also measured) photon energy, typically from about 20 GeV to
  63 +about 125 TeV.
  64 +Performance tables provide the instrument response for on-axis sources.
  65 +ARF, RMF and PSF files provide the instrument response for a specific
  66 +source position (and region) within the field of view.
  67 +Response tables provide the instrument response as function of position in
  68 +the field of view. Response tables are thus the most universal form of
  69 +instrument response functions available, and we recommend using this form
  70 +for any analysis.
  71 +
  72 +.. note ::
  73 +
  74 + Instrument response functions are so far only available for a fixed
  75 + zenith angle of 20 deg. Therefore, no zenith or azimuth angle dependence has
  76 + been implented in the CTA response functions, but the dependence can be
  77 + handled by cutting the data into short time segments (typically of 30
  78 + minutes in length), and by specifying specific response functions for
  79 + each segment.
  80 +
  81 +
  82 +Installing the CTA calibration database
  83 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  84 +
  85 +After `downloading
  86 +<https://portal.cta-observatory.org/WG/DM/DM_wiki/DATA_Access/Pages/Science%20Tools.aspx>`_
  87 +the latest calibration database (only possible for CTA consortium members),
  88 +the database is installed using
  89 +
  90 +.. code-block:: bash
  91 +
  92 + $ [sudo] tar -C $CALDB -zxvf cta-caldb-20140216.tar.gz
  93 +
  94 +or
  95 +
  96 +.. code-block:: bash
  97 +
  98 + $ [sudo] tar -C $CALDB -xvf cta-caldb-20140216.tar
  99 +
  100 +depending on whether the database has been retrieved as a gzipped file or
  101 +not. Depending on your access rights to the ``$CALDB`` directory,
  102 +installation of the calibration database may require root privileges
  103 +(type ``sudo`` in this case, otherwise omit this part of the command).
  104 +
  105 +The calibration database must be installed into the directory to which you
  106 +``CALDB`` environment variable points. By default, ctools sets this
  107 +enviroment variable to
  108 +
  109 +.. code-block:: bash
  110 +
  111 + $CTOOLS/share/caldb
  112 +
  113 +but it may be that some other software installation or configuration
  114 +setting on your system overwrites this location. If in doubt, type
  115 +
  116 +.. code-block:: bash
30 117  
  118 + echo $CALDB
  119 +
  120 +to find out to which directory your ``CALDB`` environment variable is set.
  121 +You may always overwrite this setting using
  122 +
  123 +.. code-block:: bash
  124 +
  125 + export CALDB=/my/preferred/caldb/directory
  126 +
  127 +which you can add to your ``.bashrc`` file to set the directory
  128 +permanently.
  129 +ctools will use the ``CALDB`` environment variable to find out where the
  130 +calibration database is located. If needed, this mechanism can be
  131 +circumvented (see :ref:`sec_cta_rsp_abspath`).
  132 +
  133 +
  134 +Specifying the CTA Instrument Response Functions
  135 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  136 +
  137 +The specification of the CTA Instrument Response Functions depends on the
  138 +way how ctools are used. Common to all methods is that the IRFs are
  139 +defined by a response name and a calibration database name. The latter
  140 +may in some cases be the path to a directory on your filesystem.
  141 +
  142 +There are different means to specify the CTA Instrument Response Functions
  143 +when using ctools, and the following section describe the
  144 +
  145 +Using individual event files
  146 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  147 +
  148 +(to be written)
  149 +
  150 +
  151 +Using observation definition files
  152 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  153 +
  154 +(to be written)
  155 +
  156 +
  157 +From within a Python script
  158 +^^^^^^^^^^^^^^^^^^^^^^^^^^^
  159 +
  160 +(to be written)
  161 +
  162 +
  163 +.. _sec_cta_rsp_abspath:
  164 +
  165 +Using absolute path names to instrument response files
  166 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  167 +
  168 +(to be written)
  169 +
  170 +
  171 +Data format details
  172 +~~~~~~~~~~~~~~~~~~~
31 173  
32 174 .. _sec_cta_rsp_perftable:
33 175  
... ... @@ -78,8 +220,8 @@ Below an example of a CTA performance table::
78 220  
79 221 .. _sec_cta_rsp_xspec:
80 222  
81   -1DC Data Format
82   -^^^^^^^^^^^^^^^
  223 +ARF, RMF and PSF files
  224 +^^^^^^^^^^^^^^^^^^^^^^
83 225  
84 226 Instrument response information for the first CTA Data Challenge (1DC) has been
85 227 provided in a format that was heavily inspired by the
... ...