Commit 04003365ed597540398dcd849521032e0ec353e2
1 parent
259ecb2c
Improve tutorials
Showing
1 changed file
with
26 additions
and
3 deletions
doc/source/users/tutorials/1dc/first_fitting.rst
| @@ -196,9 +196,32 @@ a maximum likelihood model fit. | @@ -196,9 +196,32 @@ a maximum likelihood model fit. | ||
| 196 | *Butterfly diagrams determined with ctbutterfly and spectral points determined with csspec for Src001 (red) and Src002 (blue)* | 196 | *Butterfly diagrams determined with ctbutterfly and spectral points determined with csspec for Src001 (red) and Src002 (blue)* |
| 197 | 197 | ||
| 198 | Obviously, ``Src001`` has a spectral cut-off (red flux points) and hence is not | 198 | Obviously, ``Src001`` has a spectral cut-off (red flux points) and hence is not |
| 199 | -adequately described by a power law model. | ||
| 200 | -Replacing the spectral model of ``Src001`` by an exponentially cut-off | ||
| 201 | -power law improves the fit to the data, as illustrated by the figure below. | 199 | +adequately described by a power law model. You should therefore replace the |
| 200 | +power law in the | ||
| 201 | +:ref:`model definition file <glossary_moddef>` | ||
| 202 | +by an exponentially cutoff power law, as shown below: | ||
| 203 | + | ||
| 204 | +.. code-block:: xml | ||
| 205 | + | ||
| 206 | + <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
| 207 | + <source_library title="source library"> | ||
| 208 | + <source name="Src001" type="PointSource"> | ||
| 209 | + <spectrum type="ExponentialCutoffPowerLaw"> | ||
| 210 | + <parameter name="Prefactor" scale="1e-18" value="5.7" min="1e-07" max="1000.0" free="1"/> | ||
| 211 | + <parameter name="Index" scale="-1" value="2.48" min="0.0" max="+5.0" free="1"/> | ||
| 212 | + <parameter name="CutoffEnergy" scale="1e7" value="1.0" min="0.01" max="1000.0" free="1"/> | ||
| 213 | + <parameter name="PivotEnergy" scale="1e6" value="0.3" min="0.01" max="1000.0" free="0"/> | ||
| 214 | + </spectrum> | ||
| 215 | + <spatialModel type="PointSource"> | ||
| 216 | + <parameter name="RA" value="266.4045" scale="1" free="1" /> | ||
| 217 | + <parameter name="DEC" value="-28.9945" scale="1" free="1" /> | ||
| 218 | + </spatialModel> | ||
| 219 | + </source> | ||
| 220 | + ... | ||
| 221 | + </source_library> | ||
| 222 | + | ||
| 223 | +Fitting this model to the data improves the fit and the resulting butterfly | ||
| 224 | +diagram now reasonably well follows the spectral points: | ||
| 202 | 225 | ||
| 203 | .. figure:: first_spectrum_cutoff_stacked.png | 226 | .. figure:: first_spectrum_cutoff_stacked.png |
| 204 | :width: 600px | 227 | :width: 600px |