Commit 797a50cb140ab53cd26ec9fbe151d19762cc1556

Authored by Michael Mayer
1 parent d92c32be

More and more docs

doc/source/user_manual/iact_analysis/analysis.rst
@@ -385,6 +385,37 @@ sky cube. In the output model the background models per obseervation will be rem @@ -385,6 +385,37 @@ sky cube. In the output model the background models per obseervation will be rem
385 for the newly created background cube is included. Sky models present in the input model XML file will also be included in the 385 for the newly created background cube is included. Sky models present in the input model XML file will also be included in the
386 new XML file, which subsequently can be used for binned :ref:`ctlike`. 386 new XML file, which subsequently can be used for binned :ref:`ctlike`.
387 387
  388 +Example for stacked model XML file
  389 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  390 +The output model of :ref:`ctbkgcube` looks the following:
  391 +
  392 +.. code-block:: xml
  393 +
  394 + <?xml version="1.0" encoding="UTF-8" standalone="no"?>
  395 + <source_library title="source library">
  396 + <source name="BackgroundModel" type="CTACubeBackground" instrument="CTA,HESS,MAGIC,VERITAS">
  397 + <spectrum type="PowerLaw">
  398 + <parameter name="Prefactor" value="1" error="0" scale="1" min="0.01" max="100" free="1" />
  399 + <parameter name="Index" value="0" error="0" scale="1" min="-5" max="5" free="1" />
  400 + <parameter name="Scale" value="1" scale="1e+06" free="0" />
  401 + </spectrum>
  402 + </source>
  403 + <source name="Crab" type="PointSource">
  404 + <spectrum type="PowerLaw">
  405 + <parameter name="Prefactor" scale="1e-17" value="3.0" min="1e-07" max="1000.0" free="1"/>
  406 + <parameter name="Index" scale="-1" value="2.48" min="0.0" max="+5.0" free="1"/>
  407 + <parameter name="Scale" scale="1e6" value="1." min="0.01" max="1000.0" free="0"/>
  408 + </spectrum>
  409 + <spatialModel type="SkyDirFunction">
  410 + <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="0"/>
  411 + <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="0"/>
  412 + </spatialModel>
  413 + </source>
  414 + </source_library>
  415 +
  416 +The background model with ``type=CTACubeBackground`` is used to scale the background cube stored in the FITS file
  417 +created by :ref:`ctbkgcube`.
  418 +
388 Run ctlike 419 Run ctlike
389 ^^^^^^^^^^ 420 ^^^^^^^^^^
390 Having all the intermediate data products ready, a binned analysis can be conducted using :ref:`ctlike`. 421 Having all the intermediate data products ready, a binned analysis can be conducted using :ref:`ctlike`.
doc/source/user_manual/iact_analysis/high_level.rst
@@ -111,13 +111,64 @@ source of interest. For this purpose, the tool :ref:`cterror` can be used: @@ -111,13 +111,64 @@ source of interest. For this purpose, the tool :ref:`cterror` can be used:
111 Input event list, counts cube or observation definition XML file [selected_obs.xml] 111 Input event list, counts cube or observation definition XML file [selected_obs.xml]
112 Input model XML file [crab_models.xml] 112 Input model XML file [crab_models.xml]
113 Source of interest [Crab] 113 Source of interest [Crab]
  114 + Output model XML file [cterror_results.xml]
114 115
  116 +The output model does not contain asymmetric errors yet. The positive and negative uncertainties can be read from the
  117 +logfile (or from screen) if ``debug=yes`` was specified.
115 118
116 Compute spectral points 119 Compute spectral points
117 ----------------------- 120 -----------------------
  121 +A very common task in astronomy is to compute spectral data points. To determine a spectral data point, a small energy
  122 +range is considered and the model prefactor and its uncertainty is evaluated. The tool :ref:`csspec` works on both, binned
  123 +and unbinned data.
  124 +
  125 +Unbinned
  126 +^^^^^^^^
  127 +
  128 +.. code-block:: bash
  129 +
  130 + $ csspec debug=yes
  131 + Input event list, counts cube, or observation definition XML file [events.fits] selected_obs.xml
  132 + Input model XML file [$CTOOLS/share/models/crab.xml] crab_models.xml
  133 + Source name [Crab]
  134 + Algorithm for defining energy bins (FILE|LIN|LOG) [LOG]
  135 + Lower energy limit for spectral points (TeV) [0.1] 0.5
  136 + Upper energy limit for spectral points (TeV) [100.0] 50.0
  137 + Number of spectral points (1-10000) [20] 10
  138 + Output spectrum file [spectrum.fits]
  139 +
  140 +Binned
  141 +^^^^^^
  142 +
  143 +.. code-block:: bash
  144 +
  145 + $ csspec debug=yes
  146 + Input event list, counts cube, or observation definition XML file [cntcube.fits]
  147 + Input exposure cube file (only needed for stacked analysis) [expcube.fits]
  148 + Input PSF cube file (only needed for stacked analysis) [psfcube.fits]
  149 + Input background cube file (only needed for stacked analysis) [bkgcube.fits]
  150 + Input model XML file [binned_models.xml]
  151 + Source name [Crab]
  152 + Number of spectral points (1-10000) [10]
  153 + Lower energy limit for spectral points (TeV) [0.5]
  154 + Upper energy limit for spectral points (TeV) [50.0]
  155 + Output spectrum file [spectrum.fits]
  156 +
  157 +
  158 +Plot spectral points
  159 +^^^^^^^^^^^^^^^^^^^^
  160 +Instead of supporting a plotting library, simple example scripts are available to visualise data products.
  161 +Have a look at ``$CTOOLS/examples/show_spectrum.py`` how a spectrum can be plotted using ``matplotlib``.
  162 +To have first glance at the above computed spectrum one can use this script in the following way:
  163 +
  164 +.. code-block:: bash
  165 +
  166 + $ python $CTOOLS/examples/show_spectrum.py spectrum.fits
  167 +
118 168
119 Compute light curves 169 Compute light curves
120 -------------------- 170 --------------------
  171 +Euqally common in astronomy are light curves from a time-series analysis.
121 172
122 Compute a residual map 173 Compute a residual map
123 ---------------------- 174 ----------------------
doc/source/user_manual/iact_analysis/tipps.rst renamed to doc/source/user_manual/iact_analysis/tips.rst
@@ -9,6 +9,9 @@ Visualise observations @@ -9,6 +9,9 @@ Visualise observations
9 Visualise models 9 Visualise models
10 ---------------- 10 ----------------
11 11
  12 +Increase analysis speed
  13 +-----------------------
  14 +
12 Create count map with one energy bin 15 Create count map with one energy bin
13 ------------------------------------ 16 ------------------------------------
14 17