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 normalized
so that when integrated over the sphere the result is unity. For clarify,
the spatial normalisation is omitted in the formulae below.
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)The
RA
andDEC
parameters can be remplaced byGLON
andGLAT
for Galactic coordinates<source name="Crab" type="PointSource"> <spatialModel type="PointSource"> <parameter name="GLON" scale="1.0" value="184.5575" min="-360" max="360" free="1"/> <parameter name="GLAT" scale="1.0" value="-5.7844" min="-90" max="90" free="1"/> </spatialModel> <spectrum type="..."> ... </spectrum> </source>where
GLON
is the Galactic longitude (degrees)GLAT
is the Galactic latitude (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 (degrees)DEC
is the Declination (degrees)Radius
is the disk radius (degrees)
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 (degrees)DEC
is the Declination (degrees)- \(\sigma\) =
Sigma
(degrees)
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 (degrees)DEC
is the Declination (degrees)- \(\theta_{\rm out}\) =
Radius
+Width
(degrees)- \(\theta_{\rm in}\) =
Radius
(degrees)Note
For all radial source models the
RA
andDEC
parameters can be remplaced byGLON
andGLAT
for Galactic coordinates.
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.
Note
For all elliptical source models the
RA
andDEC
parameters can be remplaced byGLON
andGLAT
for Galactic coordinates.
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.