Commit 70e82b84111713b225e20421f04ef3e3057842aa

Authored by Michael Mayer
1 parent 960b5b79

Added latest changes (forgot in previous commit)

doc/source/user_manual/iact_analysis/analysis.rst
... ... @@ -204,16 +204,114 @@ observations and binning and reduces the loss of data.
204 204  
205 205 Create exposure cube
206 206 ^^^^^^^^^^^^^^^^^^^^
  207 +After binning the events into a three-dimensional cube, an exposure cube has to be computed.
  208 +The exposure is defined as the effective area times the dead-time corrected observation time.
  209 +Each observation from the input container gets stacked in the resulting cube. The exposure is stored
  210 +in units of cm^2 s. The exposure cube does not have to contain the same binning as the event cube
  211 +but for simplicity, the event cube can be passed to adopt the binning parameters. This task is performed by
  212 +:ref:`ctexpcube`.
  213 +
  214 +.. code-block:: bash
  215 +
  216 + $ ctexpcube
  217 + Event list or observation definition file [NONE] selected_obs.xml
  218 + Input counts cube file to extract exposure cube definition [NONE] cntcube.fits
  219 + Output exposure cube file [expcube.fits]
  220 +
  221 +Alternatively, the exposure cube can be created with different binning than the event cube:
  222 +
  223 +.. code-block:: bash
  224 +
  225 + $ ctexpcube
  226 + Input event list or observation definition XML file [NONE] selected_obs.xml
  227 + Input counts cube file to extract exposure cube definition [NONE]
  228 + First coordinate of image center in degrees (RA or galactic l) (0-360) [83.63]
  229 + Second coordinate of image center in degrees (DEC or galactic b) (-90-90) [22.01]
  230 + Projection method (AIT|AZP|CAR|MER|MOL|STG|TAN) [CAR]
  231 + Coordinate system (CEL - celestial, GAL - galactic) (CEL|GAL) [CEL]
  232 + Image scale (in degrees/pixel) [0.02] 0.04
  233 + Size of the X axis in pixels [200] 100
  234 + Size of the Y axis in pixels [200] 100
  235 + Lower energy limit (TeV) [0.5]
  236 + Upper energy limit (TeV) [50.0]
  237 + Number of energy bins [20] 30
  238 + Output exposure cube file [expcube.fits]
207 239  
208 240 Create psf cube
209 241 ^^^^^^^^^^^^^^^
  242 +As a next step for the binned analysis, a cube containing the point spread function (PSF) must be computed.
  243 +Since the PSF cannot be stored by one single parameter, The PSF cube computed by :ref:`ctpsfcube` has a fourth dimension.
  244 +In each bin of the cube, the PSF ist stored as a function of offset from source. The granularity of the
  245 +PSF histogram is determined by the hidden parameter ``anumbins`` (default: 200). Therefore, when passing
  246 +the event cube ot adopt the sky binning for the PSF cube, the resulting FITS file can become quite large due to
  247 +the fourth dimension. Usually in IACT analysis, the PSF doesn't change too dramatically across the field of view.
  248 +Therefore the user can think about reducing the spatial binning of the PSF cube:
  249 +
  250 +.. code-block:: bash
  251 +
  252 + $ ctpsfcube
  253 + Input event list or observation definition XML file [NONE] selected_obs.xml
  254 + Input counts cube file to extract PSF cube definition [NONE]
  255 + First coordinate of image center in degrees (RA or galactic l) (0-360) [83.63]
  256 + Second coordinate of image center in degrees (DEC or galactic b) (-90-90) [22.01]
  257 + Projection method (AIT|AZP|CAR|MER|MOL|STG|TAN) [CAR]
  258 + Coordinate system (CEL - celestial, GAL - galactic) (CEL|GAL) [CEL]
  259 + Image scale (in degrees/pixel) [1.0] 0.2
  260 + Size of the X axis in pixels [10] 20
  261 + Size of the Y axis in pixels [10] 20
  262 + Lower energy limit (TeV) [0.1] 0.5
  263 + Upper energy limit (TeV) [100.0] 50
  264 + Number of energy bins [20]
  265 + Output PSF cube file [psfcube.fits]
  266 +
  267 +Depending on the required PSF precision, one could reduce the number of offset bins via the hidden parameter
  268 +``anumbins``:
  269 +
  270 +.. code-block:: bash
  271 +
  272 + $ ctpsfcube anumbins=100
210 273  
211 274 Create background cube
212 275 ^^^^^^^^^^^^^^^^^^^^^^
  276 +Last but not least, for a binned IACT analysis a cube containing the background rate in sky coordinates and
  277 +reconstructed energy has to be computed. This task is performed by :ref:`ctbkgcube`. The binning here can also differ
  278 +from the event cube. For simplicity, however, the example below uses the event cube to adopt the binning.
  279 +
  280 +.. code-block:: bash
  281 +
  282 + $ ctbkgcube debug=yes
  283 + Input event list or observation definition XML file [NONE] selected_obs.xml
  284 + Input counts cube file to extract background cube definition [NONE] cntcube.fits
  285 + Input model XML file [NONE] crab_models.xml
  286 + Output background cube file [bkgcube.fits]
  287 + Output model XML file [NONE] binned_models.xml
  288 +
  289 +Note that this tool also requires the parameters of an input and output model. In the model XML file that came out of
  290 +:ref:`csiactobs`, one background model per observation is included. This models get merged and averaged in the background
  291 +sky cube. In the output model the background models per obseervation will be removed. Instead, a global background model
  292 +for the newly created background cube is included. Sky models present in the input model XML file will also be included in the
  293 +new XML file, which subsequently can be used for binned :ref:`ctlike`.
213 294  
214 295 Run ctlike
215 296 ^^^^^^^^^^
  297 +Having all the intermediate data products ready, a binned analysis can be conducted using :ref:`ctlike`.
  298 +
  299 +.. code-block:: bash
  300 +
  301 + $ ctlike
  302 + Input event list, counts cube or observation definition XML file [events.fits] cntcube.fits
  303 + Input exposure cube file (only needed for stacked analysis) [NONE] expcube.fits
  304 + Input PSF cube file (only needed for stacked analysis) [NONE] psfcube.fits
  305 + Input background cube file (only needed for stacked analysis) [NONE] bkgcube.fits
  306 + Input model XML file [binned_models.xml]
  307 + Output model XML file [binned_results.xml]
  308 +
  309 +Note that when passing an event cube to :ref:`ctlike`, the tool behaves differently than in unbinned mode.
  310 +It queries directly for the additional ingredients for the binned analysis. It is important to pass the background model
  311 +generated by :ref:`ctbkgcube` here to ensure the proper modelling of the background in the fit.
  312 +The usage of energy dispersion cannot be included in binned analyses yet. Therefore, the hidden parameter ``edisp=yes``
  313 +has no effect in this case.
  314 +
  315 +
216 316  
217   -Compute spectral points
218   ------------------------
219 317  
... ...
doc/source/user_manual/iact_analysis/copy.rst
... ... @@ -55,8 +55,8 @@ parameter ``runlist`` then needs to be specified.
55 55  
56 56 $ csiactcopy runlist=myrunlist.txt debug=yes
57 57  
58   -Notes
59   ------
  58 +Troubleshooting
  59 +---------------
60 60 In case a download was interupted (e.g. the remote file system was disconnected), the script can simply be rerun.
61 61 The index files which list the files available on the system are refreshed after the copying process.
62 62 The hidden boolean parameter ``clobber`` (default=yes) specifies if the user wishes that local content should be overwritten with
... ...
doc/source/user_manual/iact_analysis/index.rst
... ... @@ -7,6 +7,7 @@ Analysis using current IACT data
7 7  
8 8 copy
9 9 analysis
  10 + high_level
10 11 simulation
11 12 tipps
12 13  
... ...
doc/source/user_manual/iact_analysis/simulation.rst
... ... @@ -3,5 +3,28 @@
3 3 Simulating IACT data
4 4 ====================
5 5  
6   -Before you start
7   -----------------
8 6 \ No newline at end of file
  7 +
  8 +
  9 +Simulations for a specific observation container
  10 +------------------------------------------------
  11 +
  12 +Simulating observation time for a given set of IRFs
  13 +---------------------------------------------------
  14 +
  15 +Create caldb entry
  16 +^^^^^^^^^^^^^^^^^^
  17 +
  18 +Simulate
  19 +^^^^^^^^
  20 +
  21 +Create pull distributions
  22 +-------------------------
  23 +
  24 +Visualise pull distributions
  25 +----------------------------
  26 +
  27 +Create sensitiviy curve
  28 +-----------------------
  29 +
  30 +Visualise sensitivity curves
  31 +----------------------------
9 32 \ No newline at end of file
... ...
doc/source/user_manual/iact_analysis/tipps.rst
1 1 .. _sec_tipps:
2 2  
3   -Tips and Tricks
4   -===============
  3 +Tips, Tricks and FAQs
  4 +=====================
  5 +
  6 +Visualise observations
  7 +----------------------
  8 +
  9 +Visualise models
  10 +----------------
  11 +
  12 +Create count map with one energy bin
  13 +------------------------------------
  14 +
  15 +Plot zenith angle distribution of observations
  16 +----------------------------------------------
  17 +
  18 +Split TS map computation
  19 +------------------------
  20 +
  21 +Accessing fit parameters in python
  22 +----------------------------------
  23 +
  24 +Manipulate models in python
  25 +---------------------------
  26 +
  27 +Creating a python analysis pipeline
  28 +-----------------------------------
5 29 \ No newline at end of file
... ...