Commit 7de3c72c9b05f2edb1bcdf899ff2669f0663ce88

Authored by Jürgen Knödlseder
1 parent 673710bd

Make compliant to latest GammaLib interface change (model XML format)

doc/source/users/user_manual/getting_started/beyond_combine.rst
@@ -194,7 +194,7 @@ the log file: @@ -194,7 +194,7 @@ the log file:
194 2016-06-29T19:14:38: Instrument scale factors ..: unity 194 2016-06-29T19:14:38: Instrument scale factors ..: unity
195 2016-06-29T19:14:38: Observation identifiers ...: all 195 2016-06-29T19:14:38: Observation identifiers ...: all
196 2016-06-29T19:14:38: Model type ................: PointSource 196 2016-06-29T19:14:38: Model type ................: PointSource
197 - 2016-06-29T19:14:38: Model components ..........: "SkyDirFunction" * "PowerLaw" * "Constant" 197 + 2016-06-29T19:14:38: Model components ..........: "PointSource" * "PowerLaw" * "Constant"
198 2016-06-29T19:14:38: Number of parameters ......: 6 198 2016-06-29T19:14:38: Number of parameters ......: 6
199 2016-06-29T19:14:38: Number of spatial par's ...: 2 199 2016-06-29T19:14:38: Number of spatial par's ...: 2
200 2016-06-29T19:14:38: RA .......................: 83.6331 [-360,360] deg (fixed,scale=1) 200 2016-06-29T19:14:38: RA .......................: 83.6331 [-360,360] deg (fixed,scale=1)
doc/source/users/user_manual/getting_started/beyond_irf.rst
@@ -176,7 +176,7 @@ both observations. @@ -176,7 +176,7 @@ both observations.
176 2016-06-29T20:10:30: Instrument scale factors ..: unity 176 2016-06-29T20:10:30: Instrument scale factors ..: unity
177 2016-06-29T20:10:30: Observation identifiers ...: all 177 2016-06-29T20:10:30: Observation identifiers ...: all
178 2016-06-29T20:10:30: Model type ................: PointSource 178 2016-06-29T20:10:30: Model type ................: PointSource
179 - 2016-06-29T20:10:30: Model components ..........: "SkyDirFunction" * "PowerLaw" * "Constant" 179 + 2016-06-29T20:10:30: Model components ..........: "PointSource" * "PowerLaw" * "Constant"
180 2016-06-29T20:10:30: Number of parameters ......: 6 180 2016-06-29T20:10:30: Number of parameters ......: 6
181 2016-06-29T20:10:30: Number of spatial par's ...: 2 181 2016-06-29T20:10:30: Number of spatial par's ...: 2
182 2016-06-29T20:10:30: RA .......................: 83.6331 [-360,360] deg (fixed,scale=1) 182 2016-06-29T20:10:30: RA .......................: 83.6331 [-360,360] deg (fixed,scale=1)
doc/source/users/user_manual/getting_started/beyond_model.rst
@@ -42,27 +42,27 @@ tied to the ``events2.fits`` file. @@ -42,27 +42,27 @@ tied to the ``events2.fits`` file.
42 <source_library title="source library"> 42 <source_library title="source library">
43 <source name="Crab" type="PointSource"> 43 <source name="Crab" type="PointSource">
44 <spectrum type="PowerLaw"> 44 <spectrum type="PowerLaw">
45 - <parameter name="Prefactor" scale="1e-16" value="5.7" min="1e-07" max="1000.0" free="1"/>  
46 - <parameter name="Index" scale="-1" value="2.48" min="0.0" max="+5.0" free="1"/>  
47 - <parameter name="Scale" scale="1e6" value="0.3" min="0.01" max="1000.0" free="0"/> 45 + <parameter name="Prefactor" scale="1e-16" value="5.7" min="1e-07" max="1000.0" free="1"/>
  46 + <parameter name="Index" scale="-1" value="2.48" min="0.0" max="+5.0" free="1"/>
  47 + <parameter name="PivotEnergy" scale="1e6" value="0.3" min="0.01" max="1000.0" free="0"/>
48 </spectrum> 48 </spectrum>
49 - <spatialModel type="SkyDirFunction"> 49 + <spatialModel type="PointSource">
50 <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="0"/> 50 <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="0"/>
51 <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="0"/> 51 <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="0"/>
52 </spatialModel> 52 </spatialModel>
53 </source> 53 </source>
54 <source name="Background_00001" type="CTAIrfBackground" instrument="CTA" id="00001"> 54 <source name="Background_00001" type="CTAIrfBackground" instrument="CTA" id="00001">
55 <spectrum type="PowerLaw"> 55 <spectrum type="PowerLaw">
56 - <parameter name="Prefactor" scale="1.0" value="1.0" min="1e-3" max="1e+3" free="1"/>  
57 - <parameter name="Index" scale="1.0" value="0.0" min="-5.0" max="+5.0" free="1"/>  
58 - <parameter name="Scale" scale="1e6" value="1.0" min="0.01" max="1000.0" free="0"/> 56 + <parameter name="Prefactor" scale="1.0" value="1.0" min="1e-3" max="1e+3" free="1"/>
  57 + <parameter name="Index" scale="1.0" value="0.0" min="-5.0" max="+5.0" free="1"/>
  58 + <parameter name="PivotEnergy" scale="1e6" value="1.0" min="0.01" max="1000.0" free="0"/>
59 </spectrum> 59 </spectrum>
60 </source> 60 </source>
61 <source name="Background_00002" type="CTAIrfBackground" instrument="CTA" id="00002"> 61 <source name="Background_00002" type="CTAIrfBackground" instrument="CTA" id="00002">
62 <spectrum type="PowerLaw"> 62 <spectrum type="PowerLaw">
63 - <parameter name="Prefactor" scale="1.0" value="10.0" min="1e-3" max="1e+3" free="1"/>  
64 - <parameter name="Index" scale="1.0" value="0.0" min="-5.0" max="+5.0" free="1"/>  
65 - <parameter name="Scale" scale="1e6" value="1.0" min="0.01" max="1000.0" free="0"/> 63 + <parameter name="Prefactor" scale="1.0" value="10.0" min="1e-3" max="1e+3" free="1"/>
  64 + <parameter name="Index" scale="1.0" value="0.0" min="-5.0" max="+5.0" free="1"/>
  65 + <parameter name="PivotEnergy" scale="1e6" value="1.0" min="0.01" max="1000.0" free="0"/>
66 </spectrum> 66 </spectrum>
67 </source> 67 </source>
68 </source_library> 68 </source_library>
@@ -104,27 +104,27 @@ This is illustrated in the model definition file below where component @@ -104,27 +104,27 @@ This is illustrated in the model definition file below where component
104 <source_library title="source library"> 104 <source_library title="source library">
105 <source name="Crab" type="PointSource"> 105 <source name="Crab" type="PointSource">
106 <spectrum type="PowerLaw"> 106 <spectrum type="PowerLaw">
107 - <parameter name="Prefactor" scale="1e-16" value="5.7" min="1e-07" max="1000.0" free="1"/>  
108 - <parameter name="Index" scale="-1" value="2.48" min="0.0" max="+5.0" free="1"/>  
109 - <parameter name="Scale" scale="1e6" value="0.3" min="0.01" max="1000.0" free="0"/> 107 + <parameter name="Prefactor" scale="1e-16" value="5.7" min="1e-07" max="1000.0" free="1"/>
  108 + <parameter name="Index" scale="-1" value="2.48" min="0.0" max="+5.0" free="1"/>
  109 + <parameter name="PivotEnergy" scale="1e6" value="0.3" min="0.01" max="1000.0" free="0"/>
110 </spectrum> 110 </spectrum>
111 - <spatialModel type="SkyDirFunction"> 111 + <spatialModel type="PointSource">
112 <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="0"/> 112 <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="0"/>
113 <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="0"/> 113 <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="0"/>
114 </spatialModel> 114 </spatialModel>
115 </source> 115 </source>
116 <source name="Background_00001" type="CTAIrfBackground" instrument="CTA" id="00001,00003,00004"> 116 <source name="Background_00001" type="CTAIrfBackground" instrument="CTA" id="00001,00003,00004">
117 <spectrum type="PowerLaw"> 117 <spectrum type="PowerLaw">
118 - <parameter name="Prefactor" scale="1.0" value="1.0" min="1e-3" max="1e+3" free="1"/>  
119 - <parameter name="Index" scale="1.0" value="0.0" min="-5.0" max="+5.0" free="1"/>  
120 - <parameter name="Scale" scale="1e6" value="1.0" min="0.01" max="1000.0" free="0"/> 118 + <parameter name="Prefactor" scale="1.0" value="1.0" min="1e-3" max="1e+3" free="1"/>
  119 + <parameter name="Index" scale="1.0" value="0.0" min="-5.0" max="+5.0" free="1"/>
  120 + <parameter name="PivotEnergy" scale="1e6" value="1.0" min="0.01" max="1000.0" free="0"/>
121 </spectrum> 121 </spectrum>
122 </source> 122 </source>
123 <source name="Background_00002" type="CTAIrfBackground" instrument="CTA" id="00002"> 123 <source name="Background_00002" type="CTAIrfBackground" instrument="CTA" id="00002">
124 <spectrum type="PowerLaw"> 124 <spectrum type="PowerLaw">
125 - <parameter name="Prefactor" scale="1.0" value="10.0" min="1e-3" max="1e+3" free="1"/>  
126 - <parameter name="Index" scale="1.0" value="0.0" min="-5.0" max="+5.0" free="1"/>  
127 - <parameter name="Scale" scale="1e6" value="1.0" min="0.01" max="1000.0" free="0"/> 125 + <parameter name="Prefactor" scale="1.0" value="10.0" min="1e-3" max="1e+3" free="1"/>
  126 + <parameter name="Index" scale="1.0" value="0.0" min="-5.0" max="+5.0" free="1"/>
  127 + <parameter name="PivotEnergy" scale="1e6" value="1.0" min="0.01" max="1000.0" free="0"/>
128 </spectrum> 128 </spectrum>
129 </source> 129 </source>
130 </source_library> 130 </source_library>
doc/source/users/user_manual/getting_started/beyond_stacked.rst
@@ -145,7 +145,7 @@ modelling works: @@ -145,7 +145,7 @@ modelling works:
145 <spectrum type="PowerLaw"> 145 <spectrum type="PowerLaw">
146 <parameter name="Prefactor" value="5.7" error="0" scale="1e-16" min="1e-07" max="1000" free="1" /> 146 <parameter name="Prefactor" value="5.7" error="0" scale="1e-16" min="1e-07" max="1000" free="1" />
147 <parameter name="Index" value="2.48" error="0" scale="-1" min="0" max="5" free="1" /> 147 <parameter name="Index" value="2.48" error="0" scale="-1" min="0" max="5" free="1" />
148 - <parameter name="Scale" value="0.3" scale="1e+06" min="0.01" max="1000" free="0" /> 148 + <parameter name="PivotEnergy" value="0.3" scale="1e+06" min="0.01" max="1000" free="0" />
149 </spectrum> 149 </spectrum>
150 <spatialModel type="SkyDirFunction"> 150 <spatialModel type="SkyDirFunction">
151 <parameter name="RA" value="83.6331" scale="1" min="-360" max="360" free="0" /> 151 <parameter name="RA" value="83.6331" scale="1" min="-360" max="360" free="0" />
@@ -156,7 +156,7 @@ modelling works: @@ -156,7 +156,7 @@ modelling works:
156 <spectrum type="PowerLaw"> 156 <spectrum type="PowerLaw">
157 <parameter name="Prefactor" value="1" error="0" scale="1" min="0" free="1" /> 157 <parameter name="Prefactor" value="1" error="0" scale="1" min="0" free="1" />
158 <parameter name="Index" value="0" error="0" scale="1" min="-10" max="10" free="1" /> 158 <parameter name="Index" value="0" error="0" scale="1" min="-10" max="10" free="1" />
159 - <parameter name="Scale" value="1" scale="1e+06" free="0" /> 159 + <parameter name="PivotEnergy" value="1" scale="1e+06" free="0" />
160 </spectrum> 160 </spectrum>
161 </source> 161 </source>
162 </source_library> 162 </source_library>
@@ -256,7 +256,7 @@ below. @@ -256,7 +256,7 @@ below.
256 2016-06-29T19:54:17: Instrument scale factors ..: unity 256 2016-06-29T19:54:17: Instrument scale factors ..: unity
257 2016-06-29T19:54:17: Observation identifiers ...: all 257 2016-06-29T19:54:17: Observation identifiers ...: all
258 2016-06-29T19:54:17: Model type ................: PointSource 258 2016-06-29T19:54:17: Model type ................: PointSource
259 - 2016-06-29T19:54:17: Model components ..........: "SkyDirFunction" * "PowerLaw" * "Constant" 259 + 2016-06-29T19:54:17: Model components ..........: "PointSource" * "PowerLaw" * "Constant"
260 2016-06-29T19:54:17: Number of parameters ......: 6 260 2016-06-29T19:54:17: Number of parameters ......: 6
261 2016-06-29T19:54:17: Number of spatial par's ...: 2 261 2016-06-29T19:54:17: Number of spatial par's ...: 2
262 2016-06-29T19:54:17: RA .......................: 83.6331 [-360,360] deg (fixed,scale=1) 262 2016-06-29T19:54:17: RA .......................: 83.6331 [-360,360] deg (fixed,scale=1)
doc/source/users/user_manual/getting_started/energy_dispersion.rst
@@ -102,7 +102,7 @@ Below you see the output from the ``ctlike.log`` file. @@ -102,7 +102,7 @@ Below you see the output from the ``ctlike.log`` file.
102 2016-06-29T20:33:50: Instrument scale factors ..: unity 102 2016-06-29T20:33:50: Instrument scale factors ..: unity
103 2016-06-29T20:33:50: Observation identifiers ...: all 103 2016-06-29T20:33:50: Observation identifiers ...: all
104 2016-06-29T20:33:50: Model type ................: PointSource 104 2016-06-29T20:33:50: Model type ................: PointSource
105 - 2016-06-29T20:33:50: Model components ..........: "SkyDirFunction" * "PowerLaw" * "Constant" 105 + 2016-06-29T20:33:50: Model components ..........: "PointSource" * "PowerLaw" * "Constant"
106 2016-06-29T20:33:50: Number of parameters ......: 6 106 2016-06-29T20:33:50: Number of parameters ......: 6
107 2016-06-29T20:33:50: Number of spatial par's ...: 2 107 2016-06-29T20:33:50: Number of spatial par's ...: 2
108 2016-06-29T20:33:50: RA .......................: 83.6331 [-360,360] deg (fixed,scale=1) 108 2016-06-29T20:33:50: RA .......................: 83.6331 [-360,360] deg (fixed,scale=1)
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: @@ -42,7 +42,7 @@ Below we show the XML result file that has been produced by the run:
42 <spectrum type="PowerLaw"> 42 <spectrum type="PowerLaw">
43 <parameter name="Prefactor" value="5.79064" error="0.101828" scale="1e-16" min="1e-07" max="1000" free="1" /> 43 <parameter name="Prefactor" value="5.79064" error="0.101828" scale="1e-16" min="1e-07" max="1000" free="1" />
44 <parameter name="Index" value="2.47177" error="0.0154935" scale="-1" min="0" max="5" free="1" /> 44 <parameter name="Index" value="2.47177" error="0.0154935" scale="-1" min="0" max="5" free="1" />
45 - <parameter name="Scale" value="0.3" scale="1e+06" min="0.01" max="1000" free="0" /> 45 + <parameter name="PivotEnergy" value="0.3" scale="1e+06" min="0.01" max="1000" free="0" />
46 </spectrum> 46 </spectrum>
47 <spatialModel type="SkyDirFunction"> 47 <spatialModel type="SkyDirFunction">
48 <parameter name="RA" value="83.6331" scale="1" min="-360" max="360" free="0" /> 48 <parameter name="RA" value="83.6331" scale="1" min="-360" max="360" free="0" />
@@ -53,7 +53,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:
53 <spectrum type="PowerLaw"> 53 <spectrum type="PowerLaw">
54 <parameter name="Prefactor" value="1.01642" error="0.0162226" scale="1" min="0.001" max="1000" free="1" /> 54 <parameter name="Prefactor" value="1.01642" error="0.0162226" scale="1" min="0.001" max="1000" free="1" />
55 <parameter name="Index" value="0.00462945" error="0.00964737" scale="1" min="-5" max="5" free="1" /> 55 <parameter name="Index" value="0.00462945" error="0.00964737" scale="1" min="-5" max="5" free="1" />
56 - <parameter name="Scale" value="1" scale="1e+06" min="0.01" max="1000" free="0" /> 56 + <parameter name="PivotEnergy" value="1" scale="1e+06" min="0.01" max="1000" free="0" />
57 </spectrum> 57 </spectrum>
58 </source> 58 </source>
59 </source_library> 59 </source_library>
@@ -112,7 +112,7 @@ this run: @@ -112,7 +112,7 @@ this run:
112 2016-06-29T16:11:08: Instrument scale factors ..: unity 112 2016-06-29T16:11:08: Instrument scale factors ..: unity
113 2016-06-29T16:11:08: Observation identifiers ...: all 113 2016-06-29T16:11:08: Observation identifiers ...: all
114 2016-06-29T16:11:08: Model type ................: PointSource 114 2016-06-29T16:11:08: Model type ................: PointSource
115 - 2016-06-29T16:11:08: Model components ..........: "SkyDirFunction" * "PowerLaw" * "Constant" 115 + 2016-06-29T16:11:08: Model components ..........: "PointSource" * "PowerLaw" * "Constant"
116 2016-06-29T16:11:08: Number of parameters ......: 6 116 2016-06-29T16:11:08: Number of parameters ......: 6
117 2016-06-29T16:11:08: Number of spatial par's ...: 2 117 2016-06-29T16:11:08: Number of spatial par's ...: 2
118 2016-06-29T16:11:08: RA .......................: 83.6331 [-360,360] deg (fixed,scale=1) 118 2016-06-29T16:11:08: RA .......................: 83.6331 [-360,360] deg (fixed,scale=1)
doc/source/users/user_manual/getting_started/models.rst
@@ -67,11 +67,11 @@ function that is tabulated in an ASCII file. @@ -67,11 +67,11 @@ function that is tabulated in an ASCII file.
67 <source_library title="source library"> 67 <source_library title="source library">
68 <source name="Crab" type="PointSource"> 68 <source name="Crab" type="PointSource">
69 <spectrum type="PowerLaw"> 69 <spectrum type="PowerLaw">
70 - <parameter name="Prefactor" scale="1e-16" value="5.7" min="1e-07" max="1000.0" free="1"/>  
71 - <parameter name="Index" scale="-1" value="2.48" min="0.0" max="+5.0" free="1"/>  
72 - <parameter name="Scale" scale="1e6" value="0.3" min="0.01" max="1000.0" free="0"/> 70 + <parameter name="Prefactor" scale="1e-16" value="5.7" min="1e-07" max="1000.0" free="1"/>
  71 + <parameter name="Index" scale="-1" value="2.48" min="0.0" max="+5.0" free="1"/>
  72 + <parameter name="PivotEnergy" scale="1e6" value="0.3" min="0.01" max="1000.0" free="0"/>
73 </spectrum> 73 </spectrum>
74 - <spatialModel type="SkyDirFunction"> 74 + <spatialModel type="PointSource">
75 <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="1"/> 75 <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="1"/>
76 <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="1"/> 76 <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="1"/>
77 </spatialModel> 77 </spatialModel>
@@ -144,7 +144,7 @@ Point source @@ -144,7 +144,7 @@ Point source
144 .. code-block:: xml 144 .. code-block:: xml
145 145
146 <source name="Crab" type="PointSource"> 146 <source name="Crab" type="PointSource">
147 - <spatialModel type="SkyDirFunction"> 147 + <spatialModel type="PointSource">
148 <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="1"/> 148 <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="1"/>
149 <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="1"/> 149 <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="1"/>
150 </spatialModel> 150 </spatialModel>
@@ -153,6 +153,11 @@ Point source @@ -153,6 +153,11 @@ Point source
153 </spectrum> 153 </spectrum>
154 </source> 154 </source>
155 155
  156 + .. note::
  157 +
  158 + For compatibility with the Fermi/LAT ScienceTools the model type ``PointSource``
  159 + can be replaced by ``SkyDirFunction``.
  160 +
156 161
157 Radial source 162 Radial source
158 ^^^^^^^^^^^^^ 163 ^^^^^^^^^^^^^
@@ -160,7 +165,7 @@ Radial source @@ -160,7 +165,7 @@ Radial source
160 .. code-block:: xml 165 .. code-block:: xml
161 166
162 <source name="Crab" type="ExtendedSource"> 167 <source name="Crab" type="ExtendedSource">
163 - <spatialModel type="DiskFunction"> 168 + <spatialModel type="RadialDisk">
164 <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="1"/> 169 <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="1"/>
165 <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="1"/> 170 <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="1"/>
166 <parameter name="Radius" scale="1.0" value="0.20" min="0.01" max="10" free="1"/> 171 <parameter name="Radius" scale="1.0" value="0.20" min="0.01" max="10" free="1"/>
@@ -173,7 +178,7 @@ Radial source @@ -173,7 +178,7 @@ Radial source
173 .. code-block:: xml 178 .. code-block:: xml
174 179
175 <source name="Crab" type="ExtendedSource"> 180 <source name="Crab" type="ExtendedSource">
176 - <spatialModel type="GaussFunction"> 181 + <spatialModel type="RadialGaussian">
177 <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="1"/> 182 <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="1"/>
178 <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="1"/> 183 <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="1"/>
179 <parameter name="Sigma" scale="1.0" value="0.20" min="0.01" max="10" free="1"/> 184 <parameter name="Sigma" scale="1.0" value="0.20" min="0.01" max="10" free="1"/>
@@ -186,7 +191,7 @@ Radial source @@ -186,7 +191,7 @@ Radial source
186 .. code-block:: xml 191 .. code-block:: xml
187 192
188 <source name="Crab" type="ExtendedSource"> 193 <source name="Crab" type="ExtendedSource">
189 - <spatialModel type="ShellFunction"> 194 + <spatialModel type="RadialShell">
190 <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="1"/> 195 <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="1"/>
191 <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="1"/> 196 <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="1"/>
192 <parameter name="Radius" scale="1.0" value="0.30" min="0.01" max="10" free="1"/> 197 <parameter name="Radius" scale="1.0" value="0.30" min="0.01" max="10" free="1"/>
@@ -219,7 +224,7 @@ Elliptical source @@ -219,7 +224,7 @@ Elliptical source
219 .. code-block:: xml 224 .. code-block:: xml
220 225
221 <source name="Crab" type="ExtendedSource"> 226 <source name="Crab" type="ExtendedSource">
222 - <spatialModel type="EllipticalGauss"> 227 + <spatialModel type="EllipticalGaussian">
223 <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="1"/> 228 <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="1"/>
224 <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="1"/> 229 <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="1"/>
225 <parameter name="PA" scale="1.0" value="45.0" min="-360" max="360" free="1"/> 230 <parameter name="PA" scale="1.0" value="45.0" min="-360" max="360" free="1"/>
@@ -238,7 +243,7 @@ Diffuse source @@ -238,7 +243,7 @@ Diffuse source
238 .. code-block:: xml 243 .. code-block:: xml
239 244
240 <source name="Crab" type="DiffuseSource"> 245 <source name="Crab" type="DiffuseSource">
241 - <spatialModel type="ConstantValue"> 246 + <spatialModel type="DiffuseIsotropic">
242 <parameter name="Value" scale="1" value="1" min="1" max="1" free="0"/> 247 <parameter name="Value" scale="1" value="1" min="1" max="1" free="0"/>
243 </spatialModel> 248 </spatialModel>
244 <spectrum type="..."> 249 <spectrum type="...">
@@ -246,21 +251,32 @@ Diffuse source @@ -246,21 +251,32 @@ Diffuse source
246 </spectrum> 251 </spectrum>
247 </source> 252 </source>
248 253
  254 + .. note::
  255 +
  256 + For compatibility with the Fermi/LAT ScienceTools the model type
  257 + ``DiffuseIsotropic`` can be replaced by ``ConstantValue``.
  258 +
249 .. code-block:: xml 259 .. code-block:: xml
250 260
251 <source name="Crab" type="DiffuseSource"> 261 <source name="Crab" type="DiffuseSource">
252 - <spatialModel type="SpatialMap" file="map.fits">  
253 - <parameter name="Prefactor" scale="1" value="1" min="0.001" max="1000.0" free="0"/> 262 + <spatialModel type="DiffuseMap" file="map.fits">
  263 + <parameter name="Normalization" scale="1" value="1" min="0.001" max="1000.0" free="0"/>
254 </spatialModel> 264 </spatialModel>
255 <spectrum type="..."> 265 <spectrum type="...">
256 ... 266 ...
257 </spectrum> 267 </spectrum>
258 </source> 268 </source>
259 269
  270 + .. note::
  271 +
  272 + For compatibility with the Fermi/LAT ScienceTools the model type
  273 + ``DiffuseMap`` can be replaced by ``SpatialMap`` and the parameter
  274 + ``Normalization`` can be replaced by ``Prefactor``.
  275 +
260 .. code-block:: xml 276 .. code-block:: xml
261 277
262 <source name="Crab" type="DiffuseSource"> 278 <source name="Crab" type="DiffuseSource">
263 - <spatialModel type="MapCubeFunction" file="map_cube.fits"> 279 + <spatialModel type="DiffuseMapCube" file="map_cube.fits">
264 <parameter name="Normalization" scale="1" value="1" min="0.001" max="1000.0" free="0"/> 280 <parameter name="Normalization" scale="1" value="1" min="0.001" max="1000.0" free="0"/>
265 </spatialModel> 281 </spatialModel>
266 <spectrum type="..."> 282 <spectrum type="...">
@@ -268,6 +284,12 @@ Diffuse source @@ -268,6 +284,12 @@ Diffuse source
268 </spectrum> 284 </spectrum>
269 </source> 285 </source>
270 286
  287 + .. note::
  288 +
  289 + For compatibility with the Fermi/LAT ScienceTools the model type
  290 + ``DiffuseMapCube`` can be replaced by ``MapCubeFunction`` and the parameter
  291 + ``Normalization`` can be replaced by ``Value``.
  292 +
271 293
272 CTA radial background 294 CTA radial background
273 ^^^^^^^^^^^^^^^^^^^^^ 295 ^^^^^^^^^^^^^^^^^^^^^
@@ -358,10 +380,10 @@ in ctools. @@ -358,10 +380,10 @@ in ctools.
358 380
359 Exceptions to this rule exist for the following spatial models: 381 Exceptions to this rule exist for the following spatial models:
360 382
361 - - ``ConstantValue``: intensity units are given per steradian, e.g. 383 + - ``DiffuseIsotropic``: intensity units are given per steradian, e.g.
362 :math:`{\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}\,{\rm MeV}^{-1}\,{\rm sr}^{-1}` 384 :math:`{\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}\,{\rm MeV}^{-1}\,{\rm sr}^{-1}`
363 385
364 - - ``MapCubeFunction``: intensities are unitless, the spectral model 386 + - ``DiffuseMapCube``: intensities are unitless, the spectral model
365 presents a relative scaling of the diffuse model 387 presents a relative scaling of the diffuse model
366 388
367 If spectral models are used for a background model component, intensity 389 If spectral models are used for a background model component, intensity
@@ -395,7 +417,7 @@ Constant @@ -395,7 +417,7 @@ Constant
395 where 417 where
396 418
397 * :math:`N_0` = ``Normalization`` 419 * :math:`N_0` = ``Normalization``
398 - :math:`[{\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}\,{\rm MeV}^{-1}]` 420 + :math:`({\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}\,{\rm MeV}^{-1})`
399 421
400 422
401 423
@@ -405,9 +427,9 @@ Power law @@ -405,9 +427,9 @@ Power law
405 .. code-block:: xml 427 .. code-block:: xml
406 428
407 <spectrum type="PowerLaw"> 429 <spectrum type="PowerLaw">
408 - <parameter name="Prefactor" scale="1e-16" value="5.7" min="1e-07" max="1000.0" free="1"/>  
409 - <parameter name="Index" scale="-1" value="2.48" min="0.0" max="+5.0" free="1"/>  
410 - <parameter name="Scale" scale="1e6" value="0.3" min="0.01" max="1000.0" free="0"/> 430 + <parameter name="Prefactor" scale="1e-16" value="5.7" min="1e-07" max="1000.0" free="1"/>
  431 + <parameter name="Index" scale="-1" value="2.48" min="0.0" max="+5.0" free="1"/>
  432 + <parameter name="PivotEnergy" scale="1e6" value="0.3" min="0.01" max="1000.0" free="0"/>
411 </spectrum> 433 </spectrum>
412 434
413 The ``PowerLaw`` model component implements the power law function 435 The ``PowerLaw`` model component implements the power law function
@@ -418,28 +440,33 @@ Power law @@ -418,28 +440,33 @@ Power law
418 where 440 where
419 441
420 * :math:`k_0` = ``Prefactor`` 442 * :math:`k_0` = ``Prefactor``
421 - :math:`[{\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}\,{\rm MeV}^{-1}]` 443 + :math:`({\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}\,{\rm MeV}^{-1})`
422 * :math:`\gamma` = ``Index`` 444 * :math:`\gamma` = ``Index``
423 - * :math:`E_0` = ``Scale``  
424 - :math:`[{\rm MeV}]` 445 + * :math:`E_0` = ``PivotEnergy``
  446 + :math:`({\rm MeV})`
425 447
426 .. warning:: 448 .. warning::
427 449
428 - The ``Scale`` parameter is not intended to be fitted. 450 + The ``PivotEnergy`` parameter is not intended to be fitted.
  451 +
  452 + .. note::
  453 +
  454 + For compatibility with the Fermi/LAT ScienceTools the parameter
  455 + ``PivotEnergy`` can be replaced by ``Scale``.
429 456
430 - An alternative power law function that uses the integral flux as parameter 457 + An alternative power law function that uses the integral photon flux as parameter
431 rather than the Prefactor is specified by 458 rather than the Prefactor is specified by
432 459
433 .. code-block:: xml 460 .. code-block:: xml
434 461
435 - <spectrum type="PowerLaw2">  
436 - <parameter scale="1e-07" name="Integral" min="1e-07" max="1000.0" value="1.0" free="1"/> 462 + <spectrum type="PowerLawPhotonFlux">
  463 + <parameter scale="1e-07" name="PhotonFlux" min="1e-07" max="1000.0" value="1.0" free="1"/>
437 <parameter scale="1.0" name="Index" min="-5.0" max="+5.0" value="-2.0" free="1"/> 464 <parameter scale="1.0" name="Index" min="-5.0" max="+5.0" value="-2.0" free="1"/>
438 <parameter scale="1.0" name="LowerLimit" min="10.0" max="1000000.0" value="100.0" free="0"/> 465 <parameter scale="1.0" name="LowerLimit" min="10.0" max="1000000.0" value="100.0" free="0"/>
439 <parameter scale="1.0" name="UpperLimit" min="10.0" max="1000000.0" value="500000.0" free="0"/> 466 <parameter scale="1.0" name="UpperLimit" min="10.0" max="1000000.0" value="500000.0" free="0"/>
440 </spectrum> 467 </spectrum>
441 468
442 - The ``PowerLaw2`` model component implements the power law function 469 + The ``PowerLawPhotonFlux`` model component implements the power law function
443 470
444 .. math:: 471 .. math::
445 \frac{dN}{dE} = \frac{N(\gamma+1)E^{\gamma}} 472 \frac{dN}{dE} = \frac{N(\gamma+1)E^{\gamma}}
@@ -447,22 +474,28 @@ Power law @@ -447,22 +474,28 @@ Power law
447 474
448 where 475 where
449 476
450 - * :math:`N` = ``Integral``  
451 - :math:`[{\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}]` 477 + * :math:`N` = ``PhotonFlux``
  478 + :math:`({\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1})`
452 * :math:`\gamma` = ``Index`` 479 * :math:`\gamma` = ``Index``
453 * :math:`E_{\rm min}` = ``LowerLimit`` 480 * :math:`E_{\rm min}` = ``LowerLimit``
454 - :math:`[{\rm MeV}]` 481 + :math:`({\rm MeV})`
455 * :math:`E_{\rm max}` = ``UpperLimit`` 482 * :math:`E_{\rm max}` = ``UpperLimit``
456 - :math:`[{\rm MeV}]` 483 + :math:`({\rm MeV})`
457 484
458 .. warning:: 485 .. warning::
459 486
460 The ``LowerLimit`` and ``UpperLimit`` parameters are always treated as fixed and, 487 The ``LowerLimit`` and ``UpperLimit`` parameters are always treated as fixed and,
461 - the flux given by the ``Integral`` parameter is computed over the 488 + the flux given by the ``PhotonFlux`` parameter is computed over the
462 range set by these two parameters. 489 range set by these two parameters.
463 Use of this model allows the errors on the integral flux to be evaluated directly 490 Use of this model allows the errors on the integral flux to be evaluated directly
464 by :ref:`ctlike`. 491 by :ref:`ctlike`.
465 492
  493 + .. note::
  494 +
  495 + For compatibility with the Fermi/LAT ScienceTools the model type
  496 + ``PowerLawPhotonFlux`` can be replaced by ``PowerLaw2`` and the parameter
  497 + ``PhotonFlux`` can be replaced by ``Integral``.
  498 +
466 499
467 Exponentially cut-off power law 500 Exponentially cut-off power law
468 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 501 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -470,10 +503,10 @@ Exponentially cut-off power law @@ -470,10 +503,10 @@ Exponentially cut-off power law
470 .. code-block:: xml 503 .. code-block:: xml
471 504
472 <spectrum type="ExpCutoff"> 505 <spectrum type="ExpCutoff">
473 - <parameter name="Prefactor" scale="1e-16" value="5.7" min="1e-07" max="1000.0" free="1"/>  
474 - <parameter name="Index" scale="-1" value="2.48" min="0.0" max="+5.0" free="1"/>  
475 - <parameter name="Cutoff" scale="1e6" value="1.0" min="0.01" max="1000.0" free="1"/>  
476 - <parameter name="Scale" scale="1e6" value="0.3" min="0.01" max="1000.0" free="0"/> 506 + <parameter name="Prefactor" scale="1e-16" value="5.7" min="1e-07" max="1000.0" free="1"/>
  507 + <parameter name="Index" scale="-1" value="2.48" min="0.0" max="+5.0" free="1"/>
  508 + <parameter name="Cutoff" scale="1e6" value="1.0" min="0.01" max="1000.0" free="1"/>
  509 + <parameter name="PivotEnergy" scale="1e6" value="0.3" min="0.01" max="1000.0" free="0"/>
477 </spectrum> 510 </spectrum>
478 511
479 The ``ExpCutoff`` model component implements the exponentially cut-off power law function 512 The ``ExpCutoff`` model component implements the exponentially cut-off power law function
@@ -485,17 +518,21 @@ Exponentially cut-off power law @@ -485,17 +518,21 @@ Exponentially cut-off power law
485 where 518 where
486 519
487 * :math:`k_0` = ``Prefactor`` 520 * :math:`k_0` = ``Prefactor``
488 - :math:`[{\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}\,{\rm MeV}^{-1}]` 521 + :math:`({\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}\,{\rm MeV}^{-1})`
489 * :math:`\gamma` = ``Index`` 522 * :math:`\gamma` = ``Index``
490 - * :math:`E_0` = ``Scale``  
491 - :math:`[{\rm MeV}]` 523 + * :math:`E_0` = ``PivotEnergy``
  524 + :math:`({\rm MeV})`
492 * :math:`E_{\rm cut}` = ``Cutoff`` 525 * :math:`E_{\rm cut}` = ``Cutoff``
493 - :math:`[{\rm MeV}]` 526 + :math:`({\rm MeV})`
494 527
495 .. warning:: 528 .. warning::
496 529
497 - The ``Scale`` parameter is not intended to be fitted. 530 + The ``PivotEnergy`` parameter is not intended to be fitted.
  531 +
  532 + .. note::
498 533
  534 + For compatibility with the Fermi/LAT ScienceTools the parameter
  535 + ``PivotEnergy`` can be replaced by ``Scale``.
499 536
500 537
501 Broken power law 538 Broken power law
@@ -524,11 +561,11 @@ Broken power law @@ -524,11 +561,11 @@ Broken power law
524 where 561 where
525 562
526 * :math:`k_0` = ``Prefactor`` 563 * :math:`k_0` = ``Prefactor``
527 - :math:`[{\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}\,{\rm MeV}^{-1}]` 564 + :math:`({\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}\,{\rm MeV}^{-1})`
528 * :math:`\gamma_1` = ``Index1`` 565 * :math:`\gamma_1` = ``Index1``
529 * :math:`\gamma_2` = ``Index2`` 566 * :math:`\gamma_2` = ``Index2``
530 * :math:`E_b` = ``BreakValue`` 567 * :math:`E_b` = ``BreakValue``
531 - :math:`[{\rm MeV}]` 568 + :math:`({\rm MeV})`
532 569
533 .. warning:: 570 .. warning::
534 571
@@ -543,10 +580,10 @@ Log parabola @@ -543,10 +580,10 @@ Log parabola
543 .. code-block:: xml 580 .. code-block:: xml
544 581
545 <spectrum type="LogParabola"> 582 <spectrum type="LogParabola">
546 - <parameter name="Prefactor" scale="1e-17" value="5.878" min="1e-07" max="1000.0" free="1"/>  
547 - <parameter name="Index" scale="-1" value="2.32473" min="0.0" max="+5.0" free="1"/>  
548 - <parameter name="Curvature" scale="-1" value="0.074" min="-5.0" max="+5.0" free="1"/>  
549 - <parameter name="Scale" scale="1e6" value="1.0" min="0.01" max="1000.0" free="0"/> 583 + <parameter name="Prefactor" scale="1e-17" value="5.878" min="1e-07" max="1000.0" free="1"/>
  584 + <parameter name="Index" scale="-1" value="2.32473" min="0.0" max="+5.0" free="1"/>
  585 + <parameter name="Curvature" scale="-1" value="0.074" min="-5.0" max="+5.0" free="1"/>
  586 + <parameter name="PivotEnergy" scale="1e6" value="1.0" min="0.01" max="1000.0" free="0"/>
550 </spectrum> 587 </spectrum>
551 588
552 The ``LogParabola`` model component implements the log parabola function 589 The ``LogParabola`` model component implements the log parabola function
@@ -557,25 +594,26 @@ Log parabola @@ -557,25 +594,26 @@ Log parabola
557 where 594 where
558 595
559 * :math:`k_0` = ``Prefactor`` 596 * :math:`k_0` = ``Prefactor``
560 - :math:`[{\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}\,{\rm MeV}^{-1}]` 597 + :math:`({\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}\,{\rm MeV}^{-1})`
561 * :math:`\gamma` = ``Index`` 598 * :math:`\gamma` = ``Index``
562 * :math:`\eta` = ``Curvature`` 599 * :math:`\eta` = ``Curvature``
563 - * :math:`E_0` = ``Scale``  
564 - :math:`[{\rm MeV}]` 600 + * :math:`E_0` = ``PivotEnergy``
  601 + :math:`({\rm MeV})`
565 602
566 .. warning:: 603 .. warning::
567 604
568 - The ``Scale`` parameter is not intended to be fitted. 605 + The ``PivotEnergy`` parameter is not intended to be fitted.
569 606
570 - An alternative XML format is supported for compatibility with the Fermi/LAT XML format: 607 + An alternative XML format is supported for compatibility with the Fermi/LAT
  608 + XML format:
571 609
572 .. code-block:: xml 610 .. code-block:: xml
573 611
574 <spectrum type="LogParabola"> 612 <spectrum type="LogParabola">
575 - <parameter name="Prefactor" scale="1e-17" value="5.878" min="1e-07" max="1000.0" free="1"/>  
576 - <parameter name="alpha" scale="1" value="2.32473" min="0.0" max="+5.0" free="1"/>  
577 - <parameter name="beta" scale="1" value="0.074" min="-5.0" max="+5.0" free="1"/>  
578 - <parameter name="Scale" scale="1e6" value="1.0" min="0.01" max="1000.0" free="0"/> 613 + <parameter name="norm" scale="1e-17" value="5.878" min="1e-07" max="1000.0" free="1"/>
  614 + <parameter name="alpha" scale="1" value="2.32473" min="0.0" max="+5.0" free="1"/>
  615 + <parameter name="beta" scale="1" value="0.074" min="-5.0" max="+5.0" free="1"/>
  616 + <parameter name="Eb" scale="1e6" value="1.0" min="0.01" max="1000.0" free="0"/>
579 </spectrum> 617 </spectrum>
580 618
581 where 619 where
@@ -604,11 +642,11 @@ Gaussian @@ -604,11 +642,11 @@ Gaussian
604 where 642 where
605 643
606 * :math:`N_0` = ``Normalization`` 644 * :math:`N_0` = ``Normalization``
607 - :math:`[{\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}]` 645 + :math:`({\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1})`
608 * :math:`\bar{E}` = ``Mean`` 646 * :math:`\bar{E}` = ``Mean``
609 - :math:`[{\rm MeV}]` 647 + :math:`({\rm MeV})`
610 * :math:`\sigma` = ``Sigma`` 648 * :math:`\sigma` = ``Sigma``
611 - :math:`[{\rm MeV}]` 649 + :math:`({\rm MeV})`
612 650
613 651
614 File function 652 File function
@@ -625,9 +663,9 @@ File function @@ -625,9 +663,9 @@ File function
625 The energy and intensity values are defined using an ASCII file with 663 The energy and intensity values are defined using an ASCII file with
626 columns of energy and differential flux values. 664 columns of energy and differential flux values.
627 Energies are given in units of 665 Energies are given in units of
628 - :math:`[{\rm MeV}]`, 666 + :math:`{\rm MeV}`,
629 intensities are given in units of 667 intensities are given in units of
630 - :math:`[{\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}\,{\rm MeV}^{-1}]`. 668 + :math:`{\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}\,{\rm MeV}^{-1}`.
631 The only parameter is a multiplicative normalization: 669 The only parameter is a multiplicative normalization:
632 670
633 .. math:: 671 .. math::
@@ -665,9 +703,9 @@ Node function @@ -665,9 +703,9 @@ Node function
665 power law which is defined by a set of energy and intensity values 703 power law which is defined by a set of energy and intensity values
666 (the so called nodes) that are piecewise connected by power laws. 704 (the so called nodes) that are piecewise connected by power laws.
667 Energies are given in units of 705 Energies are given in units of
668 - :math:`[{\rm MeV}]`, 706 + :math:`{\rm MeV}`,
669 intensities are given in units of 707 intensities are given in units of
670 - :math:`[{\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}\,{\rm MeV}^{-1}]`. 708 + :math:`{\rm ph}\,\,{\rm cm}^{-2}\,{\rm s}^{-1}\,{\rm MeV}^{-1}`.
671 709
672 .. warning:: 710 .. warning::
673 711
doc/source/users/user_manual/getting_started/python.rst
@@ -170,7 +170,7 @@ member of the observation container: @@ -170,7 +170,7 @@ member of the observation container:
170 Instrument scale factors ..: unity 170 Instrument scale factors ..: unity
171 Observation identifiers ...: all 171 Observation identifiers ...: all
172 Model type ................: PointSource 172 Model type ................: PointSource
173 - Model components ..........: "SkyDirFunction" * "PowerLaw" * "Constant" 173 + Model components ..........: "PointSource" * "PowerLaw" * "Constant"
174 Number of parameters ......: 6 174 Number of parameters ......: 6
175 Number of spatial par's ...: 2 175 Number of spatial par's ...: 2
176 RA .......................: 83.6331 [-360,360] deg (fixed,scale=1) 176 RA .......................: 83.6331 [-360,360] deg (fixed,scale=1)
doc/source/users/user_manual/getting_started/simulating.rst
@@ -68,9 +68,9 @@ The source and background model is defined by the XML file @@ -68,9 +68,9 @@ The source and background model is defined by the XML file
68 <source_library title="source library"> 68 <source_library title="source library">
69 <source name="Crab" type="PointSource"> 69 <source name="Crab" type="PointSource">
70 <spectrum type="PowerLaw"> 70 <spectrum type="PowerLaw">
71 - <parameter name="Prefactor" scale="1e-16" value="5.7" min="1e-07" max="1000.0" free="1"/>  
72 - <parameter name="Index" scale="-1" value="2.48" min="0.0" max="+5.0" free="1"/>  
73 - <parameter name="Scale" scale="1e6" value="0.3" min="0.01" max="1000.0" free="0"/> 71 + <parameter name="Prefactor" scale="1e-16" value="5.7" min="1e-07" max="1000.0" free="1"/>
  72 + <parameter name="Index" scale="-1" value="2.48" min="0.0" max="+5.0" free="1"/>
  73 + <parameter name="PivotEnergy" scale="1e6" value="0.3" min="0.01" max="1000.0" free="0"/>
74 </spectrum> 74 </spectrum>
75 <spatialModel type="SkyDirFunction"> 75 <spatialModel type="SkyDirFunction">
76 <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="0"/> 76 <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="0"/>
@@ -78,12 +78,12 @@ 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
78 </spatialModel> 78 </spatialModel>
79 </source> 79 </source>
80 <source name="CTABackgroundModel" type="CTAIrfBackground" instrument="CTA"> 80 <source name="CTABackgroundModel" type="CTAIrfBackground" instrument="CTA">
81 - <spectrum type="PowerLaw">  
82 - <parameter name="Prefactor" scale="1.0" value="1.0" min="1e-3" max="1e+3" free="1"/>  
83 - <parameter name="Index" scale="1.0" value="0.0" min="-5.0" max="+5.0" free="1"/>  
84 - <parameter name="Scale" scale="1e6" value="1.0" min="0.01" max="1000.0" free="0"/> 81 + <spectrum type="PowerLaw">
  82 + <parameter name="Prefactor" scale="1.0" value="1.0" min="1e-3" max="1e+3" free="1"/>
  83 + <parameter name="Index" scale="1.0" value="0.0" min="-5.0" max="+5.0" free="1"/>
  84 + <parameter name="PivotEnergy" scale="1e6" value="1.0" min="0.01" max="1000.0" free="0"/>
85 </spectrum> 85 </spectrum>
86 - </source> 86 + </source>
87 </source_library> 87 </source_library>
88 88
89 The model consists of a source library that contains two components: 89 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=&quot;1&quot;``) or fixed @@ -103,8 +103,8 @@ maximum (``max``) value, and a parameter may be free (``free=&quot;1&quot;``) or fixed
103 relevant here for the simulations, but they will be important for the model 103 relevant here for the simulations, but they will be important for the model
104 fitting later. 104 fitting later.
105 105
106 -The spectral intensity I(E) (in units of photons/cm2/s/MeV) of the power  
107 -law is given by 106 +The spectral intensity I(E) (in units of photons/cm2/s/MeV) of the power law is
  107 +given by
108 108
109 .. math:: 109 .. math::
110 \frac{dN}{dE} = N_0 \left( \frac{E}{E_0} \right)^{\gamma} 110 \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: @@ -113,7 +113,7 @@ where the parameters in the XML definition have the following mappings:
113 113
114 * :math:`N_0` = ``Prefactor`` 114 * :math:`N_0` = ``Prefactor``
115 * :math:`\gamma` = ``Index`` 115 * :math:`\gamma` = ``Index``
116 -* :math:`E_0` = ``Scale`` 116 +* :math:`E_0` = ``PivotEnergy``
117 117
118 .. warning:: 118 .. warning::
119 119
doc/source/users/user_manual/getting_started/unbinned.rst
@@ -175,7 +175,7 @@ the same events for both analyses. @@ -175,7 +175,7 @@ the same events for both analyses.
175 2016-06-29T16:24:45: Instrument scale factors ..: unity 175 2016-06-29T16:24:45: Instrument scale factors ..: unity
176 2016-06-29T16:24:45: Observation identifiers ...: all 176 2016-06-29T16:24:45: Observation identifiers ...: all
177 2016-06-29T16:24:45: Model type ................: PointSource 177 2016-06-29T16:24:45: Model type ................: PointSource
178 - 2016-06-29T16:24:45: Model components ..........: "SkyDirFunction" * "PowerLaw" * "Constant" 178 + 2016-06-29T16:24:45: Model components ..........: "PointSource" * "PowerLaw" * "Constant"
179 2016-06-29T16:24:45: Number of parameters ......: 6 179 2016-06-29T16:24:45: Number of parameters ......: 6
180 2016-06-29T16:24:45: Number of spatial par's ...: 2 180 2016-06-29T16:24:45: Number of spatial par's ...: 2
181 2016-06-29T16:24:45: RA .......................: 83.6331 [-360,360] deg (fixed,scale=1) 181 2016-06-29T16:24:45: RA .......................: 83.6331 [-360,360] deg (fixed,scale=1)
doc/source/users/user_manual/iact_analysis/analysis.rst
@@ -229,31 +229,31 @@ Model definition XML file @@ -229,31 +229,31 @@ Model definition XML file
229 <source_library title="source library"> 229 <source_library title="source library">
230 <source name="bkg_11111" type="CTAIrfBackground" instrument="HESS" id="11111"> 230 <source name="bkg_11111" type="CTAIrfBackground" instrument="HESS" id="11111">
231 <spectrum type="ConstantValue"> 231 <spectrum type="ConstantValue">
232 - <parameter name="Value" value="1" error="0" scale="1" min="0.01" max="100" free="1" /> 232 + <parameter name="Normalization" value="1" error="0" scale="1" min="0.01" max="100" free="1" />
233 </spectrum> 233 </spectrum>
234 </source> 234 </source>
235 <source name="bkg_11112" type="CTAIrfBackground" instrument="HESS" id="11112"> 235 <source name="bkg_11112" type="CTAIrfBackground" instrument="HESS" id="11112">
236 <spectrum type="ConstantValue"> 236 <spectrum type="ConstantValue">
237 - <parameter name="Value" value="1" error="0" scale="1" min="0.01" max="100" free="1" /> 237 + <parameter name="Normalization" value="1" error="0" scale="1" min="0.01" max="100" free="1" />
238 </spectrum> 238 </spectrum>
239 </source> 239 </source>
240 <source name="bkg_11113" type="CTAIrfBackground" instrument="HESS" id="11113"> 240 <source name="bkg_11113" type="CTAIrfBackground" instrument="HESS" id="11113">
241 <spectrum type="ConstantValue"> 241 <spectrum type="ConstantValue">
242 - <parameter name="Value" value="1" error="0" scale="1" min="0.01" max="100" free="1" /> 242 + <parameter name="Normalization" value="1" error="0" scale="1" min="0.01" max="100" free="1" />
243 </spectrum> 243 </spectrum>
244 </source> 244 </source>
245 <source name="bkg_11114" type="CTAIrfBackground" instrument="HESS" id="11114"> 245 <source name="bkg_11114" type="CTAIrfBackground" instrument="HESS" id="11114">
246 <spectrum type="ConstantValue"> 246 <spectrum type="ConstantValue">
247 - <parameter name="Value" value="1" error="0" scale="1" min="0.01" max="100" free="1" /> 247 + <parameter name="Normalization" value="1" error="0" scale="1" min="0.01" max="100" free="1" />
248 </spectrum> 248 </spectrum>
249 </source> 249 </source>
250 <source name="Crab" type="PointSource"> 250 <source name="Crab" type="PointSource">
251 <spectrum type="PowerLaw"> 251 <spectrum type="PowerLaw">
252 - <parameter name="Prefactor" scale="1e-17" value="3.0" min="1e-07" max="1000.0" free="1"/>  
253 - <parameter name="Index" scale="-1" value="2.5" min="0.0" max="+5.0" free="1"/>  
254 - <parameter name="Scale" scale="1e6" value="1.0" min="0.01" max="1000.0" free="0"/> 252 + <parameter name="Prefactor" scale="1e-17" value="3.0" min="1e-07" max="1000.0" free="1"/>
  253 + <parameter name="Index" scale="-1" value="2.5" min="0.0" max="+5.0" free="1"/>
  254 + <parameter name="PivotEnergy" scale="1e6" value="1.0" min="0.01" max="1000.0" free="0"/>
255 </spectrum> 255 </spectrum>
256 - <spatialModel type="SkyDirFunction"> 256 + <spatialModel type="PointSource">
257 <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="1"/> 257 <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="1"/>
258 <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="1"/> 258 <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="1"/>
259 </spatialModel> 259 </spatialModel>
@@ -514,18 +514,18 @@ The output model of :ref:`ctbkgcube` looks the following: @@ -514,18 +514,18 @@ The output model of :ref:`ctbkgcube` looks the following:
514 <source_library title="source library"> 514 <source_library title="source library">
515 <source name="BackgroundModel" type="CTACubeBackground" instrument="CTA,HESS,MAGIC,VERITAS"> 515 <source name="BackgroundModel" type="CTACubeBackground" instrument="CTA,HESS,MAGIC,VERITAS">
516 <spectrum type="PowerLaw"> 516 <spectrum type="PowerLaw">
517 - <parameter name="Prefactor" value="1" error="0" scale="1" min="0.01" max="100" free="1" />  
518 - <parameter name="Index" value="0" error="0" scale="1" min="-5" max="5" free="1" />  
519 - <parameter name="Scale" value="1" scale="1e+06" free="0" /> 517 + <parameter name="Prefactor" value="1" error="0" scale="1" min="0.01" max="100" free="1" />
  518 + <parameter name="Index" value="0" error="0" scale="1" min="-5" max="5" free="1" />
  519 + <parameter name="PivotEnergy" value="1" scale="1e+06" free="0" />
520 </spectrum> 520 </spectrum>
521 </source> 521 </source>
522 <source name="Crab" type="PointSource"> 522 <source name="Crab" type="PointSource">
523 <spectrum type="PowerLaw"> 523 <spectrum type="PowerLaw">
524 - <parameter name="Prefactor" scale="1e-17" value="3.0" min="1e-07" max="1000.0" free="1"/>  
525 - <parameter name="Index" scale="-1" value="2.48" min="0.0" max="+5.0" free="1"/>  
526 - <parameter name="Scale" scale="1e6" value="1." min="0.01" max="1000.0" free="0"/> 524 + <parameter name="Prefactor" scale="1e-17" value="3.0" min="1e-07" max="1000.0" free="1"/>
  525 + <parameter name="Index" scale="-1" value="2.48" min="0.0" max="+5.0" free="1"/>
  526 + <parameter name="PivotEnergy" scale="1e6" value="1." min="0.01" max="1000.0" free="0"/>
527 </spectrum> 527 </spectrum>
528 - <spatialModel type="SkyDirFunction"> 528 + <spatialModel type="PointSource">
529 <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="0"/> 529 <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="0"/>
530 <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="0"/> 530 <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="0"/>
531 </spatialModel> 531 </spatialModel>
doc/source/users/user_manual/iact_analysis/high_level.rst
@@ -3,7 +3,8 @@ @@ -3,7 +3,8 @@
3 High level analysis tools for IACT data 3 High level analysis tools for IACT data
4 ======================================= 4 =======================================
5 5
6 -This section describes and explains how to create high level output. The following tools are explained: 6 +This section describes and explains how to create high level output. The
  7 +following scripts and tools are explained:
7 8
8 * :ref:`csobsinfo` (inspect and observation XML files) 9 * :ref:`csobsinfo` (inspect and observation XML files)
9 * :ref:`csmodelinfo` (inspect model XML files) 10 * :ref:`csmodelinfo` (inspect model XML files)
@@ -16,9 +17,10 @@ This section describes and explains how to create high level output. The followi @@ -16,9 +17,10 @@ This section describes and explains how to create high level output. The followi
16 17
17 Inspecting observation definition files 18 Inspecting observation definition files
18 --------------------------------------- 19 ---------------------------------------
19 -After having created an observation definition file, the user might want to know a summary of its content.  
20 -Important quantities usually are the number of observations, the total livetime, or the mean zenith angle.  
21 -For this purpose, :ref:`csobsinfo` inspects an observation XML container for its content. 20 +After having created an observation definition file, the user might want to
  21 +know a summary of its content. Important quantities usually are the number of
  22 +observations, the total livetime, or the mean zenith angle. For this purpose,
  23 +:ref:`csobsinfo` inspects an observation XML container for its content.
22 24
23 .. code-block:: bash 25 .. code-block:: bash
24 26
doc/source/users/user_manual/iact_analysis/simulation.rst
@@ -142,20 +142,20 @@ e.g. for the Crab Nebula: @@ -142,20 +142,20 @@ e.g. for the Crab Nebula:
142 <source_library title="source library"> 142 <source_library title="source library">
143 <source name="Crab" type="PointSource"> 143 <source name="Crab" type="PointSource">
144 <spectrum type="PowerLaw"> 144 <spectrum type="PowerLaw">
145 - <parameter name="Prefactor" scale="1e-17" value="3.5" min="1e-07" max="1000.0" free="1"/>  
146 - <parameter name="Index" scale="-1" value="2.5" min="0.0" max="+5.0" free="1"/>  
147 - <parameter name="Scale" scale="1e6" value="1.0" min="0.01" max="1000.0" free="0"/> 145 + <parameter name="Prefactor" scale="1e-17" value="3.5" min="1e-07" max="1000.0" free="1"/>
  146 + <parameter name="Index" scale="-1" value="2.5" min="0.0" max="+5.0" free="1"/>
  147 + <parameter name="PivotEnergy" scale="1e6" value="1.0" min="0.01" max="1000.0" free="0"/>
148 </spectrum> 148 </spectrum>
149 - <spatialModel type="SkyDirFunction"> 149 + <spatialModel type="PointSource">
150 <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="0"/> 150 <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="0"/>
151 <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="0"/> 151 <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="0"/>
152 </spatialModel> 152 </spatialModel>
153 </source> 153 </source>
154 <source name="CTABackgroundModel" type="CTAIrfBackground" instrument="CTA"> 154 <source name="CTABackgroundModel" type="CTAIrfBackground" instrument="CTA">
155 <spectrum type="PowerLaw"> 155 <spectrum type="PowerLaw">
156 - <parameter name="Prefactor" scale="1.0" value="1.0" min="1e-3" max="1e+3" free="1"/>  
157 - <parameter name="Index" scale="1.0" value="0.0" min="-5.0" max="+5.0" free="1"/>  
158 - <parameter name="Scale" scale="1e6" value="1.0" min="0.01" max="1000.0" free="0"/> 156 + <parameter name="Prefactor" scale="1.0" value="1.0" min="1e-3" max="1e+3" free="1"/>
  157 + <parameter name="Index" scale="1.0" value="0.0" min="-5.0" max="+5.0" free="1"/>
  158 + <parameter name="PivotEnergy" scale="1e6" value="1.0" min="0.01" max="1000.0" free="0"/>
159 </spectrum> 159 </spectrum>
160 </source> 160 </source>
161 </source_library> 161 </source_library>
doc/source/users/user_manual/iact_analysis/tips.rst
@@ -264,20 +264,20 @@ excess map. In the section about :ref:`high level analysis tools &lt;sec_high_level @@ -264,20 +264,20 @@ excess map. In the section about :ref:`high level analysis tools &lt;sec_high_level
264 the usage of :ref:`cttsmap` was demonstrated. This tool can also be used to 264 the usage of :ref:`cttsmap` was demonstrated. This tool can also be used to
265 generate flux maps. For this, the user has to incorporate a test source in the 265 generate flux maps. For this, the user has to incorporate a test source in the
266 XML model file. This source should consist of a spectral component using a 266 XML model file. This source should consist of a spectral component using a
267 -PowerLaw2 model: 267 +``PowerLawPhotonFlux`` model:
268 268
269 .. code-block:: xml 269 .. code-block:: xml
270 270
271 <source name="TestSource" type="PointSource"> 271 <source name="TestSource" type="PointSource">
272 - <spectrum type="PowerLaw2">  
273 - <parameter scale="1e-07" name="Integral" min="1e-07" max="1000.0" value="1.0" free="1"/> 272 + <spectrum type="PowerLawPhotonFlux">
  273 + <parameter scale="1e-07" name="PhotonFlux" min="1e-07" max="1000.0" value="1.0" free="1"/>
274 <parameter scale="1.0" name="Index" min="-5.0" max="+5.0" value="-2.0" free="1"/> 274 <parameter scale="1.0" name="Index" min="-5.0" max="+5.0" value="-2.0" free="1"/>
275 <parameter scale="1.0" name="LowerLimit" min="10.0" max="1000000.0" value="100.0" free="0"/> 275 <parameter scale="1.0" name="LowerLimit" min="10.0" max="1000000.0" value="100.0" free="0"/>
276 <parameter scale="1.0" name="UpperLimit" min="10.0" max="1000000.0" value="500000.0" free="0"/> 276 <parameter scale="1.0" name="UpperLimit" min="10.0" max="1000000.0" value="500000.0" free="0"/>
277 </spectrum> 277 </spectrum>
278 - <spatialModel type="SkyDirFunction">  
279 - <parameter free="0" max="360" min="-360" name="RA" scale="1" value="83.6331" />  
280 - <parameter free="0" max="90" min="-90" name="DEC" scale="1" value="22.0145" /> 278 + <spatialModel type="PointSource">
  279 + <parameter free="0" max="360" min="-360" name="RA" scale="1" value="83.6331" />
  280 + <parameter free="0" max="90" min="-90" name="DEC" scale="1" value="22.0145" />
281 </spatialModel> 281 </spatialModel>
282 </source> 282 </source>
283 283
doc/source/users/user_manual/introduction.rst
@@ -20,7 +20,8 @@ also be specified as arguments separated by a whitespace to the ctool: @@ -20,7 +20,8 @@ also be specified as arguments separated by a whitespace to the ctool:
20 20
21 .. code-block:: bash 21 .. code-block:: bash
22 22
23 - $ 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 23 + $ 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 \
  24 + inmodel=$CTOOLS/share/models/crab.xml outevents=events.fits
24 25
25 If you need help about the usage of a ctool or a cscript, type the name of 26 If you need help about the usage of a ctool or a cscript, type the name of
26 the ctool or cscript followed by the ``--help`` option: 27 the ctool or cscript followed by the ``--help`` option:
test/data/sciver/crab_const.xml
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 <parameter name="PivotEnergy" scale="1e6" value="0.3" min="0.01" max="1000.0" free="0"/> 7 <parameter name="PivotEnergy" scale="1e6" value="0.3" min="0.01" max="1000.0" free="0"/>
8 </spectrum> 8 </spectrum>
9 <spatialModel type="DiffuseIsotropic"> 9 <spatialModel type="DiffuseIsotropic">
10 - <parameter name="Normalization" scale="1" value="1" min="0.1" max="10" free="0"/> 10 + <parameter name="Value" scale="1" value="1" min="0.1" max="10" free="0"/>
11 </spatialModel> 11 </spatialModel>
12 </source> 12 </source>
13 <source name="Background" type="CTAIrfBackground" instrument="CTA"> 13 <source name="Background" type="CTAIrfBackground" instrument="CTA">
test/data/sciver/crab_plaw2.xml
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <source_library title="source library"> 2 <source_library title="source library">
3 <source name="Crab" type="PointSource"> 3 <source name="Crab" type="PointSource">
4 <spectrum type="PowerLawPhotonFlux"> 4 <spectrum type="PowerLawPhotonFlux">
5 - <parameter name="PhotonFlux" scale="1e-5" value="1.617" min="1e-07" max="1000.0" free="1"/> 5 + <parameter name="PhotonFlux" scale="1e-5" value="1.617" min="1e-07" max="1000.0" free="1"/>
6 <parameter name="Index" scale="-1.0" value="2.48" min="-5.0" max="+5.0" free="1"/> 6 <parameter name="Index" scale="-1.0" value="2.48" min="-5.0" max="+5.0" free="1"/>
7 <parameter name="LowerLimit" scale="1.0" value="100.0" min="10.0" max="1000000.0" free="0"/> 7 <parameter name="LowerLimit" scale="1.0" value="100.0" min="10.0" max="1000000.0" free="0"/>
8 <parameter name="UpperLimit" scale="1.0" value="500000.0" min="10.0" max="1000000.0" free="0"/> 8 <parameter name="UpperLimit" scale="1.0" value="500000.0" min="10.0" max="1000000.0" free="0"/>
test/science_verification.py
@@ -26,13 +26,13 @@ @@ -26,13 +26,13 @@
26 # along with this program. If not, see <http://www.gnu.org/licenses/>. 26 # along with this program. If not, see <http://www.gnu.org/licenses/>.
27 # 27 #
28 # ========================================================================== 28 # ==========================================================================
29 -import gammalib  
30 -import ctools  
31 -import cscripts  
32 import os 29 import os
33 import csv 30 import csv
34 import math 31 import math
35 import sys 32 import sys
  33 +import gammalib
  34 +import ctools
  35 +import cscripts
36 36
37 37
38 # ========================== # 38 # ========================== #
@@ -375,7 +375,7 @@ class sciver(gammalib.GPythonTestSuite): @@ -375,7 +375,7 @@ class sciver(gammalib.GPythonTestSuite):
375 Test power law 2 model 375 Test power law 2 model
376 """ 376 """
377 self.pull('data/sciver/crab_plaw2') 377 self.pull('data/sciver/crab_plaw2')
378 - self.test('Pull_Crab_Integral') 378 + self.test('Pull_Crab_PhotonFlux')
379 self.test('Pull_Crab_Index') 379 self.test('Pull_Crab_Index')
380 self.test('Pull_Background_Prefactor') 380 self.test('Pull_Background_Prefactor')
381 self.test('Pull_Background_Index') 381 self.test('Pull_Background_Index')