Commit 9159e38d97c9e406b0b1d7347d24c53a9bc585c7
1 parent
e7748d3e
Update COMPTEL tutorials
Showing
11 changed files
with
215 additions
and
158 deletions
doc/source/users/tutorials/howto/comptel/howto_comptel_butterfly.png
doc/source/users/tutorials/howto/comptel/howto_comptel_dri.rst
| ... | ... | @@ -161,8 +161,9 @@ that should look as follows: |
| 161 | 161 | not ``file`` since the ``IAQ`` parameter is not necessarily a file |
| 162 | 162 | but can be also a response name of the calibration database. |
| 163 | 163 | |
| 164 | -Before doing a model fit you need a model. Create the following | |
| 165 | -:ref:`model definition file <glossary_moddef>`: | |
| 164 | +Before doing a model fit you need a model. We included one in the ctools package | |
| 165 | +that you can find at ``$CTOOLS/share/models/comptel_howto_gc.xml``. Here the | |
| 166 | +first few lines of this model: | |
| 166 | 167 | |
| 167 | 168 | .. code-block:: xml |
| 168 | 169 | |
| ... | ... | @@ -182,10 +183,6 @@ Before doing a model fit you need a model. Create the following |
| 182 | 183 | <parameter name="Phibar" value="9" scale="1" min="0" max="50" free="0" /> |
| 183 | 184 | <parameter name="Normalization" value="1.0" scale="1" min="0" max="1000" free="1" /> |
| 184 | 185 | </node> |
| 185 | - <node> | |
| 186 | - <parameter name="Phibar" value="11" scale="1" min="0" max="50" free="0" /> | |
| 187 | - <parameter name="Normalization" value="1.0" scale="1" min="0" max="1000" free="1" /> | |
| 188 | - </node> | |
| 189 | 186 | ... |
| 190 | 187 | <node> |
| 191 | 188 | <parameter name="Phibar" value="49" scale="1" min="0" max="50" free="0" /> |
| ... | ... | @@ -212,15 +209,15 @@ map of the region around the Galactic centre as follows: |
| 212 | 209 | $ cttsmap |
| 213 | 210 | Input event list, counts cube or observation definition XML file [events.fits] obs_dri.xml |
| 214 | 211 | Test source name [Crab] GC |
| 215 | - Input model definition XML file [$CTOOLS/share/models/crab.xml] models.xml | |
| 212 | + Input model definition XML file [$CTOOLS/share/models/crab.xml] $CTOOLS/share/models/comptel_howto_gc.xml | |
| 213 | + Coordinate system (CEL - celestial, GAL - galactic) (CEL|GAL) [CEL] GAL | |
| 214 | + Projection method (AIT|AZP|CAR|GLS|MER|MOL|SFL|SIN|STG|TAN) [CAR] | |
| 216 | 215 | First coordinate of image center in degrees (RA or galactic l) (0-360) [83.63] 0.0 |
| 217 | 216 | Second coordinate of image center in degrees (DEC or galactic b) (-90-90) [22.01] 0.0 |
| 218 | - Projection method (AIT|AZP|CAR|GLS|MER|MOL|SFL|SIN|STG|TAN) [CAR] | |
| 219 | - Coordinate system (CEL - celestial, GAL - galactic) (CEL|GAL) [CEL] GAL | |
| 220 | 217 | Image scale (in degrees/pixel) [0.02] 1.0 |
| 221 | 218 | Size of the X axis in pixels [200] 50 |
| 222 | 219 | Size of the Y axis in pixels [200] 30 |
| 223 | - Output Test Statistic map file [tsmap.fits] tsmap.fits | |
| 220 | + Output Test Statistic map file [tsmap.fits] | |
| 224 | 221 | |
| 225 | 222 | Below is the resulting Test Statistic map that shows 1.8 MeV emission |
| 226 | 223 | following the Galactic plane and peaking near the Galactic centre. | ... | ... |
doc/source/users/tutorials/howto/comptel/howto_comptel_fitting.rst
| ... | ... | @@ -187,78 +187,78 @@ log file ``ctlike.log`` that was also created by :ref:`ctlike`: |
| 187 | 187 | |
| 188 | 188 | .. code-block:: none |
| 189 | 189 | |
| 190 | - 2017-08-26T22:05:05: +=================================+ | |
| 191 | - 2017-08-26T22:05:05: | Maximum likelihood optimisation | | |
| 192 | - 2017-08-26T22:05:05: +=================================+ | |
| 193 | - 2017-08-26T22:05:06: >Iteration 0: -logL=988086.091, Lambda=1.0e-03 | |
| 194 | - 2017-08-26T22:05:07: >Iteration 1: -logL=670534.792, Lambda=1.0e-03, delta=317551.299, step=1.0e+00, max(|grad|)=86219.859480 [Index:3] | |
| 195 | - 2017-08-26T22:05:08: >Iteration 2: -logL=387046.862, Lambda=1.0e-04, delta=283487.930, step=1.0e+00, max(|grad|)=69886.869623 [Index:3] | |
| 196 | - 2017-08-26T22:05:08: >Iteration 3: -logL=154426.362, Lambda=1.0e-05, delta=232620.499, step=1.0e+00, max(|grad|)=47994.333526 [Index:3] | |
| 197 | - 2017-08-26T22:05:09: >Iteration 4: -logL=-12393.885, Lambda=1.0e-06, delta=166820.247, step=1.0e+00, max(|grad|)=24763.811238 [Index:3] | |
| 198 | - 2017-08-26T22:05:10: >Iteration 5: -logL=-108271.655, Lambda=1.0e-07, delta=95877.770, step=1.0e+00, max(|grad|)=7544.090872 [Index:3] | |
| 199 | - 2017-08-26T22:05:11: >Iteration 6: -logL=-145906.957, Lambda=1.0e-08, delta=37635.302, step=1.0e+00, max(|grad|)=1167.483336 [Index:3] | |
| 200 | - 2017-08-26T22:05:12: >Iteration 7: -logL=-152898.212, Lambda=1.0e-09, delta=6991.255, step=1.0e+00, max(|grad|)=110.879761 [Index:3] | |
| 201 | - 2017-08-26T22:05:12: >Iteration 8: -logL=-153217.134, Lambda=1.0e-10, delta=318.921, step=1.0e+00, max(|grad|)=-2.969681 [Scale factor 2:111] | |
| 202 | - 2017-08-26T22:05:13: >Iteration 9: -logL=-153218.344, Lambda=1.0e-11, delta=1.210, step=1.0e+00, max(|grad|)=-0.047390 [Index:3] | |
| 203 | - 2017-08-26T22:05:14: >Iteration 10: -logL=-153218.344, Lambda=1.0e-12, delta=0.000, step=1.0e+00, max(|grad|)=-0.001891 [Index:3] | |
| 204 | - 2017-08-26T22:05:15: | |
| 205 | - 2017-08-26T22:05:15: +====================================+ | |
| 206 | - 2017-08-26T22:05:15: | Maximum likelihood re-optimisation | | |
| 207 | - 2017-08-26T22:05:15: +====================================+ | |
| 208 | - 2017-08-26T22:05:15: >Iteration 0: -logL=-152378.830, Lambda=1.0e-03 | |
| 209 | - 2017-08-26T22:05:16: >Iteration 1: -logL=-152759.255, Lambda=1.0e-03, delta=380.425, step=1.0e+00, max(|grad|)=-2.480864 [Scale factor 10:21] | |
| 210 | - 2017-08-26T22:05:16: >Iteration 2: -logL=-152760.518, Lambda=1.0e-04, delta=1.264, step=1.0e+00, max(|grad|)=-0.019031 [Scale factor 10:21] | |
| 211 | - 2017-08-26T22:05:16: >Iteration 3: -logL=-152760.518, Lambda=1.0e-05, delta=0.000, step=1.0e+00, max(|grad|)=-0.000001 [Scale factor 10:21] | |
| 212 | - 2017-08-26T22:05:16: | |
| 213 | - 2017-08-26T22:05:16: +============================================+ | |
| 214 | - 2017-08-26T22:05:16: | Maximum likelihood re-optimisation results | | |
| 215 | - 2017-08-26T22:05:16: +============================================+ | |
| 216 | - 2017-08-26T22:05:16: === GOptimizerLM === | |
| 217 | - 2017-08-26T22:05:16: Optimized function value ..: -152760.518 | |
| 218 | - 2017-08-26T22:05:16: Absolute precision ........: 0.005 | |
| 219 | - 2017-08-26T22:05:16: Acceptable value decrease .: 2 | |
| 220 | - 2017-08-26T22:05:16: Optimization status .......: converged | |
| 221 | - 2017-08-26T22:05:16: Number of parameters ......: 200 | |
| 222 | - 2017-08-26T22:05:16: Number of free parameters .: 87 | |
| 223 | - 2017-08-26T22:05:16: Number of iterations ......: 3 | |
| 224 | - 2017-08-26T22:05:16: Lambda ....................: 1e-06 | |
| 225 | - 2017-08-26T22:05:16: | |
| 226 | - 2017-08-26T22:05:16: +=========================================+ | |
| 227 | - 2017-08-26T22:05:16: | Maximum likelihood optimisation results | | |
| 228 | - 2017-08-26T22:05:16: +=========================================+ | |
| 229 | - 2017-08-26T22:05:16: === GOptimizerLM === | |
| 230 | - 2017-08-26T22:05:16: Optimized function value ..: -153218.344 | |
| 231 | - 2017-08-26T22:05:16: Absolute precision ........: 0.005 | |
| 232 | - 2017-08-26T22:05:16: Acceptable value decrease .: 2 | |
| 233 | - 2017-08-26T22:05:16: Optimization status .......: converged | |
| 234 | - 2017-08-26T22:05:16: Number of parameters ......: 206 | |
| 235 | - 2017-08-26T22:05:16: Number of free parameters .: 89 | |
| 236 | - 2017-08-26T22:05:16: Number of iterations ......: 10 | |
| 237 | - 2017-08-26T22:05:16: Lambda ....................: 1e-13 | |
| 238 | - 2017-08-26T22:05:16: Maximum log likelihood ....: 153218.344 | |
| 239 | - 2017-08-26T22:05:16: Observed events (Nobs) ...: 527595.000 | |
| 240 | - 2017-08-26T22:05:16: Predicted events (Npred) ..: 527594.000 (Nobs - Npred = 1.00004221417475) | |
| 241 | - 2017-08-26T22:05:16: === GModels === | |
| 242 | - 2017-08-26T22:05:16: Number of models ..........: 5 | |
| 243 | - 2017-08-26T22:05:16: Number of parameters ......: 206 | |
| 244 | - 2017-08-26T22:05:16: === GModelSky === | |
| 245 | - 2017-08-26T22:05:16: Name ......................: Crab | |
| 246 | - 2017-08-26T22:05:16: Instruments ...............: all | |
| 247 | - 2017-08-26T22:05:16: Test Statistic ............: 915.650908945536 | |
| 248 | - 2017-08-26T22:05:16: Instrument scale factors ..: unity | |
| 249 | - 2017-08-26T22:05:16: Observation identifiers ...: all | |
| 250 | - 2017-08-26T22:05:16: Model type ................: PointSource | |
| 251 | - 2017-08-26T22:05:16: Model components ..........: "PointSource" * "PowerLaw" * "Constant" | |
| 252 | - 2017-08-26T22:05:16: Number of parameters ......: 6 | |
| 253 | - 2017-08-26T22:05:16: Number of spatial par's ...: 2 | |
| 254 | - 2017-08-26T22:05:16: RA .......................: 83.6331 [-360,360] deg (fixed,scale=1) | |
| 255 | - 2017-08-26T22:05:16: DEC ......................: 22.0145 [-90,90] deg (fixed,scale=1) | |
| 256 | - 2017-08-26T22:05:16: Number of spectral par's ..: 3 | |
| 257 | - 2017-08-26T22:05:16: Prefactor ................: 0.00237517119227384 +/- 0.000107673211964802 [-1,1] ph/cm2/s/MeV (free,scale=0.001,gradient) | |
| 258 | - 2017-08-26T22:05:16: Index ....................: -2.47153532398462 +/- 0.0500838601327289 [5,-5] (free,scale=-1,gradient) | |
| 259 | - 2017-08-26T22:05:16: PivotEnergy ..............: 1 [0.01,1000] MeV (fixed,scale=1,gradient) | |
| 260 | - 2017-08-26T22:05:16: Number of temporal par's ..: 1 | |
| 261 | - 2017-08-26T22:05:16: Normalization ............: 1 (relative value) (fixed,scale=1,gradient) | |
| 190 | + 2019-04-04T15:11:31: +=================================+ | |
| 191 | + 2019-04-04T15:11:31: | Maximum likelihood optimisation | | |
| 192 | + 2019-04-04T15:11:31: +=================================+ | |
| 193 | + 2019-04-04T15:11:32: >Iteration 0: -logL=988079.891, Lambda=1.0e-03 | |
| 194 | + 2019-04-04T15:11:32: >Iteration 1: -logL=670528.685, Lambda=1.0e-03, delta=317551.206, step=1.0e+00, max(|grad|)=86223.268050 [Index:3] | |
| 195 | + 2019-04-04T15:11:33: >Iteration 2: -logL=387041.036, Lambda=1.0e-04, delta=283487.648, step=1.0e+00, max(|grad|)=69889.358952 [Index:3] | |
| 196 | + 2019-04-04T15:11:34: >Iteration 3: -logL=154421.136, Lambda=1.0e-05, delta=232619.900, step=1.0e+00, max(|grad|)=47995.573198 [Index:3] | |
| 197 | + 2019-04-04T15:11:35: >Iteration 4: -logL=-12398.051, Lambda=1.0e-06, delta=166819.188, step=1.0e+00, max(|grad|)=24764.034734 [Index:3] | |
| 198 | + 2019-04-04T15:11:35: >Iteration 5: -logL=-108274.155, Lambda=1.0e-07, delta=95876.104, step=1.0e+00, max(|grad|)=7544.055951 [Index:3] | |
| 199 | + 2019-04-04T15:11:36: >Iteration 6: -logL=-145907.646, Lambda=1.0e-08, delta=37633.490, step=1.0e+00, max(|grad|)=1167.458562 [Index:3] | |
| 200 | + 2019-04-04T15:11:36: >Iteration 7: -logL=-152898.181, Lambda=1.0e-09, delta=6990.535, step=1.0e+00, max(|grad|)=110.883829 [Index:3] | |
| 201 | + 2019-04-04T15:11:37: >Iteration 8: -logL=-153217.048, Lambda=1.0e-10, delta=318.867, step=1.0e+00, max(|grad|)=-2.969678 [Scale factor 2:111] | |
| 202 | + 2019-04-04T15:11:37: >Iteration 9: -logL=-153218.258, Lambda=1.0e-11, delta=1.210, step=1.0e+00, max(|grad|)=-0.047105 [Index:3] | |
| 203 | + 2019-04-04T15:11:38: >Iteration 10: -logL=-153218.258, Lambda=1.0e-12, delta=0.000, step=1.0e+00, max(|grad|)=-0.001877 [Index:3] | |
| 204 | + 2019-04-04T15:11:38: | |
| 205 | + 2019-04-04T15:11:38: +====================================+ | |
| 206 | + 2019-04-04T15:11:38: | Maximum likelihood re-optimisation | | |
| 207 | + 2019-04-04T15:11:38: +====================================+ | |
| 208 | + 2019-04-04T15:11:39: >Iteration 0: -logL=-152378.895, Lambda=1.0e-03 | |
| 209 | + 2019-04-04T15:11:39: >Iteration 1: -logL=-152759.255, Lambda=1.0e-03, delta=380.360, step=1.0e+00, max(|grad|)=-2.480233 [Scale factor 10:21] | |
| 210 | + 2019-04-04T15:11:39: >Iteration 2: -logL=-152760.518, Lambda=1.0e-04, delta=1.263, step=1.0e+00, max(|grad|)=-0.019021 [Scale factor 10:21] | |
| 211 | + 2019-04-04T15:11:40: >Iteration 3: -logL=-152760.518, Lambda=1.0e-05, delta=0.000, step=1.0e+00, max(|grad|)=-0.000001 [Scale factor 10:21] | |
| 212 | + 2019-04-04T15:11:40: | |
| 213 | + 2019-04-04T15:11:40: +============================================+ | |
| 214 | + 2019-04-04T15:11:40: | Maximum likelihood re-optimisation results | | |
| 215 | + 2019-04-04T15:11:40: +============================================+ | |
| 216 | + 2019-04-04T15:11:40: === GOptimizerLM === | |
| 217 | + 2019-04-04T15:11:40: Optimized function value ..: -152760.518 | |
| 218 | + 2019-04-04T15:11:40: Absolute precision ........: 0.005 | |
| 219 | + 2019-04-04T15:11:40: Acceptable value decrease .: 2 | |
| 220 | + 2019-04-04T15:11:40: Optimization status .......: converged | |
| 221 | + 2019-04-04T15:11:40: Number of parameters ......: 200 | |
| 222 | + 2019-04-04T15:11:40: Number of free parameters .: 87 | |
| 223 | + 2019-04-04T15:11:40: Number of iterations ......: 3 | |
| 224 | + 2019-04-04T15:11:40: Lambda ....................: 1e-06 | |
| 225 | + 2019-04-04T15:11:40: | |
| 226 | + 2019-04-04T15:11:40: +=========================================+ | |
| 227 | + 2019-04-04T15:11:40: | Maximum likelihood optimisation results | | |
| 228 | + 2019-04-04T15:11:40: +=========================================+ | |
| 229 | + 2019-04-04T15:11:40: === GOptimizerLM === | |
| 230 | + 2019-04-04T15:11:40: Optimized function value ..: -153218.258 | |
| 231 | + 2019-04-04T15:11:40: Absolute precision ........: 0.005 | |
| 232 | + 2019-04-04T15:11:40: Acceptable value decrease .: 2 | |
| 233 | + 2019-04-04T15:11:40: Optimization status .......: converged | |
| 234 | + 2019-04-04T15:11:40: Number of parameters ......: 206 | |
| 235 | + 2019-04-04T15:11:40: Number of free parameters .: 89 | |
| 236 | + 2019-04-04T15:11:40: Number of iterations ......: 10 | |
| 237 | + 2019-04-04T15:11:40: Lambda ....................: 1e-13 | |
| 238 | + 2019-04-04T15:11:40: Maximum log likelihood ....: 153218.258 | |
| 239 | + 2019-04-04T15:11:40: Observed events (Nobs) ...: 527595.000 | |
| 240 | + 2019-04-04T15:11:40: Predicted events (Npred) ..: 527594.000 (Nobs - Npred = 1.00004248635378) | |
| 241 | + 2019-04-04T15:11:40: === GModels === | |
| 242 | + 2019-04-04T15:11:40: Number of models ..........: 5 | |
| 243 | + 2019-04-04T15:11:40: Number of parameters ......: 206 | |
| 244 | + 2019-04-04T15:11:40: === GModelSky === | |
| 245 | + 2019-04-04T15:11:40: Name ......................: Crab | |
| 246 | + 2019-04-04T15:11:40: Instruments ...............: all | |
| 247 | + 2019-04-04T15:11:40: Test Statistic ............: 915.478960024426 | |
| 248 | + 2019-04-04T15:11:40: Instrument scale factors ..: unity | |
| 249 | + 2019-04-04T15:11:40: Observation identifiers ...: all | |
| 250 | + 2019-04-04T15:11:40: Model type ................: PointSource | |
| 251 | + 2019-04-04T15:11:40: Model components ..........: "PointSource" * "PowerLaw" * "Constant" | |
| 252 | + 2019-04-04T15:11:40: Number of parameters ......: 6 | |
| 253 | + 2019-04-04T15:11:40: Number of spatial par's ...: 2 | |
| 254 | + 2019-04-04T15:11:40: RA .......................: 83.6331 [-360,360] deg (fixed,scale=1) | |
| 255 | + 2019-04-04T15:11:40: DEC ......................: 22.0145 [-90,90] deg (fixed,scale=1) | |
| 256 | + 2019-04-04T15:11:40: Number of spectral par's ..: 3 | |
| 257 | + 2019-04-04T15:11:40: Prefactor ................: 0.00237485707890478 +/- 0.000107670251181817 [-1,1] ph/cm2/s/MeV (free,scale=0.001,gradient) | |
| 258 | + 2019-04-04T15:11:40: Index ....................: -2.47146337740947 +/- 0.0500850436160353 [5,-5] (free,scale=-1,gradient) | |
| 259 | + 2019-04-04T15:11:40: PivotEnergy ..............: 1 [0.01,1000] MeV (fixed,scale=1,gradient) | |
| 260 | + 2019-04-04T15:11:40: Number of temporal par's ..: 1 | |
| 261 | + 2019-04-04T15:11:40: Normalization ............: 1 (relative value) (fixed,scale=1,gradient) | |
| 262 | 262 | |
| 263 | 263 | The fit converged after 10 iterations and did a second fit without the |
| 264 | 264 | source component to determine the Test Statistic value of the Crab. | ... | ... |
doc/source/users/tutorials/howto/comptel/howto_comptel_spectrum.png
doc/source/users/tutorials/howto/comptel/howto_comptel_spectrum.rst
| ... | ... | @@ -8,65 +8,30 @@ Generate a spectral energy distribution for a source |
| 8 | 8 | You will learn how to use :ref:`ctlike` to derive the spectral energy |
| 9 | 9 | density of a source from COMPTEL data. |
| 10 | 10 | |
| 11 | -So far the :ref:`csspec` script does not work for COMPTEL data, but you | |
| 12 | -will learn here a method that you can use to derive the spectrum of any | |
| 13 | -source using COMPTEL data. For this you have to modify the | |
| 14 | -:ref:`model definition file <glossary_moddef>` | |
| 15 | -and replace the spectral component of the Crab by a node function: | |
| 16 | - | |
| 17 | -.. code-block:: xml | |
| 18 | - | |
| 19 | - <?xml version="1.0" standalone="no"?> | |
| 20 | - <source_library title="source library"> | |
| 21 | - <source name="Crab" type="PointSource" tscalc="1"> | |
| 22 | - <spectrum type="NodeFunction"> | |
| 23 | - <node> | |
| 24 | - <parameter name="Energy" value="0.75" scale="1" free="0" /> | |
| 25 | - <parameter name="Intensity" value="0.00177777777777778" error="0" scale="1" min="1e-30" free="1" /> | |
| 26 | - </node> | |
| 27 | - <node> | |
| 28 | - <parameter name="Energy" value="2.56496392001505" scale="1" free="0" /> | |
| 29 | - <parameter name="Intensity" value="0.000151997861926818" error="0" scale="1" min="1e-30" free="1" /> | |
| 30 | - </node> | |
| 31 | - <node> | |
| 32 | - <parameter name="Energy" value="8.7720532146386" scale="1" free="0" /> | |
| 33 | - <parameter name="Intensity" value="1.29956343920572e-05" error="0" scale="1" min="1e-30" free="1" /> | |
| 34 | - </node> | |
| 35 | - <node> | |
| 36 | - <parameter name="Energy" value="30" scale="1" free="0" /> | |
| 37 | - <parameter name="Intensity" value="1.11111111111111e-06" error="0" scale="1" min="1e-30" free="1" /> | |
| 38 | - </node> | |
| 39 | - </spectrum> | |
| 40 | - <spatialModel type="PointSource"> | |
| 41 | - <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="0"/> | |
| 42 | - <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="0"/> | |
| 43 | - </spatialModel> | |
| 44 | - </source> | |
| 45 | - <source name="Background(0.75-1.0)MeV" type="DRBFitting" instrument="COM" id="100001"> | |
| 46 | - <node> | |
| 47 | - <parameter name="Phibar" scale="1.0" value="1.0" min="0.0" max="50.0" free="0"/> | |
| 48 | - <parameter name="Normalization" scale="1.0" value="0.0" min="0.0" max="1000.0" free="0"/> | |
| 49 | - </node> | |
| 50 | - ... | |
| 51 | - </source_library> | |
| 52 | - | |
| 53 | -Instead of the power law the model now contains a node function with four | |
| 54 | -intensity nodes between 0.75 MeV and 30 MeV, and the :ref:`ctlike` tool will | |
| 55 | -now adjust the intensities of each of the nodes which will result in a | |
| 56 | -spectrum. To do this type now: | |
| 11 | +To determine a spectrum of the Crab nebula you can use the :ref:`csspec` | |
| 12 | +script. To do this, type | |
| 57 | 13 | |
| 58 | 14 | .. code-block:: bash |
| 59 | 15 | |
| 60 | - $ ctlike | |
| 61 | - Input event list, counts cube or observation definition XML file [obs.xml] | |
| 62 | - Input model definition XML file [models.xml] model_nodes.xml | |
| 63 | - Output model definition XML file [crab_results.xml] crab_nodes_results.xml | |
| 64 | - | |
| 65 | -This will produce the | |
| 66 | -:ref:`model definition file <glossary_moddef>` | |
| 67 | -``crab_nodes_results.xml`` with the intensities of the fitted source at | |
| 68 | -each energy. The results are displayed graphically below. The red data points | |
| 69 | -show the combined Crab nebular and pulsar spectrum from | |
| 16 | + $ csspec | |
| 17 | + Input event list, counts cube, or observation definition XML file [events.fits] obs.xml | |
| 18 | + Input model definition XML file [$CTOOLS/share/models/crab.xml] models.xml | |
| 19 | + Source name [Crab] | |
| 20 | + Spectrum generation method (SLICE|NODES|AUTO) [AUTO] | |
| 21 | + Algorithm for defining energy bins (FILE|LIN|LOG) [LOG] | |
| 22 | + Start value for first energy bin in TeV [0.1] 0.00000075 | |
| 23 | + Stop value for last energy bin in TeV [100.0] 0.00003 | |
| 24 | + Number of energy bins (1-200) [20] 4 | |
| 25 | + Output spectrum file [spectrum.fits] | |
| 26 | + | |
| 27 | +This will generate a logarithmically spaced spectrum composed of 4 energy bins | |
| 28 | +comprised within 0.75 MeV and 30 GeV. The :ref:`csspec` tool is run in the ``AUTO`` | |
| 29 | +mode, which for COMPTEL data corresponds to the ``NODES`` method. :ref:`csspec` | |
| 30 | +will convert the Crab spectrum in the input model into a node function and fit | |
| 31 | +all intensity nodes using :ref:`ctlike`. The resulting node intensities are | |
| 32 | +then interpreted as the spectral point, and are displayed as red data points | |
| 33 | +in the figure below. The black data points show the combined Crab nebular and | |
| 34 | +pulsar spectrum from | |
| 70 | 35 | `Kuiper et al. 2001, A&A, 378, 918 <http://cdsads.u-strasbg.fr/abs/2001A%26A...378..918K>`_ |
| 71 | 36 | for comparison. |
| 72 | 37 | |
| ... | ... | @@ -75,7 +40,3 @@ for comparison. |
| 75 | 40 | :align: center |
| 76 | 41 | |
| 77 | 42 | *Spectrum of the Crab derived using a node function* |
| 78 | - | |
| 79 | -.. note:: | |
| 80 | - The ``NodeFunction`` spectral models implements a piece-wise power law | |
| 81 | - that is defined by the intensity values at each node. | ... | ... |
doc/source/users/tutorials/howto/comptel/howto_comptel_tsmap.rst
| ... | ... | @@ -20,14 +20,14 @@ source. You do this by using the :ref:`cttsmap` tool as follows: |
| 20 | 20 | Input event list, counts cube or observation definition XML file [events.fits] obs.xml |
| 21 | 21 | Test source name [Crab] |
| 22 | 22 | Input model definition XML file [$CTOOLS/share/models/crab.xml] models.xml |
| 23 | + Coordinate system (CEL - celestial, GAL - galactic) (CEL|GAL) [CEL] | |
| 24 | + Projection method (AIT|AZP|CAR|GLS|MER|MOL|SFL|SIN|STG|TAN) [CAR] | |
| 23 | 25 | First coordinate of image center in degrees (RA or galactic l) (0-360) [83.63] |
| 24 | 26 | Second coordinate of image center in degrees (DEC or galactic b) (-90-90) [22.01] |
| 25 | - Projection method (AIT|AZP|CAR|GLS|MER|MOL|SFL|SIN|STG|TAN) [CAR] | |
| 26 | - Coordinate system (CEL - celestial, GAL - galactic) (CEL|GAL) [CEL] | |
| 27 | 27 | Image scale (in degrees/pixel) [0.02] 1.0 |
| 28 | 28 | Size of the X axis in pixels [200] 10 |
| 29 | 29 | Size of the Y axis in pixels [200] 10 |
| 30 | - Output Test Statistic map file [tsmap.fits] | |
| 30 | + Output Test Statistic map file [tsmap.fits] | |
| 31 | 31 | |
| 32 | 32 | :ref:`cttsmap` created a 10 x 10 pixels map with a pixel size of 1 degree |
| 33 | 33 | around the location of the Crab and saved the result in the FITS file | ... | ... |
doc/source/users/tutorials/howto/comptel/howto_comptel_ulimit.rst
| ... | ... | @@ -29,28 +29,28 @@ create the following |
| 29 | 29 | <parameter name="DRB" file="m35330_drg.fits"/> |
| 30 | 30 | <parameter name="DRG" file="m35330_drg.fits"/> |
| 31 | 31 | <parameter name="DRX" file="m32504_drx.fits"/> |
| 32 | - <parameter name="IAQ" value="ENERG(0.75-1.0)MeV"/> | |
| 32 | + <parameter name="IAQ" value="UNH(0.75-1.0)MeV"/> | |
| 33 | 33 | </observation> |
| 34 | 34 | <observation name="Vela" id="200001" instrument="COM"> |
| 35 | 35 | <parameter name="DRE" file="m50867_dre.fits"/> |
| 36 | 36 | <parameter name="DRB" file="m35330_drg.fits"/> |
| 37 | 37 | <parameter name="DRG" file="m35330_drg.fits"/> |
| 38 | 38 | <parameter name="DRX" file="m32504_drx.fits"/> |
| 39 | - <parameter name="IAQ" value="ENERG(1.0-3.0)MeV"/> | |
| 39 | + <parameter name="IAQ" value="UNH(1.0-3.0)MeV"/> | |
| 40 | 40 | </observation> |
| 41 | 41 | <observation name="Vela" id="300001" instrument="COM"> |
| 42 | 42 | <parameter name="DRE" file="m50868_dre.fits"/> |
| 43 | 43 | <parameter name="DRB" file="m35330_drg.fits"/> |
| 44 | 44 | <parameter name="DRG" file="m35330_drg.fits"/> |
| 45 | 45 | <parameter name="DRX" file="m32504_drx.fits"/> |
| 46 | - <parameter name="IAQ" value="ENERG(3.0-10.0)MeV"/> | |
| 46 | + <parameter name="IAQ" value="UNH(3.0-10.0)MeV"/> | |
| 47 | 47 | </observation> |
| 48 | 48 | <observation name="Vela" id="400001" instrument="COM"> |
| 49 | 49 | <parameter name="DRE" file="m50869_dre.fits"/> |
| 50 | 50 | <parameter name="DRB" file="m35330_drg.fits"/> |
| 51 | 51 | <parameter name="DRG" file="m35330_drg.fits"/> |
| 52 | 52 | <parameter name="DRX" file="m32504_drx.fits"/> |
| 53 | - <parameter name="IAQ" value="ENERG(10.0-30.0)MeV"/> | |
| 53 | + <parameter name="IAQ" value="UNH(10.0-30.0)MeV"/> | |
| 54 | 54 | </observation> |
| 55 | 55 | </observation_list> |
| 56 | 56 | |
| ... | ... | @@ -98,9 +98,9 @@ The results of the upper limit computation can then be extracted from the |
| 98 | 98 | |
| 99 | 99 | .. code-block:: bash |
| 100 | 100 | |
| 101 | - 2017-08-27T08:13:44: +=====================+ | |
| 102 | - 2017-08-27T08:13:44: | Upper limit results | | |
| 103 | - 2017-08-27T08:13:44: +=====================+ | |
| 104 | - 2017-08-27T08:13:44: Differential flux limit ...: 9.26955448510129e-06 ph/cm2/s/MeV at 1e-06 TeV | |
| 105 | - 2017-08-27T08:13:44: Integral flux limit .......: 6.43104918005e-05 ph/cm2/s within [7.5e-08-3e-05] TeV | |
| 106 | - 2017-08-27T08:13:44: Energy flux limit .........: 1.54555137999306e-10 erg/cm2/s within [7.5e-08-3e-05] TeV | |
| 101 | + 2019-04-04T15:47:22: +=====================+ | |
| 102 | + 2019-04-04T15:47:22: | Upper limit results | | |
| 103 | + 2019-04-04T15:47:22: +=====================+ | |
| 104 | + 2019-04-04T15:47:22: Differential flux limit ...: 9.26467937144868e-06 ph/cm2/s/MeV at 1e-06 TeV | |
| 105 | + 2019-04-04T15:47:22: Integral flux limit .......: 6.42766691440729e-05 ph/cm2/s within [7.5e-08-3e-05] TeV | |
| 106 | + 2019-04-04T15:47:22: Energy flux limit .........: 1.54473853201363e-10 erg/cm2/s within [7.5e-08-3e-05] TeV | ... | ... |
doc/source/users/tutorials/howto/fermi/howto_fermi_butterfly.png
100755 → 100644
doc/source/users/tutorials/howto/fermi/howto_fermi_spectrum.rst
| ... | ... | @@ -8,7 +8,7 @@ Generate a spectral energy distribution for a source |
| 8 | 8 | You will learn how to use :ref:`csspec` to derive the spectral energy |
| 9 | 9 | density of a source from Fermi-LAT data. |
| 10 | 10 | |
| 11 | -To determine a spectral of the Vela pulsar you can use the :ref:`csspec` | |
| 11 | +To determine a spectrum of the Vela pulsar you can use the :ref:`csspec` | |
| 12 | 12 | script. To do this, type |
| 13 | 13 | |
| 14 | 14 | .. code-block:: bash | ... | ... |
models/Makefile.am
| 1 | 1 | ############################################################################# |
| 2 | 2 | # Makefile for models # |
| 3 | 3 | # ------------------------------------------------------------------------- # |
| 4 | -# Copyright (C) 2016-2018 Juergen Knoedlseder # | |
| 4 | +# Copyright (C) 2016-2019 Juergen Knoedlseder # | |
| 5 | 5 | # ------------------------------------------------------------------------- # |
| 6 | 6 | # # |
| 7 | 7 | # This program is free software: you can redistribute it and/or modify # |
| ... | ... | @@ -24,6 +24,7 @@ models = 1dc_howto.xml \ |
| 24 | 24 | 1dc_howto_unbinned.xml \ |
| 25 | 25 | 1dc_howto_vela.xml \ |
| 26 | 26 | 1dc_howto_velapsr.xml \ |
| 27 | + comptel_howto_gc.xml \ | |
| 27 | 28 | bkg_irf.xml \ |
| 28 | 29 | bkg_cube.xml \ |
| 29 | 30 | test_irf.xml \ |
| ... | ... | @@ -31,7 +32,7 @@ models = 1dc_howto.xml \ |
| 31 | 32 | crab.xml \ |
| 32 | 33 | crab_beyond.xml \ |
| 33 | 34 | crab_2bkg.xml \ |
| 34 | - crab_nobkg.xml \ | |
| 35 | + crab_nobkg.xml \ | |
| 35 | 36 | crab_poly.xml \ |
| 36 | 37 | crab_profile.xml \ |
| 37 | 38 | disk.xml \ | ... | ... |
models/comptel_howto_gc.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
| 2 | +<source_library title="source library"> | |
| 3 | + <source name="GC" type="PointSource" tscalc="1"> | |
| 4 | + <spectrum type="Constant"> | |
| 5 | + <parameter name="Normalization" scale="1.0e-5" value="1.0" min="-100.0" max="100.0" free="1"/> | |
| 6 | + </spectrum> | |
| 7 | + <spatialModel type="PointSource"> | |
| 8 | + <parameter name="RA" scale="1.0" value="266.40" min="-360" max="360" free="0"/> | |
| 9 | + <parameter name="DEC" scale="1.0" value="-28.94" min="-90" max="90" free="0"/> | |
| 10 | + </spatialModel> | |
| 11 | + </source> | |
| 12 | + <source name="Background" type="DRBFitting" instrument="COM"> | |
| 13 | + <node> | |
| 14 | + <parameter name="Phibar" scale="1.0" value="9.0" min="0.0" max="50.0" free="0" /> | |
| 15 | + <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 16 | + </node> | |
| 17 | + <node> | |
| 18 | + <parameter name="Phibar" scale="1.0" value="11.0" min="0.0" max="50.0" free="0" /> | |
| 19 | + <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 20 | + </node> | |
| 21 | + <node> | |
| 22 | + <parameter name="Phibar" scale="1.0" value="13.0" min="0.0" max="50.0" free="0"/> | |
| 23 | + <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 24 | + </node> | |
| 25 | + <node> | |
| 26 | + <parameter name="Phibar" scale="1.0" value="15.0" min="0.0" max="50.0" free="0"/> | |
| 27 | + <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 28 | + </node> | |
| 29 | + <node> | |
| 30 | + <parameter name="Phibar" scale="1.0" value="17.0" min="0.0" max="50.0" free="0"/> | |
| 31 | + <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 32 | + </node> | |
| 33 | + <node> | |
| 34 | + <parameter name="Phibar" scale="1.0" value="19.0" min="0.0" max="50.0" free="0"/> | |
| 35 | + <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 36 | + </node> | |
| 37 | + <node> | |
| 38 | + <parameter name="Phibar" scale="1.0" value="21.0" min="0.0" max="50.0" free="0"/> | |
| 39 | + <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 40 | + </node> | |
| 41 | + <node> | |
| 42 | + <parameter name="Phibar" scale="1.0" value="23.0" min="0.0" max="50.0" free="0"/> | |
| 43 | + <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 44 | + </node> | |
| 45 | + <node> | |
| 46 | + <parameter name="Phibar" scale="1.0" value="25.0" min="0.0" max="50.0" free="0"/> | |
| 47 | + <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 48 | + </node> | |
| 49 | + <node> | |
| 50 | + <parameter name="Phibar" scale="1.0" value="27.0" min="0.0" max="50.0" free="0"/> | |
| 51 | + <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 52 | + </node> | |
| 53 | + <node> | |
| 54 | + <parameter name="Phibar" scale="1.0" value="29.0" min="0.0" max="50.0" free="0"/> | |
| 55 | + <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 56 | + </node> | |
| 57 | + <node> | |
| 58 | + <parameter name="Phibar" scale="1.0" value="31.0" min="0.0" max="50.0" free="0"/> | |
| 59 | + <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 60 | + </node> | |
| 61 | + <node> | |
| 62 | + <parameter name="Phibar" scale="1.0" value="33.0" min="0.0" max="50.0" free="0"/> | |
| 63 | + <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 64 | + </node> | |
| 65 | + <node> | |
| 66 | + <parameter name="Phibar" scale="1.0" value="35.0" min="0.0" max="50.0" free="0"/> | |
| 67 | + <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 68 | + </node> | |
| 69 | + <node> | |
| 70 | + <parameter name="Phibar" scale="1.0" value="37.0" min="0.0" max="50.0" free="0"/> | |
| 71 | + <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 72 | + </node> | |
| 73 | + <node> | |
| 74 | + <parameter name="Phibar" scale="1.0" value="39.0" min="0.0" max="50.0" free="0"/> | |
| 75 | + <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 76 | + </node> | |
| 77 | + <node> | |
| 78 | + <parameter name="Phibar" scale="1.0" value="41.0" min="0.0" max="50.0" free="0"/> | |
| 79 | + <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 80 | + </node> | |
| 81 | + <node> | |
| 82 | + <parameter name="Phibar" scale="1.0" value="43.0" min="0.0" max="50.0" free="0"/> | |
| 83 | + <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 84 | + </node> | |
| 85 | + <node> | |
| 86 | + <parameter name="Phibar" scale="1.0" value="45.0" min="0.0" max="50.0" free="0"/> | |
| 87 | + <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 88 | + </node> | |
| 89 | + <node> | |
| 90 | + <parameter name="Phibar" scale="1.0" value="47.0" min="0.0" max="50.0" free="0"/> | |
| 91 | + <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 92 | + </node> | |
| 93 | + <node> | |
| 94 | + <parameter name="Phibar" scale="1.0" value="49.0" min="0.0" max="50.0" free="0"/> | |
| 95 | + <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 96 | + </node> | |
| 97 | + </source> | |
| 98 | +</source_library> | ... | ... |