diff --git a/doc/source/users/user_manual/getting_started/beyond_combine.rst b/doc/source/users/user_manual/getting_started/beyond_combine.rst index 00fca4c..611cda6 100644 --- a/doc/source/users/user_manual/getting_started/beyond_combine.rst +++ b/doc/source/users/user_manual/getting_started/beyond_combine.rst @@ -194,7 +194,7 @@ the log file: 2016-06-29T19:14:38: Instrument scale factors ..: unity 2016-06-29T19:14:38: Observation identifiers ...: all 2016-06-29T19:14:38: Model type ................: PointSource - 2016-06-29T19:14:38: Model components ..........: "SkyDirFunction" * "PowerLaw" * "Constant" + 2016-06-29T19:14:38: Model components ..........: "PointSource" * "PowerLaw" * "Constant" 2016-06-29T19:14:38: Number of parameters ......: 6 2016-06-29T19:14:38: Number of spatial par's ...: 2 2016-06-29T19:14:38: RA .......................: 83.6331 [-360,360] deg (fixed,scale=1) diff --git a/doc/source/users/user_manual/getting_started/beyond_irf.rst b/doc/source/users/user_manual/getting_started/beyond_irf.rst index 68d6751..7bdb4ca 100644 --- a/doc/source/users/user_manual/getting_started/beyond_irf.rst +++ b/doc/source/users/user_manual/getting_started/beyond_irf.rst @@ -176,7 +176,7 @@ both observations. 2016-06-29T20:10:30: Instrument scale factors ..: unity 2016-06-29T20:10:30: Observation identifiers ...: all 2016-06-29T20:10:30: Model type ................: PointSource - 2016-06-29T20:10:30: Model components ..........: "SkyDirFunction" * "PowerLaw" * "Constant" + 2016-06-29T20:10:30: Model components ..........: "PointSource" * "PowerLaw" * "Constant" 2016-06-29T20:10:30: Number of parameters ......: 6 2016-06-29T20:10:30: Number of spatial par's ...: 2 2016-06-29T20:10:30: RA .......................: 83.6331 [-360,360] deg (fixed,scale=1) diff --git a/doc/source/users/user_manual/getting_started/beyond_model.rst b/doc/source/users/user_manual/getting_started/beyond_model.rst index 2db8335..54388ac 100644 --- a/doc/source/users/user_manual/getting_started/beyond_model.rst +++ b/doc/source/users/user_manual/getting_started/beyond_model.rst @@ -42,27 +42,27 @@ tied to the ``events2.fits`` file. - - - + + + - + - - - + + + - - - + + + @@ -104,27 +104,27 @@ This is illustrated in the model definition file below where component - - - + + + - + - - - + + + - - - + + + diff --git a/doc/source/users/user_manual/getting_started/beyond_stacked.rst b/doc/source/users/user_manual/getting_started/beyond_stacked.rst index 9adf29e..b6c8236 100644 --- a/doc/source/users/user_manual/getting_started/beyond_stacked.rst +++ b/doc/source/users/user_manual/getting_started/beyond_stacked.rst @@ -145,7 +145,7 @@ modelling works: - + @@ -156,7 +156,7 @@ modelling works: - + @@ -256,7 +256,7 @@ below. 2016-06-29T19:54:17: Instrument scale factors ..: unity 2016-06-29T19:54:17: Observation identifiers ...: all 2016-06-29T19:54:17: Model type ................: PointSource - 2016-06-29T19:54:17: Model components ..........: "SkyDirFunction" * "PowerLaw" * "Constant" + 2016-06-29T19:54:17: Model components ..........: "PointSource" * "PowerLaw" * "Constant" 2016-06-29T19:54:17: Number of parameters ......: 6 2016-06-29T19:54:17: Number of spatial par's ...: 2 2016-06-29T19:54:17: RA .......................: 83.6331 [-360,360] deg (fixed,scale=1) diff --git a/doc/source/users/user_manual/getting_started/energy_dispersion.rst b/doc/source/users/user_manual/getting_started/energy_dispersion.rst index 733f8c1..60da875 100644 --- a/doc/source/users/user_manual/getting_started/energy_dispersion.rst +++ b/doc/source/users/user_manual/getting_started/energy_dispersion.rst @@ -102,7 +102,7 @@ Below you see the output from the ``ctlike.log`` file. 2016-06-29T20:33:50: Instrument scale factors ..: unity 2016-06-29T20:33:50: Observation identifiers ...: all 2016-06-29T20:33:50: Model type ................: PointSource - 2016-06-29T20:33:50: Model components ..........: "SkyDirFunction" * "PowerLaw" * "Constant" + 2016-06-29T20:33:50: Model components ..........: "PointSource" * "PowerLaw" * "Constant" 2016-06-29T20:33:50: Number of parameters ......: 6 2016-06-29T20:33:50: Number of spatial par's ...: 2 2016-06-29T20:33:50: RA .......................: 83.6331 [-360,360] deg (fixed,scale=1) diff --git a/doc/source/users/user_manual/getting_started/fitting.rst b/doc/source/users/user_manual/getting_started/fitting.rst index aef7a03..dd0994e 100644 --- a/doc/source/users/user_manual/getting_started/fitting.rst +++ b/doc/source/users/user_manual/getting_started/fitting.rst @@ -42,7 +42,7 @@ Below we show the XML result file that has been produced by the run: - + @@ -53,7 +53,7 @@ Below we show the XML result file that has been produced by the run: - + @@ -112,7 +112,7 @@ this run: 2016-06-29T16:11:08: Instrument scale factors ..: unity 2016-06-29T16:11:08: Observation identifiers ...: all 2016-06-29T16:11:08: Model type ................: PointSource - 2016-06-29T16:11:08: Model components ..........: "SkyDirFunction" * "PowerLaw" * "Constant" + 2016-06-29T16:11:08: Model components ..........: "PointSource" * "PowerLaw" * "Constant" 2016-06-29T16:11:08: Number of parameters ......: 6 2016-06-29T16:11:08: Number of spatial par's ...: 2 2016-06-29T16:11:08: RA .......................: 83.6331 [-360,360] deg (fixed,scale=1) diff --git a/doc/source/users/user_manual/getting_started/models.rst b/doc/source/users/user_manual/getting_started/models.rst index 93614d3..972f773 100644 --- a/doc/source/users/user_manual/getting_started/models.rst +++ b/doc/source/users/user_manual/getting_started/models.rst @@ -67,11 +67,11 @@ function that is tabulated in an ASCII file. - - - + + + - + @@ -144,7 +144,7 @@ Point source .. code-block:: xml - + @@ -153,6 +153,11 @@ Point source + .. note:: + + For compatibility with the Fermi/LAT ScienceTools the model type ``PointSource`` + can be replaced by ``SkyDirFunction``. + Radial source ^^^^^^^^^^^^^ @@ -160,7 +165,7 @@ Radial source .. code-block:: xml - + @@ -173,7 +178,7 @@ Radial source .. code-block:: xml - + @@ -186,7 +191,7 @@ Radial source .. code-block:: xml - + @@ -219,7 +224,7 @@ Elliptical source .. code-block:: xml - + @@ -238,7 +243,7 @@ Diffuse source .. code-block:: xml - + @@ -246,21 +251,32 @@ Diffuse source + .. note:: + + For compatibility with the Fermi/LAT ScienceTools the model type + ``DiffuseIsotropic`` can be replaced by ``ConstantValue``. + .. code-block:: xml - - + + ... + .. note:: + + For compatibility with the Fermi/LAT ScienceTools the model type + ``DiffuseMap`` can be replaced by ``SpatialMap`` and the parameter + ``Normalization`` can be replaced by ``Prefactor``. + .. code-block:: xml - + @@ -268,6 +284,12 @@ Diffuse source + .. note:: + + For compatibility with the Fermi/LAT ScienceTools the model type + ``DiffuseMapCube`` can be replaced by ``MapCubeFunction`` and the parameter + ``Normalization`` can be replaced by ``Value``. + CTA radial background ^^^^^^^^^^^^^^^^^^^^^ @@ -358,10 +380,10 @@ in ctools. Exceptions to this rule exist for the following spatial models: - - ``ConstantValue``: intensity units are given per steradian, e.g. + - ``DiffuseIsotropic``: intensity units are given per steradian, e.g. :math:`{\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}\,{\rm MeV}^{-1}\,{\rm sr}^{-1}` - - ``MapCubeFunction``: intensities are unitless, the spectral model + - ``DiffuseMapCube``: intensities are unitless, the spectral model presents a relative scaling of the diffuse model If spectral models are used for a background model component, intensity @@ -395,7 +417,7 @@ Constant where * :math:`N_0` = ``Normalization`` - :math:`[{\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}\,{\rm MeV}^{-1}]` + :math:`({\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}\,{\rm MeV}^{-1})` @@ -405,9 +427,9 @@ Power law .. code-block:: xml - - - + + + The ``PowerLaw`` model component implements the power law function @@ -418,28 +440,33 @@ Power law where * :math:`k_0` = ``Prefactor`` - :math:`[{\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}\,{\rm MeV}^{-1}]` + :math:`({\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}\,{\rm MeV}^{-1})` * :math:`\gamma` = ``Index`` - * :math:`E_0` = ``Scale`` - :math:`[{\rm MeV}]` + * :math:`E_0` = ``PivotEnergy`` + :math:`({\rm MeV})` .. warning:: - The ``Scale`` parameter is not intended to be fitted. + The ``PivotEnergy`` parameter is not intended to be fitted. + + .. note:: + + For compatibility with the Fermi/LAT ScienceTools the parameter + ``PivotEnergy`` can be replaced by ``Scale``. - An alternative power law function that uses the integral flux as parameter + An alternative power law function that uses the integral photon flux as parameter rather than the Prefactor is specified by .. code-block:: xml - - + + - The ``PowerLaw2`` model component implements the power law function + The ``PowerLawPhotonFlux`` model component implements the power law function .. math:: \frac{dN}{dE} = \frac{N(\gamma+1)E^{\gamma}} @@ -447,22 +474,28 @@ Power law where - * :math:`N` = ``Integral`` - :math:`[{\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}]` + * :math:`N` = ``PhotonFlux`` + :math:`({\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1})` * :math:`\gamma` = ``Index`` * :math:`E_{\rm min}` = ``LowerLimit`` - :math:`[{\rm MeV}]` + :math:`({\rm MeV})` * :math:`E_{\rm max}` = ``UpperLimit`` - :math:`[{\rm MeV}]` + :math:`({\rm MeV})` .. warning:: The ``LowerLimit`` and ``UpperLimit`` parameters are always treated as fixed and, - the flux given by the ``Integral`` parameter is computed over the + the flux given by the ``PhotonFlux`` parameter is computed over the range set by these two parameters. Use of this model allows the errors on the integral flux to be evaluated directly by :ref:`ctlike`. + .. note:: + + For compatibility with the Fermi/LAT ScienceTools the model type + ``PowerLawPhotonFlux`` can be replaced by ``PowerLaw2`` and the parameter + ``PhotonFlux`` can be replaced by ``Integral``. + Exponentially cut-off power law ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -470,10 +503,10 @@ Exponentially cut-off power law .. code-block:: xml - - - - + + + + The ``ExpCutoff`` model component implements the exponentially cut-off power law function @@ -485,17 +518,21 @@ Exponentially cut-off power law where * :math:`k_0` = ``Prefactor`` - :math:`[{\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}\,{\rm MeV}^{-1}]` + :math:`({\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}\,{\rm MeV}^{-1})` * :math:`\gamma` = ``Index`` - * :math:`E_0` = ``Scale`` - :math:`[{\rm MeV}]` + * :math:`E_0` = ``PivotEnergy`` + :math:`({\rm MeV})` * :math:`E_{\rm cut}` = ``Cutoff`` - :math:`[{\rm MeV}]` + :math:`({\rm MeV})` .. warning:: - The ``Scale`` parameter is not intended to be fitted. + The ``PivotEnergy`` parameter is not intended to be fitted. + + .. note:: + For compatibility with the Fermi/LAT ScienceTools the parameter + ``PivotEnergy`` can be replaced by ``Scale``. Broken power law @@ -524,11 +561,11 @@ Broken power law where * :math:`k_0` = ``Prefactor`` - :math:`[{\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}\,{\rm MeV}^{-1}]` + :math:`({\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}\,{\rm MeV}^{-1})` * :math:`\gamma_1` = ``Index1`` * :math:`\gamma_2` = ``Index2`` * :math:`E_b` = ``BreakValue`` - :math:`[{\rm MeV}]` + :math:`({\rm MeV})` .. warning:: @@ -543,10 +580,10 @@ Log parabola .. code-block:: xml - - - - + + + + The ``LogParabola`` model component implements the log parabola function @@ -557,25 +594,26 @@ Log parabola where * :math:`k_0` = ``Prefactor`` - :math:`[{\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}\,{\rm MeV}^{-1}]` + :math:`({\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}\,{\rm MeV}^{-1})` * :math:`\gamma` = ``Index`` * :math:`\eta` = ``Curvature`` - * :math:`E_0` = ``Scale`` - :math:`[{\rm MeV}]` + * :math:`E_0` = ``PivotEnergy`` + :math:`({\rm MeV})` .. warning:: - The ``Scale`` parameter is not intended to be fitted. + The ``PivotEnergy`` parameter is not intended to be fitted. - An alternative XML format is supported for compatibility with the Fermi/LAT XML format: + An alternative XML format is supported for compatibility with the Fermi/LAT + XML format: .. code-block:: xml - - - - + + + + where @@ -604,11 +642,11 @@ Gaussian where * :math:`N_0` = ``Normalization`` - :math:`[{\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}]` + :math:`({\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1})` * :math:`\bar{E}` = ``Mean`` - :math:`[{\rm MeV}]` + :math:`({\rm MeV})` * :math:`\sigma` = ``Sigma`` - :math:`[{\rm MeV}]` + :math:`({\rm MeV})` File function @@ -625,9 +663,9 @@ File function The energy and intensity values are defined using an ASCII file with columns of energy and differential flux values. Energies are given in units of - :math:`[{\rm MeV}]`, + :math:`{\rm MeV}`, intensities are given in units of - :math:`[{\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}\,{\rm MeV}^{-1}]`. + :math:`{\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}\,{\rm MeV}^{-1}`. The only parameter is a multiplicative normalization: .. math:: @@ -665,9 +703,9 @@ Node function power law which is defined by a set of energy and intensity values (the so called nodes) that are piecewise connected by power laws. Energies are given in units of - :math:`[{\rm MeV}]`, + :math:`{\rm MeV}`, intensities are given in units of - :math:`[{\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}\,{\rm MeV}^{-1}]`. + :math:`{\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}\,{\rm MeV}^{-1}`. .. warning:: diff --git a/doc/source/users/user_manual/getting_started/python.rst b/doc/source/users/user_manual/getting_started/python.rst index aaf6fed..1761650 100644 --- a/doc/source/users/user_manual/getting_started/python.rst +++ b/doc/source/users/user_manual/getting_started/python.rst @@ -170,7 +170,7 @@ member of the observation container: Instrument scale factors ..: unity Observation identifiers ...: all Model type ................: PointSource - Model components ..........: "SkyDirFunction" * "PowerLaw" * "Constant" + Model components ..........: "PointSource" * "PowerLaw" * "Constant" Number of parameters ......: 6 Number of spatial par's ...: 2 RA .......................: 83.6331 [-360,360] deg (fixed,scale=1) diff --git a/doc/source/users/user_manual/getting_started/simulating.rst b/doc/source/users/user_manual/getting_started/simulating.rst index 0799cbe..42076a0 100644 --- a/doc/source/users/user_manual/getting_started/simulating.rst +++ b/doc/source/users/user_manual/getting_started/simulating.rst @@ -68,9 +68,9 @@ The source and background model is defined by the XML file - - - + + + @@ -78,12 +78,12 @@ The source and background model is defined by the XML file - - - - + + + + - + The model consists of a source library that contains two components: @@ -103,8 +103,8 @@ maximum (``max``) value, and a parameter may be free (``free="1"``) or fixed relevant here for the simulations, but they will be important for the model fitting later. -The spectral intensity I(E) (in units of photons/cm2/s/MeV) of the power -law is given by +The spectral intensity I(E) (in units of photons/cm2/s/MeV) of the power law is +given by .. math:: \frac{dN}{dE} = N_0 \left( \frac{E}{E_0} \right)^{\gamma} @@ -113,7 +113,7 @@ where the parameters in the XML definition have the following mappings: * :math:`N_0` = ``Prefactor`` * :math:`\gamma` = ``Index`` -* :math:`E_0` = ``Scale`` +* :math:`E_0` = ``PivotEnergy`` .. warning:: diff --git a/doc/source/users/user_manual/getting_started/unbinned.rst b/doc/source/users/user_manual/getting_started/unbinned.rst index 850bf26..b2a5452 100644 --- a/doc/source/users/user_manual/getting_started/unbinned.rst +++ b/doc/source/users/user_manual/getting_started/unbinned.rst @@ -175,7 +175,7 @@ the same events for both analyses. 2016-06-29T16:24:45: Instrument scale factors ..: unity 2016-06-29T16:24:45: Observation identifiers ...: all 2016-06-29T16:24:45: Model type ................: PointSource - 2016-06-29T16:24:45: Model components ..........: "SkyDirFunction" * "PowerLaw" * "Constant" + 2016-06-29T16:24:45: Model components ..........: "PointSource" * "PowerLaw" * "Constant" 2016-06-29T16:24:45: Number of parameters ......: 6 2016-06-29T16:24:45: Number of spatial par's ...: 2 2016-06-29T16:24:45: RA .......................: 83.6331 [-360,360] deg (fixed,scale=1) diff --git a/doc/source/users/user_manual/iact_analysis/analysis.rst b/doc/source/users/user_manual/iact_analysis/analysis.rst index 7cff125..e38d0e0 100644 --- a/doc/source/users/user_manual/iact_analysis/analysis.rst +++ b/doc/source/users/user_manual/iact_analysis/analysis.rst @@ -229,31 +229,31 @@ Model definition XML file - + - + - + - + - - - + + + - + @@ -514,18 +514,18 @@ The output model of :ref:`ctbkgcube` looks the following: - - - + + + - - - + + + - + diff --git a/doc/source/users/user_manual/iact_analysis/high_level.rst b/doc/source/users/user_manual/iact_analysis/high_level.rst index 95cb650..c68edd6 100644 --- a/doc/source/users/user_manual/iact_analysis/high_level.rst +++ b/doc/source/users/user_manual/iact_analysis/high_level.rst @@ -3,7 +3,8 @@ High level analysis tools for IACT data ======================================= -This section describes and explains how to create high level output. The following tools are explained: +This section describes and explains how to create high level output. The +following scripts and tools are explained: * :ref:`csobsinfo` (inspect and observation XML files) * :ref:`csmodelinfo` (inspect model XML files) @@ -16,9 +17,10 @@ This section describes and explains how to create high level output. The followi Inspecting observation definition files --------------------------------------- -After having created an observation definition file, the user might want to know a summary of its content. -Important quantities usually are the number of observations, the total livetime, or the mean zenith angle. -For this purpose, :ref:`csobsinfo` inspects an observation XML container for its content. +After having created an observation definition file, the user might want to +know a summary of its content. Important quantities usually are the number of +observations, the total livetime, or the mean zenith angle. For this purpose, +:ref:`csobsinfo` inspects an observation XML container for its content. .. code-block:: bash diff --git a/doc/source/users/user_manual/iact_analysis/simulation.rst b/doc/source/users/user_manual/iact_analysis/simulation.rst index f50fb51..de9e16c 100644 --- a/doc/source/users/user_manual/iact_analysis/simulation.rst +++ b/doc/source/users/user_manual/iact_analysis/simulation.rst @@ -142,20 +142,20 @@ e.g. for the Crab Nebula: - - - + + + - + - - - + + + diff --git a/doc/source/users/user_manual/iact_analysis/tips.rst b/doc/source/users/user_manual/iact_analysis/tips.rst index fbddce1..38326c7 100644 --- a/doc/source/users/user_manual/iact_analysis/tips.rst +++ b/doc/source/users/user_manual/iact_analysis/tips.rst @@ -264,20 +264,20 @@ excess map. In the section about :ref:`high level analysis tools - - + + - - - + + + diff --git a/doc/source/users/user_manual/introduction.rst b/doc/source/users/user_manual/introduction.rst index 5f2367f..cf05565 100644 --- a/doc/source/users/user_manual/introduction.rst +++ b/doc/source/users/user_manual/introduction.rst @@ -20,7 +20,8 @@ also be specified as arguments separated by a whitespace to the ctool: .. code-block:: bash - $ ctobssim ra=83.63 dec=22.01 rad=5.0 tmin=0 tmax=1800 emin=0.1 emax=100.0 caldb=prod2 irf=South_50h inmodel=$CTOOLS/share/models/crab.xml outevents=events.fits + $ ctobssim ra=83.63 dec=22.01 rad=5.0 tmin=0 tmax=1800 emin=0.1 emax=100.0 caldb=prod2 irf=South_0.5h \ + inmodel=$CTOOLS/share/models/crab.xml outevents=events.fits If you need help about the usage of a ctool or a cscript, type the name of the ctool or cscript followed by the ``--help`` option: diff --git a/test/data/sciver/crab_const.xml b/test/data/sciver/crab_const.xml index c47dfee..fcd7e05 100644 --- a/test/data/sciver/crab_const.xml +++ b/test/data/sciver/crab_const.xml @@ -7,7 +7,7 @@ - + diff --git a/test/data/sciver/crab_plaw2.xml b/test/data/sciver/crab_plaw2.xml index 274ee57..1384507 100644 --- a/test/data/sciver/crab_plaw2.xml +++ b/test/data/sciver/crab_plaw2.xml @@ -2,7 +2,7 @@ - + diff --git a/test/science_verification.py b/test/science_verification.py index d5ebeb0..63a72c4 100755 --- a/test/science_verification.py +++ b/test/science_verification.py @@ -26,13 +26,13 @@ # along with this program. If not, see . # # ========================================================================== -import gammalib -import ctools -import cscripts import os import csv import math import sys +import gammalib +import ctools +import cscripts # ========================== # @@ -375,7 +375,7 @@ class sciver(gammalib.GPythonTestSuite): Test power law 2 model """ self.pull('data/sciver/crab_plaw2') - self.test('Pull_Crab_Integral') + self.test('Pull_Crab_PhotonFlux') self.test('Pull_Crab_Index') self.test('Pull_Background_Prefactor') self.test('Pull_Background_Index')