From 797a50cb140ab53cd26ec9fbe151d19762cc1556 Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Fri, 19 Feb 2016 18:25:15 +0100 Subject: [PATCH] More and more docs --- doc/source/user_manual/iact_analysis/analysis.rst | 31 +++++++++++++++++++++++++++++++ doc/source/user_manual/iact_analysis/high_level.rst | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ doc/source/user_manual/iact_analysis/tipps.rst | 31 ------------------------------- doc/source/user_manual/iact_analysis/tips.rst | 34 ++++++++++++++++++++++++++++++++++ 4 files changed, 116 insertions(+), 31 deletions(-) delete mode 100644 doc/source/user_manual/iact_analysis/tipps.rst create mode 100644 doc/source/user_manual/iact_analysis/tips.rst diff --git a/doc/source/user_manual/iact_analysis/analysis.rst b/doc/source/user_manual/iact_analysis/analysis.rst index 6fefc66..98b734c 100644 --- a/doc/source/user_manual/iact_analysis/analysis.rst +++ b/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 for the newly created background cube is included. Sky models present in the input model XML file will also be included in the new XML file, which subsequently can be used for binned :ref:`ctlike`. +Example for stacked model XML file +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +The output model of :ref:`ctbkgcube` looks the following: + +.. code-block:: xml + + + + + + + + + + + + + + + + + + + + + + + +The background model with ``type=CTACubeBackground`` is used to scale the background cube stored in the FITS file +created by :ref:`ctbkgcube`. + Run ctlike ^^^^^^^^^^ Having all the intermediate data products ready, a binned analysis can be conducted using :ref:`ctlike`. diff --git a/doc/source/user_manual/iact_analysis/high_level.rst b/doc/source/user_manual/iact_analysis/high_level.rst index 052a5a0..082328a 100644 --- a/doc/source/user_manual/iact_analysis/high_level.rst +++ b/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: Input event list, counts cube or observation definition XML file [selected_obs.xml] Input model XML file [crab_models.xml] Source of interest [Crab] + Output model XML file [cterror_results.xml] +The output model does not contain asymmetric errors yet. The positive and negative uncertainties can be read from the +logfile (or from screen) if ``debug=yes`` was specified. Compute spectral points ----------------------- +A very common task in astronomy is to compute spectral data points. To determine a spectral data point, a small energy +range is considered and the model prefactor and its uncertainty is evaluated. The tool :ref:`csspec` works on both, binned +and unbinned data. + +Unbinned +^^^^^^^^ + +.. code-block:: bash + + $ csspec debug=yes + Input event list, counts cube, or observation definition XML file [events.fits] selected_obs.xml + Input model XML file [$CTOOLS/share/models/crab.xml] crab_models.xml + Source name [Crab] + Algorithm for defining energy bins (FILE|LIN|LOG) [LOG] + Lower energy limit for spectral points (TeV) [0.1] 0.5 + Upper energy limit for spectral points (TeV) [100.0] 50.0 + Number of spectral points (1-10000) [20] 10 + Output spectrum file [spectrum.fits] + +Binned +^^^^^^ + +.. code-block:: bash + + $ csspec debug=yes + Input event list, counts cube, or observation definition XML file [cntcube.fits] + Input exposure cube file (only needed for stacked analysis) [expcube.fits] + Input PSF cube file (only needed for stacked analysis) [psfcube.fits] + Input background cube file (only needed for stacked analysis) [bkgcube.fits] + Input model XML file [binned_models.xml] + Source name [Crab] + Number of spectral points (1-10000) [10] + Lower energy limit for spectral points (TeV) [0.5] + Upper energy limit for spectral points (TeV) [50.0] + Output spectrum file [spectrum.fits] + + +Plot spectral points +^^^^^^^^^^^^^^^^^^^^ +Instead of supporting a plotting library, simple example scripts are available to visualise data products. +Have a look at ``$CTOOLS/examples/show_spectrum.py`` how a spectrum can be plotted using ``matplotlib``. +To have first glance at the above computed spectrum one can use this script in the following way: + +.. code-block:: bash + + $ python $CTOOLS/examples/show_spectrum.py spectrum.fits + Compute light curves -------------------- +Euqally common in astronomy are light curves from a time-series analysis. Compute a residual map ---------------------- diff --git a/doc/source/user_manual/iact_analysis/tipps.rst b/doc/source/user_manual/iact_analysis/tipps.rst deleted file mode 100644 index b3e51cf..0000000 --- a/doc/source/user_manual/iact_analysis/tipps.rst +++ /dev/null @@ -1,31 +0,0 @@ -.. _sec_tipps: - -Tips, Tricks and FAQs -===================== - -Visualise observations ----------------------- - -Visualise models ----------------- - -Create count map with one energy bin ------------------------------------- - -Plot zenith angle distribution of observations ----------------------------------------------- - -Split TS map computation ------------------------- - -Accessing fit parameters in python ----------------------------------- - -Accessing upper limits in python --------------------------------- - -Manipulate models in python ---------------------------- - -Creating a python analysis pipeline ------------------------------------ \ No newline at end of file diff --git a/doc/source/user_manual/iact_analysis/tips.rst b/doc/source/user_manual/iact_analysis/tips.rst new file mode 100644 index 0000000..cecb01e --- /dev/null +++ b/doc/source/user_manual/iact_analysis/tips.rst @@ -0,0 +1,34 @@ +.. _sec_tipps: + +Tips, Tricks and FAQs +===================== + +Visualise observations +---------------------- + +Visualise models +---------------- + +Increase analysis speed +----------------------- + +Create count map with one energy bin +------------------------------------ + +Plot zenith angle distribution of observations +---------------------------------------------- + +Split TS map computation +------------------------ + +Accessing fit parameters in python +---------------------------------- + +Accessing upper limits in python +-------------------------------- + +Manipulate models in python +--------------------------- + +Creating a python analysis pipeline +----------------------------------- \ No newline at end of file -- libgit2 0.21.4