Commit 796a0d884bc258a7e48a30466523dc75277cb5ca

Authored by Jürgen Knödlseder
1 parent 26d34cb1

Clarify units of spectral models

doc/source/user_manual/getting_started/models.rst
... ... @@ -223,6 +223,17 @@ Diffuse source
223 223 .. code-block:: xml
224 224  
225 225 <source name="Crab" type="DiffuseSource">
  226 + <spatialModel type="ConstantValue">
  227 + <parameter name="Value" scale="1" value="1" min="1" max="1" free="0"/>
  228 + </spatialModel>
  229 + <spectrum type="...">
  230 + ...
  231 + </spectrum>
  232 + </source>
  233 +
  234 + .. code-block:: xml
  235 +
  236 + <source name="Crab" type="DiffuseSource">
226 237 <spatialModel type="SpatialMap" file="map.fits">
227 238 <parameter name="Prefactor" scale="1" value="1" min="0.001" max="1000.0" free="0"/>
228 239 </spatialModel>
... ... @@ -339,6 +350,34 @@ Spectral model components
339 350 The following sections present the spectral model components that are available
340 351 in ctools.
341 352  
  353 +.. warning::
  354 +
  355 + The units of the spectral model depend on the spatial model component.
  356 + Units quoted below apply to spatial models for a source component.
  357 + Source intensities are generally given in units of
  358 + :math:`{\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}\,{\rm MeV}^{-1}`.
  359 +
  360 + Exceptions to this rule exist for the following spatial models:
  361 +
  362 + - ``ConstantValue``: intensity units are given per steradian, e.g.
  363 + :math:`{\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}\,{\rm MeV}^{-1}\,{\rm sr}^{-1}`
  364 +
  365 + - ``MapCubeFunction``: intensities are unitless, the spectral model
  366 + presents a relative scaling of the diffuse model
  367 +
  368 + If spectral models are used for a background model component, intensity
  369 + units are generally given in
  370 + :math:`{\rm counts}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}\,{\rm MeV}^{-1}\,{\rm sr}^{-1}`
  371 + and correspond to the on-axis count rate.
  372 +
  373 + Exceptions to this rule exist for the following spatial models:
  374 +
  375 + - ``CTAIrfBackground``: intensities are unitless, the spectral model
  376 + presents a relative scaling of the background model
  377 +
  378 + - ``CTACubeBackground``: intensities are unitless, the spectral model
  379 + presents a relative scaling of the background model
  380 +
342 381  
343 382 Constant
344 383 ^^^^^^^^
... ... @@ -586,12 +625,10 @@ File function
586 625 that is defined by intensity values at specific energies.
587 626 The energy and intensity values are defined using an ASCII file with
588 627 columns of energy and differential flux values.
589   - The energy units are assumed to be :math:`[{\rm MeV}]` and the flux values
590   - are assumed to
591   - :math:`{\rm ph}\,\,{\rm cm}^{-2} {\rm s}^{-1} {\rm MeV}^{-1}`
592   - (the only exception being a model for which the spatial component is
593   - a constant diffuse model; in this case, the units are
594   - :math:`{\rm ph}\,\,{\rm cm}^{-2} {\rm s}^{-1} {\rm MeV}^{-1} {\rm sr}^{-1}`).
  628 + Energies are given in units of
  629 + :math:`[{\rm MeV}]`,
  630 + intensities are given in units of
  631 + :math:`[{\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}\,{\rm MeV}^{-1}]`.
595 632 The only parameter is a multiplicative normalization:
596 633  
597 634 .. math::
... ... @@ -631,11 +668,7 @@ Node function
631 668 Energies are given in units of
632 669 :math:`[{\rm MeV}]`,
633 670 intensities are given in units of
634   - :math:`[{\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}\,{\rm MeV}^{-1}]`
635   - (except for a constant diffuse model where intensities are given in
636   - units of
637   - :math:`[{\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}\,{\rm MeV}^{-1}\,{\rm
638   - sr}^{-1}]`).
  671 + :math:`[{\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}\,{\rm MeV}^{-1}]`.
639 672  
640 673 .. warning::
641 674  
... ...