Spatial source model components¶
The following sections present the spatial model components that are available in ctools for gamma-ray sources.
Note
Except of the DiffuseMapCube
model, all spatial models are normalised
so that when integrated over the sphere the result is unity.
Note
In the following model descriptions, celestial coordinates RA
and DEC
may be replaced by Galactic coordinates GLON
and GLAT
.
Point source¶
The
PointSource
model describes a point source<source name="Crab" type="PointSource"> <spatialModel type="PointSource"> <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="1"/> <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="1"/> </spatialModel> <spectrum type="..."> ... </spectrum> </source>where
RA
is the Right Ascension (degrees)
DEC
is the Declination (degrees)Note
For compatibility with the Fermi/LAT ScienceTools the model type
PointSource
can be replaced bySkyDirFunction
.
Radial source¶
RadialDisk¶
The
RadialDisk
model describes a uniform intensity distribution within a given radius<source name="Crab" type="ExtendedSource"> <spatialModel type="RadialDisk"> <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="1"/> <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="1"/> <parameter name="Radius" scale="1.0" value="0.20" min="0.01" max="10" free="1"/> </spatialModel> <spectrum type="..."> ... </spectrum> </source>where
RA
is the Right Ascension of the disk centre (degrees)
DEC
is the Declination of the disk centre (degrees)
Radius
is the disk radius (degrees)
RadialRing¶
The
RadialRing
model specifies a uniform intensity distribution within a circular ring<source name="Crab" type="ExtendedSource"> <spatialModel type="RadialRing"> <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="1"/> <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="1"/> <parameter name="Radius" scale="1.0" value="0.20" min="0.01" max="10" free="1"/> <parameter name="Width" scale="1.0" value="0.15" min="0.01" max="10" free="1"/> </spatialModel> <spectrum type="..."> ... </spectrum> </source>where
RA
is the Right Ascension of the ring centre (degrees)
DEC
is the Declination of the ring centre (degrees)
Radius
is the inner ring radius (degrees)
Width
is the ring width radius (degrees)Note
Specifying the inner ring radius and ring width guarantees that both parameters are well defined. The ring outer radius is given by
Radius+Width
.
RadialGaussian¶
The
RadialGaussian
model describes a Gaussian intensity distribution<source name="Crab" type="ExtendedSource"> <spatialModel type="RadialGaussian"> <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="1"/> <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="1"/> <parameter name="Sigma" scale="1.0" value="0.20" min="0.01" max="10" free="1"/> </spatialModel> <spectrum type="..."> ... </spectrum> </source>and implements
\[M_{\rm spatial}(\theta) = \frac{1}{2 \pi \sigma^2} \exp \left(-\frac{1}{2}\frac{\theta^2}{\sigma^2} \right),\]where
RA
is the Right Ascension of the Gaussian centre (degrees)
DEC
is the Declination of the Gaussian centre (degrees)\(\sigma\) =
Sigma
(degrees)
RadialGeneralGaussian¶
The
RadialGeneralGaussian
model describes a generalised Gaussian intensity distribution, with the radial profile index as a model parameter.<source name="Crab" type="ExtendedSource"> <spatialModel type="RadialGeneralGaussian"> <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="1"/> <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="1"/> <parameter name="Radius" scale="1.0" value="0.20" min="0.01" max="10" free="1"/> <parameter name="R_Index" scale="1.0" value="0.5" min="0.01" max="10" free="1"/> </spatialModel> <spectrum type="..."> ... </spectrum> </source>and implements
\[M_{\rm spatial}(\theta) = \frac{1}{2 \pi r^2 \eta \Gamma(2\eta)} \exp \left[- \left(\frac{\theta^2}{r^2}\right)^\frac{1}{\eta} \right],\]where
RA
is the Right Ascension of the Gaussian centre (degrees)
DEC
is the Declination of the Gaussian centre (degrees)\(r\) =
Radius
(degrees)\(\eta\) =
R_Index
The model normalisation is correct in the small angle approximation and for \(\eta\) of the order of unity or smaller.
RadialShell¶
The
RadialShell
model describes a spherical shell projected on the sky<source name="Crab" type="ExtendedSource"> <spatialModel type="RadialShell"> <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="1"/> <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="1"/> <parameter name="Radius" scale="1.0" value="0.30" min="0.01" max="10" free="1"/> <parameter name="Width" scale="1.0" value="0.10" min="0.01" max="10" free="1"/> </spatialModel> <spectrum type="..."> ... </spectrum> </source>and implements
\[\begin{split}M_{\rm spatial}(\theta) = n_0 \left \{ \begin{array}{l l} \displaystyle \sqrt{ \theta_{\rm out}^2 - \theta^2 } - \sqrt{ \theta_{\rm in}^2 - \theta^2 } & \mbox{if $\theta \le \theta_{\rm in}$} \\ \\ \displaystyle \sqrt{ \theta_{\rm out}^2 - \theta^2 } & \mbox{if $\theta_{\rm in} < \theta \le \theta_{\rm out}$} \\ \\ \displaystyle 0 & \mbox{if $\theta > \theta_{\rm out}$} \end{array} \right .\end{split}\]where
RA
is the Right Ascension of the shell centre (degrees)
DEC
is the Declination of the shell centre (degrees)\(\theta_{\rm out}\) =
Radius
+Width
(degrees)\(\theta_{\rm in}\) =
Radius
(degrees)
Radial profiles¶
Radial profiles are defined by a arbitrary function of the radial distance from a central position. The following radial profiles exist:
Burkert Dark matter profile¶
<source name="Crab" type="ExtendedSource"> <spatialModel type="DMBurkertProfile"> <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="1"/> <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="1"/> <parameter name="ScaleRadius" scale="1.0" value="21.5" min="0.0001" max="1000" free="0"/> <parameter name="ScaleDensity" scale="1.0" value="0.2" min="0.0001" max="1000" free="0"/> <parameter name="HaloDistance" scale="1.0" value="7.94" min="0.0001" max="1000" free="0"/> <parameter name="ThetaMin" scale="1.0" value="1.0e-6" min="1.0e-10" max="1000" free="0"/> <parameter name="ThetaMax" scale="1.0" value="180.0" min="0.0001" max="1000" free="0"/> <parameter name="CoreRadius" scale="1.0" value="0.5" min="0.0001" max="1000" free="0"/> </spatialModel> <spectrum type="..."> ... </spectrum> </source>
Einasto Dark matter profile¶
<source name="Crab" type="ExtendedSource"> <spatialModel type="DMEinastoProfile"> <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="1"/> <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="1"/> <parameter name="ScaleRadius" scale="1.0" value="21.5" min="0.0001" max="1000" free="0"/> <parameter name="ScaleDensity" scale="1.0" value="0.2" min="0.0001" max="1000" free="0"/> <parameter name="HaloDistance" scale="1.0" value="7.94" min="0.0001" max="1000" free="0"/> <parameter name="Alpha" scale="1.0" value="0.17" min="0.0001" max="1000" free="0"/> <parameter name="ThetaMin" scale="1.0" value="1.0e-6" min="1.0e-10" max="1000" free="0"/> <parameter name="ThetaMax" scale="1.0" value="180.0" min="0.0001" max="1000" free="0"/> <parameter name="CoreRadius" scale="1.0" value="0.5" min="0.0001" max="1000" free="0"/> </spatialModel> <spectrum type="..."> ... </spectrum> </source>
Zhao Dark matter profile¶
<source name="Crab" type="ExtendedSource"> <spatialModel type="DMZhaoProfile"> <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="1"/> <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="1"/> <parameter name="ScaleRadius" scale="1.0" value="21.5" min="0.0001" max="1000" free="0"/> <parameter name="ScaleDensity" scale="1.0" value="0.2" min="0.0001" max="1000" free="0"/> <parameter name="HaloDistance" scale="1.0" value="7.94" min="0.0001" max="1000" free="0"/> <parameter name="Alpha" scale="1.0" value="0.17" min="0.0001" max="1000" free="0"/> <parameter name="Beta" scale="1.0" value="3.00" min="0.0001" max="1000" free="0"/> <parameter name="Gamma" scale="1.0" value="1.00" min="0.0001" max="1000" free="0"/> <parameter name="ThetaMin" scale="1.0" value="1.0e-6" min="1.0e-10" max="1000" free="0"/> <parameter name="ThetaMax" scale="1.0" value="180.0" min="0.0001" max="1000" free="0"/> <parameter name="CoreRadius" scale="1.0" value="0.5" min="0.0001" max="1000" free="0"/> </spatialModel> <spectrum type="..."> ... </spectrum> </source>
Gaussian profile¶
This profile is equivalent to
RadialGaussian
.<source name="Crab" type="ExtendedSource"> <spatialModel type="GaussianProfile"> <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="1"/> <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="1"/> <parameter name="Sigma" scale="1.0" value="0.45" min="0.01" max="10" free="1"/> </spatialModel> <spectrum type="..."> ... </spectrum> </source>
Elliptical source¶
EllipticalDisk¶
The
EllipticalDisk
model describes a uniform intensity distribution within an elliptical circumference:<source name="Crab" type="ExtendedSource"> <spatialModel type="EllipticalDisk"> <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="1"/> <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="1"/> <parameter name="PA" scale="1.0" value="45.0" min="-360" max="360" free="1"/> <parameter name="MinorRadius" scale="1.0" value="0.5" min="0.001" max="10" free="1"/> <parameter name="MajorRadius" scale="1.0" value="2.0" min="0.001" max="10" free="1"/> </spatialModel> <spectrum type="..."> ... </spectrum> </source>where
RA
is the Right Ascension (degrees)
DEC
is the Declination (degrees)
PA
is the position angle, counted counterclockwise from North (degrees)
MinorRadius
is the minor radius of the ellipse (degrees)
MajorRadius
is the major radius of the ellipse (degrees)
EllipticalGaussian¶
The
EllipticalGaussian
model describes a Gaussian intensity distribution<source name="Crab" type="ExtendedSource"> <spatialModel type="EllipticalGaussian"> <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="1"/> <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="1"/> <parameter name="PA" scale="1.0" value="45.0" min="-360" max="360" free="1"/> <parameter name="MinorRadius" scale="1.0" value="0.5" min="0.001" max="10" free="1"/> <parameter name="MajorRadius" scale="1.0" value="2.0" min="0.001" max="10" free="1"/> </spatialModel> <spectrum type="..."> ... </spectrum> </source>and implements
\[M_{\rm spatial}(\theta, \phi) = \exp \left( -\frac{\theta^2}{2 r_\mathrm{eff}^2} \right),\]with
\[r_\mathrm{eff} = \frac{ab} {\sqrt{\left( a \sin (\phi - \phi_0) \right)^2 + \sqrt{\left( b \cos (\phi - \phi_0) \right)^2}}}\]where
RA
is the Right Ascension (degrees)
DEC
is the Declination (degrees)
PA
is the position angle, counted counterclockwise from North (degrees)\(a\) =
MinorRadius
(degrees)\(b\) =
MajorRadius
(degrees)\(\phi_0\) is the position angle of the ellipse, counted counterclockwise from North
\(\phi\) is the azimuth angle with respect to North.
EllipticalGeneralGaussian¶
The
EllipticalGeneralGaussian
model describes a Gaussian intensity distribution<source name="Crab" type="ExtendedSource"> <spatialModel type="EllipticalGeneralGaussian"> <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="1"/> <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="1"/> <parameter name="PA" scale="1.0" value="45.0" min="-360" max="360" free="1"/> <parameter name="MinorRadius" scale="1.0" value="0.5" min="0.001" max="10" free="1"/> <parameter name="MajorRadius" scale="1.0" value="2.0" min="0.001" max="10" free="1"/> <parameter name="R_Index" scale="1.0" value="0.5" min="0.01" max="10" free="1"/> </spatialModel> <spectrum type="..."> ... </spectrum> </source>and implements
\[M_{\rm spatial}(\theta, \phi) = \frac{1}{2 \pi r^2 \eta \Gamma(2\eta)} \exp \left[ -\left(\frac{\theta^2}{2 r_\mathrm{eff}^2}\right)^\frac{1}{\eta} \right],\]with
\[r_\mathrm{eff} = \frac{ab} {\sqrt{\left( a \sin (\phi - \phi_0) \right)^2 + \sqrt{\left( b \cos (\phi - \phi_0) \right)^2}}}\]where
RA
is the Right Ascension (degrees)
DEC
is the Declination (degrees)
PA
is the position angle, counted counterclockwise from North (degrees)\(a\) =
MinorRadius
(degrees)\(b\) =
MajorRadius
(degrees)\(\phi_0\) is the position angle of the ellipse, counted counterclockwise from North
\(\phi\) is the azimuth angle with respect to North
\(\eta\) =
R_Index
The model normalisation is correct in the small angle approximation and for \(\eta\) of the order of unity or smaller.
Diffuse source¶
DiffuseIsotropic¶
The
DiffuseIsotropic
model describes an isotropic intensity distribution<source name="Crab" type="DiffuseSource"> <spatialModel type="DiffuseIsotropic"> <parameter name="Value" scale="1" value="1" min="1" max="1" free="0"/> </spatialModel> <spectrum type="..."> ... </spectrum> </source>where
Value
is isotropic intensityNote
For compatibility with the Fermi/LAT ScienceTools the model type
DiffuseIsotropic
can be replaced byConstantValue
.
DiffuseMap¶
The
DiffuseMap
model describes an arbitrary intensity distribution in form of a sky map<source name="Crab" type="DiffuseSource"> <spatialModel type="DiffuseMap" file="map.fits"> <parameter name="Normalization" scale="1" value="1" min="0.001" max="1000.0" free="0"/> </spatialModel> <spectrum type="..."> ... </spectrum> </source>where
Normalization
is a normalization valueand the
file
attribute specifies a sky map FITS file name. If a file name without path is specified it is assumed that the FITS file resides in the same directory as the model definition XML file.Note
For compatibility with the Fermi/LAT ScienceTools the model type
DiffuseMap
can be replaced bySpatialMap
and the parameterNormalization
can be replaced byPrefactor
.Note
By default, the diffuse map is normalised so that
\[\int_{\Omega} M_{\rm spatial}(p|E) \, d\Omega = 1\]which means that the units of the spatial model component are \([M_{\rm spatial}] = {\rm sr}^{-1}\). To avoid the normalisation you may add the
normalize="0"
attribute to the spatial model tag.<source name="Crab" type="DiffuseSource"> <spatialModel type="DiffuseMap" file="map.fits" normalize="0"> <parameter name="Normalization" scale="1" value="1" min="0.001" max="1000.0" free="0"/> </spatialModel> <spectrum type="..."> ... </spectrum> </source>In that case, generally
\[\int_{\Omega} M_{\rm spatial}(p|E) \, d\Omega \neq 1\]and the spectral component cannot be directly interpreted as a physical source intensity.
DiffuseMapCube¶
The
DiffuseMapCube
model describes an arbitrary energy-dependent intensity distribution in form of a map cube<source name="Crab" type="DiffuseSource"> <spatialModel type="DiffuseMapCube" file="map_cube.fits"> <parameter name="Normalization" scale="1" value="1" min="0.001" max="1000.0" free="0"/> </spatialModel> <spectrum type="..."> ... </spectrum> </source>where
Normalization
is a normalization valueNote that the map cube is not normalised to unit, hence generally
\[\int_{\Omega} M_{\rm spatial}(p|E) \, d\Omega \neq 1\]To compute the flux in a given energy band for a
DiffuseMapCube
model you have to integrated both the spatial and spectral components, i.e.\[\Phi = \int_{\Omega} \int_{E} M_{\rm spatial}(p|E) \times M_{\rm spectral}(E)\, d\Omega \, dE\]Note
For compatibility with the Fermi/LAT ScienceTools the model type
DiffuseMapCube
can be replaced byMapCubeFunction
and the parameterNormalization
can be replaced byValue
.
Composite model¶
The
Composite
model implements a composite model that is the sum of an arbitrary number of spatial models<source name="Crab" type="CompositeSource"> <spatialModel type="Composite"> <spatialModel type="PointSource" component="PointSource"> <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="1"/> <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="1"/> </spatialModel> <spatialModel type="RadialGaussian"> <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="1"/> <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="1"/> <parameter name="Sigma" scale="1.0" value="0.20" min="0.01" max="10" free="1"/> </spatialModel> </spatialModel> <spectrum type="..."> ... </spectrum> </source>which implements
\[M_{\rm spatial}(p|E) = \frac{1}{N} \sum_{i=0}^{N-1} M_{\rm spatial}^{(i)}(p|E)\]where \(M_{\rm spatial}^{(i)}(p|E)\) is any spatial model component (including another composite model), and \(N\) is the number of model components that are combined.