Commit 58fd52f72d65dc7e3548964d23729ad45c089237

Authored by Jürgen Knödlseder
1 parent 54ac6307

Update the User documentation

doc/source/users/reference_manual/csroot2caldb.rst 0 → 100644
  1 +.. _csroot2caldb:
  2 +
  3 +csroot2caldb
  4 +============
  5 +
  6 +Creates a caldb entry from a ROOT performance file.
  7 +
  8 +
  9 +Synopsis
  10 +--------
  11 +
  12 +This script creates an entry in the local calibration database from a ROOT
  13 +performance file.
  14 +
  15 +
  16 +General parameters
  17 +------------------
  18 +
  19 +``infile [file]``
  20 + Input ROOT performance file file.
  21 +
  22 +``(outdir = ) [string]``
  23 + Output CALDB directory.
  24 +
  25 +``inst [string]``
  26 + Instrument name.
  27 +
  28 +``id [string]``
  29 + Instrument Response Function identifier.
  30 +
  31 +``version [string]``
  32 + Instrument Response Function version.
  33 +
  34 +``analysis [string]``
  35 + Instrument Response Function analysis.
  36 +
  37 +``zenith [real]``
  38 + Zenith angle (in degrees).
  39 +
  40 +``azimuth [real]``
  41 + Azimuth angle (in degrees).
  42 +
  43 +``(emin = UNDEF) [real]``
  44 + Minimum energy threshold (TeV).
  45 +
  46 +``(emax = UNDEF) [real]``
  47 + Maximum energy threshold (TeV).
  48 +
  49 +``(psftype = Gauss) [string]``
  50 + Point spread function type.
  51 +
  52 +``(split = no) [boolean]``
  53 + Split IRF components into different files.
  54 +
  55 +``(norm1d = no) [boolean]``
  56 + Normalize on 1D histograms.
  57 +
  58 +``(rebin = no) [boolean]``
  59 + Rebin.
  60 +
  61 +``(eascale = 1.0) [real]``
  62 + Scaling factor for effective areas.
  63 +
  64 +``(bgdscale = 1.0) [real]``
  65 + Scaling factor for background rates.
  66 +
  67 +``(bgdoversample = 1) [integer]``
  68 + Spatial oversampling factor for background template.
  69 +
  70 +``(bgdethres = 1000.0) [real]``
  71 + Energy above which to replace background by power law (TeV).
  72 +
  73 +``(bgdinfill = no) [boolean]``
  74 + Infill of background template?.
  75 +
  76 +
  77 +Standard parameters
  78 +-------------------
  79 +
  80 +``(chatter = 2) [integer]``
  81 + Verbosity of the executable:
  82 + ``chatter = 0``: no information will be logged
  83 +
  84 + ``chatter = 1``: only errors will be logged
  85 +
  86 + ``chatter = 2``: errors and actions will be logged
  87 +
  88 + ``chatter = 3``: report about the task execution
  89 +
  90 + ``chatter = 4``: detailed report about the task execution
  91 +
  92 +``(clobber = yes) [boolean]``
  93 + Specifies whether an existing output file should be overwritten.
  94 +
  95 +``(debug = no) [boolean]``
  96 + Enables debug mode. In debug mode the executable will dump any log file output to the console.
  97 +
  98 +``(mode = ql) [string]``
  99 + Mode of automatic parameters (default is "ql", i.e. "query and learn").
  100 +
  101 +``(logfile = csroot2caldb.log) [filename]``
  102 + Log filename.
  103 +
  104 +
  105 +Related tools or scripts
  106 +------------------------
  107 +
  108 +:doc:`cscaldb`
... ...
doc/source/users/reference_manual/index.rst
... ... @@ -53,6 +53,7 @@ cscripts
53 53 csphasecrv --- Computes phase curve <csphasecrv>
54 54 cspull --- Generates pull distribution <cspull>
55 55 csresmap --- Generates residual map <csresmap>
  56 + csroot2caldb --- Creates a caldb entry from a ROOT file <csroot2caldb>
56 57 cssens --- Computes CTA sensitivity <cssens>
57 58 csspec --- Computes spectral points <csspec>
58 59 cssrcdetect --- Detects sources in sky map <cssrcdetect>
... ...
doc/source/users/user_manual/getting_started/index.rst deleted
1   -.. _sec_using:
2   -
3   -Using ctools
4   -============
5   -
6   -.. toctree::
7   - :maxdepth: 1
8   -
9   - python
10   - models
11   - response
12   -
doc/source/users/user_manual/index.rst
1   -===========
  1 +.. _sec_user_manual:
  2 +
2 3 User Manual
3 4 ===========
4 5  
... ... @@ -6,6 +7,7 @@ User Manual
6 7 :maxdepth: 1
7 8  
8 9 introduction
9   - getting_started/index
  10 + response
  11 + models
10 12 plotting
11   -
  13 + python
... ...
doc/source/users/user_manual/introduction.rst
... ... @@ -53,8 +53,7 @@ command line or used as Python classes, as illustrated below:
53 53 >>> import cscripts
54 54 >>> pull = cscripts.cspull()
55 55  
56   -In this User Manual you will now learn how to install and use the ctools
57   -package.
  56 +In this User Manual you will now learn how to use the ctools package.
58 57 If you encounter any problems, please read the :ref:`sec_help` section.
59 58 And you should read the :ref:`sec_develop` section if you would like to
60 59 contribute to the ctools developments.
... ...
doc/source/users/user_manual/getting_started/irf-aeff.png renamed to doc/source/users/user_manual/irf-aeff.png

3.24 KB

doc/source/users/user_manual/getting_started/irf-file.png renamed to doc/source/users/user_manual/irf-file.png

7.1 KB

doc/source/users/user_manual/getting_started/irfs.jpg renamed to doc/source/users/user_manual/irfs.jpg

27.6 KB

doc/source/users/user_manual/getting_started/model_lightcurve.png renamed to doc/source/users/user_manual/model_lightcurve.png

65.4 KB

doc/source/users/user_manual/getting_started/model_phasecurve.png renamed to doc/source/users/user_manual/model_phasecurve.png

26.9 KB

doc/source/users/user_manual/getting_started/models.rst renamed to doc/source/users/user_manual/models.rst
doc/source/users/user_manual/getting_started/python.rst renamed to doc/source/users/user_manual/python.rst
... ... @@ -303,8 +303,9 @@ Here an example of how to use ``obsutils``:
303 303 Number of predicted events : 0
304 304 >>> obs.models(gammalib.GModels("${CTOOLS}/share/models/crab.xml"))
305 305 >>> obs = obsutils.sim(obs)
306   - >>> like = obsutils.fit(obs)
307   - >>> print(like.obs().models())
  306 + >>> like = ctools.ctlike(obs)
  307 + >>> like.run()
  308 + >>> print(like.obs().models())
308 309 === GModels ===
309 310 Number of models ..........: 2
310 311 Number of parameters ......: 10
... ... @@ -320,13 +321,10 @@ cover the 0.1-100 TeV energy range and a field of view of 5°.
320 321 The ``South_0.5h`` IRF from the Prod2 calibration database will be used.
321 322 A model is then appended to the observation container using the
322 323 ``obs.models()`` method.
323   -The ``obsutils.sim()`` function then simulates the event data, the
324   -``obsutils.fit()`` function performs a maximum likelihood fit.
325   -
326   -.. note::
327   -
328   - The ``obsutils`` module is not yet fully developed and more convenience
329   - functions will be added in the future.
  324 +The ``obsutils.sim()`` function then simulates the event data and returns
  325 +an observation container with the simulated observations.
  326 +The observation container is then passed to ``ctlike`` for maximum likelihood
  327 +fitting.
330 328  
331 329  
332 330 Access analysis results
... ... @@ -365,13 +363,21 @@ In the following it is assumed that you have a ctlike object called
365 363  
366 364 .. code-block:: python
367 365  
368   - like.opt().value() # Returns likelihood value
  366 + logL = like.opt().value() # Returns log-likelihood value
  367 + print(logL)
  368 +
  369 + or alternatively
  370 +
  371 + .. code-block:: python
  372 +
  373 + logL = like.obs().function().value() # Returns log-likelihood value
  374 + print(logL)
369 375  
370 376 * Curvature Matrix (aka Hessian)
371 377  
372 378 .. code-block:: python
373 379  
374   - curvature = like.opt().curvature().invert() # Return GMatrix object
  380 + curvature = like.obs().function().curvature() # Return GMatrixSparse object
375 381 print(curvature)
376 382  
377 383 To get the covariance matrix, the curvature matrix needs to be
... ...
doc/source/users/user_manual/getting_started/response.rst renamed to doc/source/users/user_manual/response.rst