Commit 83fd12793fde630e017351c3adbdeb5ba52fd4c0
1 parent
266efaeb
Augment H.E.S.S. tutorial
Showing
6 changed files
with
367 additions
and
1 deletions
doc/source/users/tutorials/hess_dr1/fitting.rst
0 → 100644
| 1 | +.. _hess_dr1_fitting: | ||
| 2 | + | ||
| 3 | +Fitting the model components to the data | ||
| 4 | +---------------------------------------- | ||
| 5 | + | ||
| 6 | + .. admonition:: What you will learn | ||
| 7 | + | ||
| 8 | + You will learn **how to fit a parametric model to the data**. | ||
| 9 | + | ||
| 10 | +Adjust source model name and set pivot energy to 1 TeV to bring it energy | ||
| 11 | +interval of data. | ||
| 12 | +Remove ``error`` attributes. | ||
| 13 | + | ||
| 14 | +.. code-block:: xml | ||
| 15 | + | ||
| 16 | + <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
| 17 | + <source_library title="source library"> | ||
| 18 | + <source name="Crab" type="PointSource"> | ||
| 19 | + <spectrum type="PowerLaw"> | ||
| 20 | + <parameter name="Prefactor" value="1" scale="5.7e-18" min="0" free="1" /> | ||
| 21 | + <parameter name="Index" value="1" scale="-2.48" min="-4" max="4" free="1" /> | ||
| 22 | + <parameter name="PivotEnergy" value="1" scale="1000000" free="0" /> | ||
| 23 | + </spectrum> | ||
| 24 | + <spatialModel type="PointSource"> | ||
| 25 | + <parameter name="RA" value="83.6192131308071" scale="1" free="1" /> | ||
| 26 | + <parameter name="DEC" value="22.0199996472185" scale="1" free="1" /> | ||
| 27 | + </spatialModel> | ||
| 28 | + </source> | ||
| 29 | + <source name="Background" type="CTAAeffBackground"> | ||
| 30 | + <spectrum type="PowerLaw"> | ||
| 31 | + <parameter name="Prefactor" value="1" scale="1e-13" min="0" free="1" /> | ||
| 32 | + <parameter name="Index" value="1" scale="-2.5" min="-4" max="4" free="1" /> | ||
| 33 | + <parameter name="PivotEnergy" value="1" scale="1000000" free="0" /> | ||
| 34 | + </spectrum> | ||
| 35 | + </source> | ||
| 36 | + </source_library> | ||
| 37 | + | ||
| 38 | + | ||
| 39 | +.. code-block:: bash | ||
| 40 | + | ||
| 41 | + $ ctlike debug=yes | ||
| 42 | + Input event list, counts cube or observation definition XML file [events.fits] obs_crab_selected.xml | ||
| 43 | + Input model definition XML file [$CTOOLS/share/models/crab.xml] crab_models.xml | ||
| 44 | + Output model definition XML file [crab_results.xml] | ||
| 45 | + | ||
| 46 | +.. code-block:: none | ||
| 47 | + | ||
| 48 | + 2018-09-11T21:17:31: +=========================================+ | ||
| 49 | + 2018-09-11T21:17:31: | Maximum likelihood optimisation results | | ||
| 50 | + 2018-09-11T21:17:31: +=========================================+ | ||
| 51 | + 2018-09-11T21:17:31: === GOptimizerLM === | ||
| 52 | + 2018-09-11T21:17:31: Optimized function value ..: 98422.688 | ||
| 53 | + 2018-09-11T21:17:31: Absolute precision ........: 0.005 | ||
| 54 | + 2018-09-11T21:17:31: Acceptable value decrease .: 2 | ||
| 55 | + 2018-09-11T21:17:31: Optimization status .......: converged | ||
| 56 | + 2018-09-11T21:17:31: Number of parameters ......: 10 | ||
| 57 | + 2018-09-11T21:17:31: Number of free parameters .: 6 | ||
| 58 | + 2018-09-11T21:17:31: Number of iterations ......: 24 | ||
| 59 | + 2018-09-11T21:17:31: Lambda ....................: 0.1 | ||
| 60 | + 2018-09-11T21:17:31: Maximum log likelihood ....: -98422.688 | ||
| 61 | + 2018-09-11T21:17:31: Observed events (Nobs) ...: 9675.000 | ||
| 62 | + 2018-09-11T21:17:31: Predicted events (Npred) ..: 9674.870 (Nobs - Npred = 0.129601074213497) | ||
| 63 | + 2018-09-11T21:17:31: === GModels === | ||
| 64 | + 2018-09-11T21:17:31: Number of models ..........: 2 | ||
| 65 | + 2018-09-11T21:17:31: Number of parameters ......: 10 | ||
| 66 | + 2018-09-11T21:17:31: === GModelSky === | ||
| 67 | + 2018-09-11T21:17:31: Name ......................: Crab | ||
| 68 | + 2018-09-11T21:17:31: Instruments ...............: all | ||
| 69 | + 2018-09-11T21:17:31: Instrument scale factors ..: unity | ||
| 70 | + 2018-09-11T21:17:31: Observation identifiers ...: all | ||
| 71 | + 2018-09-11T21:17:31: Model type ................: PointSource | ||
| 72 | + 2018-09-11T21:17:31: Model components ..........: "PointSource" * "PowerLaw" * "Constant" | ||
| 73 | + 2018-09-11T21:17:31: Number of parameters ......: 6 | ||
| 74 | + 2018-09-11T21:17:31: Number of spatial par's ...: 2 | ||
| 75 | + 2018-09-11T21:17:31: RA .......................: 83.6230374464172 +/- 0.00241074887155303 deg (free,scale=1) | ||
| 76 | + 2018-09-11T21:17:31: DEC ......................: 22.0249049416179 +/- 0.0022137104783551 deg (free,scale=1) | ||
| 77 | + 2018-09-11T21:17:31: Number of spectral par's ..: 3 | ||
| 78 | + 2018-09-11T21:17:31: Prefactor ................: 4.81375364083447e-17 +/- 2.62970930530696e-18 [0,infty[ ph/cm2/s/MeV (free,scale=5.7e-18,gradient) | ||
| 79 | + 2018-09-11T21:17:31: Index ....................: -2.71079050853091 +/- 0.0652734279744327 [9.92,-9.92] (free,scale=-2.48,gradient) | ||
| 80 | + 2018-09-11T21:17:31: PivotEnergy ..............: 1000000 MeV (fixed,scale=1000000,gradient) | ||
| 81 | + 2018-09-11T21:17:31: Number of temporal par's ..: 1 | ||
| 82 | + 2018-09-11T21:17:31: Normalization ............: 1 (relative value) (fixed,scale=1,gradient) | ||
| 83 | + 2018-09-11T21:17:31: === GCTAModelAeffBackground === | ||
| 84 | + 2018-09-11T21:17:31: Name ......................: Background | ||
| 85 | + 2018-09-11T21:17:31: Instruments ...............: all | ||
| 86 | + 2018-09-11T21:17:31: Instrument scale factors ..: unity | ||
| 87 | + 2018-09-11T21:17:31: Observation identifiers ...: all | ||
| 88 | + 2018-09-11T21:17:31: Model type ................: "PowerLaw" * "Constant" | ||
| 89 | + 2018-09-11T21:17:31: Number of parameters ......: 4 | ||
| 90 | + 2018-09-11T21:17:31: Number of spectral par's ..: 3 | ||
| 91 | + 2018-09-11T21:17:31: Prefactor ................: 1.80502240642969e-13 +/- 2.34991048262393e-15 [0,infty[ ph/cm2/s/MeV (free,scale=1e-13,gradient) | ||
| 92 | + 2018-09-11T21:17:31: Index ....................: -2.58303579414564 +/- 0.0128891124984818 [10,-10] (free,scale=-2.5,gradient) | ||
| 93 | + 2018-09-11T21:17:31: PivotEnergy ..............: 1000000 MeV (fixed,scale=1000000,gradient) | ||
| 94 | + 2018-09-11T21:17:31: Number of temporal par's ..: 1 | ||
| 95 | + 2018-09-11T21:17:31: Normalization ............: 1 (relative value) (fixed,scale=1,gradient) |
doc/source/users/tutorials/hess_dr1/index.rst
doc/source/users/tutorials/hess_dr1/select_events.rst
0 → 100644
| 1 | +.. _hess_dr1_select_events: | ||
| 2 | + | ||
| 3 | +Selecting the relevant events | ||
| 4 | +----------------------------- | ||
| 5 | + | ||
| 6 | + .. admonition:: What you will learn | ||
| 7 | + | ||
| 8 | + You will learn **how to select the relevant events for a target** | ||
| 9 | + and **how to determine the useful energy range** for a set of | ||
| 10 | + observations. | ||
| 11 | + | ||
| 12 | +Now you are ready for your first H.E.S.S. data analysis. | ||
| 13 | +As first step you should create a folder that will contain your analysis | ||
| 14 | +results and any intermediate data products. | ||
| 15 | +Let's call this folder ``crab`` since we explain in this example how you | ||
| 16 | +can analyse the data from the Crab nebula. | ||
| 17 | +Create and step into the folder using | ||
| 18 | + | ||
| 19 | +.. code-block:: bash | ||
| 20 | + | ||
| 21 | + $ mkdir crab | ||
| 22 | + $ cd crab | ||
| 23 | + | ||
| 24 | +The first step of your analysis consists in selecting the relevant events | ||
| 25 | +from the observations. | ||
| 26 | +In this step you can select a specific energy range, time range or region | ||
| 27 | +of interest. | ||
| 28 | +In the example below you will select events according to the save energy | ||
| 29 | +thresholds that are defined in the effective area component of the | ||
| 30 | +:ref:`instrument response functions <glossary_irf>`. | ||
| 31 | +You do this by setting the hidden parameter ``usethres=DEFAULT``. | ||
| 32 | +In addition, you will select all events within 2 degrees of the pointing | ||
| 33 | +direction: | ||
| 34 | + | ||
| 35 | +.. code-block:: bash | ||
| 36 | + | ||
| 37 | + $ ctselect usethres=DEFAULT | ||
| 38 | + Input event list or observation definition XML file [events.fits] $HESSDATA/obs/obs_crab.xml | ||
| 39 | + Lower energy limit (TeV) [0.1] NONE | ||
| 40 | + Radius of ROI around pointing or specified RA/DEC (degrees) (0-180) [3.0] 2.0 | ||
| 41 | + Start time (UTC string, JD, MJD or MET in seconds) [NONE] | ||
| 42 | + Output event list or observation definition XML file [selected_events.fits] obs_crab_selected.xml | ||
| 43 | + | ||
| 44 | +Below is an excerpt of the log file that was created by :ref:`ctselect`. | ||
| 45 | +You will find that the following energy ranges were applied for the | ||
| 46 | +observations: | ||
| 47 | + | ||
| 48 | +* ``id=023523``: 0.871 - 100 TeV | ||
| 49 | +* ``id=023526``: 0.708 - 100 TeV | ||
| 50 | +* ``id=023559``: 0.661 - 100 TeV | ||
| 51 | +* ``id=023592``: 0.871 - 100 TeV | ||
| 52 | + | ||
| 53 | +.. code-block:: none | ||
| 54 | + | ||
| 55 | + 2018-09-11T14:05:15: +=================+ | ||
| 56 | + 2018-09-11T14:05:15: | Event selection | | ||
| 57 | + 2018-09-11T14:05:15: +=================+ | ||
| 58 | + 2018-09-11T14:05:15: === HESS observation "Crab" (id=023523) === | ||
| 59 | + 2018-09-11T14:05:15: Input filename ............: /project-data/hess/hess_dl3_dr1/data/hess_dl3_dr1_obs_id_023523.fits.gz | ||
| 60 | + 2018-09-11T14:05:15: Event extension name ......: EVENTS | ||
| 61 | + 2018-09-11T14:05:15: GTI extension name ........: GTI | ||
| 62 | + 2018-09-11T14:05:16: === Event selection === | ||
| 63 | + 2018-09-11T14:05:16: Selected energy range .....: 0.870964 - 100 TeV | ||
| 64 | + 2018-09-11T14:05:16: Requested RoI .............: Centre(RA,DEC)=(83.633333333333, 21.514444444444) deg, Radius=2 deg | ||
| 65 | + 2018-09-11T14:05:16: RoI of data ...............: Centre(RA,DEC)=(83.633333333333, 21.514444444444) deg, Radius=2 deg | ||
| 66 | + 2018-09-11T14:05:16: Selected RoI ..............: Centre(RA,DEC)=(83.633333333333, 21.514444444444) deg, Radius=2 deg | ||
| 67 | + 2018-09-11T14:05:16: cfitsio selection .........: ENERGY >= 0.87096359 && ENERGY <= 100.00000000 && ANGSEP(83.633333,21.514444,RA,DEC) <= 2.000000 | ||
| 68 | + 2018-09-11T14:05:16: FITS filename .............: /var/tmp/tmp.0.QX6f0L[EVENTS][ENERGY >= 0.87096359 && ENERGY <= 100.00000000 && ANGSEP(83.633333,21.514444,RA,DEC) <= 2.000000] | ||
| 69 | + 2018-09-11T14:05:16: === HESS observation "Crab" (id=023526) === | ||
| 70 | + 2018-09-11T14:05:16: Input filename ............: /project-data/hess/hess_dl3_dr1/data/hess_dl3_dr1_obs_id_023526.fits.gz | ||
| 71 | + 2018-09-11T14:05:16: Event extension name ......: EVENTS | ||
| 72 | + 2018-09-11T14:05:16: GTI extension name ........: GTI | ||
| 73 | + 2018-09-11T14:05:16: === Event selection === | ||
| 74 | + 2018-09-11T14:05:16: Selected energy range .....: 0.707946 - 100 TeV | ||
| 75 | + 2018-09-11T14:05:16: Requested RoI .............: Centre(RA,DEC)=(83.633333333333, 22.514444444444) deg, Radius=2 deg | ||
| 76 | + 2018-09-11T14:05:16: RoI of data ...............: Centre(RA,DEC)=(83.633333333333, 22.514444444444) deg, Radius=2 deg | ||
| 77 | + 2018-09-11T14:05:16: Selected RoI ..............: Centre(RA,DEC)=(83.633333333333, 22.514444444444) deg, Radius=2 deg | ||
| 78 | + 2018-09-11T14:05:16: cfitsio selection .........: ENERGY >= 0.70794578 && ENERGY <= 100.00000000 && ANGSEP(83.633333,22.514444,RA,DEC) <= 2.000000 | ||
| 79 | + 2018-09-11T14:05:16: FITS filename .............: /var/tmp/tmp.1.IoZj2b[EVENTS][ENERGY >= 0.70794578 && ENERGY <= 100.00000000 && ANGSEP(83.633333,22.514444,RA,DEC) <= 2.000000] | ||
| 80 | + 2018-09-11T14:05:16: === HESS observation "Crab" (id=023559) === | ||
| 81 | + 2018-09-11T14:05:16: Input filename ............: /project-data/hess/hess_dl3_dr1/data/hess_dl3_dr1_obs_id_023559.fits.gz | ||
| 82 | + 2018-09-11T14:05:16: Event extension name ......: EVENTS | ||
| 83 | + 2018-09-11T14:05:16: GTI extension name ........: GTI | ||
| 84 | + 2018-09-11T14:05:16: === Event selection === | ||
| 85 | + 2018-09-11T14:05:16: Selected energy range .....: 0.660693 - 100 TeV | ||
| 86 | + 2018-09-11T14:05:16: Requested RoI .............: Centre(RA,DEC)=(85.2533333381014, 22.014444444444) deg, Radius=2 deg | ||
| 87 | + 2018-09-11T14:05:16: RoI of data ...............: Centre(RA,DEC)=(85.2533333381014, 22.014444444444) deg, Radius=2 deg | ||
| 88 | + 2018-09-11T14:05:16: Selected RoI ..............: Centre(RA,DEC)=(85.2533333381014, 22.014444444444) deg, Radius=2 deg | ||
| 89 | + 2018-09-11T14:05:16: cfitsio selection .........: ENERGY >= 0.66069345 && ENERGY <= 100.00000000 && ANGSEP(85.253333,22.014444,RA,DEC) <= 2.000000 | ||
| 90 | + 2018-09-11T14:05:16: FITS filename .............: /var/tmp/tmp.2.IAwBNH[EVENTS][ENERGY >= 0.66069345 && ENERGY <= 100.00000000 && ANGSEP(85.253333,22.014444,RA,DEC) <= 2.000000] | ||
| 91 | + 2018-09-11T14:05:16: === HESS observation "Crab" (id=023592) === | ||
| 92 | + 2018-09-11T14:05:16: Input filename ............: /project-data/hess/hess_dl3_dr1/data/hess_dl3_dr1_obs_id_023592.fits.gz | ||
| 93 | + 2018-09-11T14:05:16: Event extension name ......: EVENTS | ||
| 94 | + 2018-09-11T14:05:16: GTI extension name ........: GTI | ||
| 95 | + 2018-09-11T14:05:16: === Event selection === | ||
| 96 | + 2018-09-11T14:05:16: Selected energy range .....: 0.870964 - 100 TeV | ||
| 97 | + 2018-09-11T14:05:16: Requested RoI .............: Centre(RA,DEC)=(82.0133333285646, 22.014444444444) deg, Radius=2 deg | ||
| 98 | + 2018-09-11T14:05:16: RoI of data ...............: Centre(RA,DEC)=(82.0133333285646, 22.014444444444) deg, Radius=2 deg | ||
| 99 | + 2018-09-11T14:05:16: Selected RoI ..............: Centre(RA,DEC)=(82.0133333285646, 22.014444444444) deg, Radius=2 deg | ||
| 100 | + 2018-09-11T14:05:16: cfitsio selection .........: ENERGY >= 0.87096359 && ENERGY <= 100.00000000 && ANGSEP(82.013333,22.014444,RA,DEC) <= 2.000000 | ||
| 101 | + 2018-09-11T14:05:16: FITS filename .............: /var/tmp/tmp.3.879wq4[EVENTS][ENERGY >= 0.87096359 && ENERGY <= 100.00000000 && ANGSEP(82.013333,22.014444,RA,DEC) <= 2.000000] | ||
| 102 | + | ||
| 103 | +You may use the :ref:`csobsinfo` script to display a summary of the selected | ||
| 104 | +events into the console: | ||
| 105 | + | ||
| 106 | +.. code-block:: bash | ||
| 107 | + | ||
| 108 | + $ csobsinfo debug=yes | ||
| 109 | + Input event list, counts cube, or observation definition XML file [$HESSDATA/obs/obs_crab.xml] obs_crab_selected.xml | ||
| 110 | + Output DS9 region file [ds9.reg] | ||
| 111 | + | ||
| 112 | +.. note:: | ||
| 113 | + The ``debug=yes`` attribute instructs :ref:`csobsinfo` to direct the log | ||
| 114 | + file output also to the console. Duplication of log file output into | ||
| 115 | + the console using the ``debug=yes`` attribute works for any tool or script. | ||
| 116 | + | ||
| 117 | +The output of :ref:`csobsinfo` is shown below. | ||
| 118 | +:ref:`ctselect` selected 9675 events within an energy interval of | ||
| 119 | +0.66 - 100 TeV. | ||
| 120 | +This will be the energy range that you will from now on use for the data | ||
| 121 | +analysis. | ||
| 122 | + | ||
| 123 | +.. code-block:: none | ||
| 124 | + | ||
| 125 | + 2018-09-11T20:30:16: +=========+ | ||
| 126 | + 2018-09-11T20:30:16: | Summary | | ||
| 127 | + 2018-09-11T20:30:16: +=========+ | ||
| 128 | + 2018-09-11T20:30:16: === Observations === | ||
| 129 | + 2018-09-11T20:30:16: Unbinned observations .....: 4 | ||
| 130 | + 2018-09-11T20:30:16: Binned observations .......: 0 | ||
| 131 | + 2018-09-11T20:30:16: === Events === | ||
| 132 | + 2018-09-11T20:30:16: Number of events ..........: 9675 | ||
| 133 | + 2018-09-11T20:30:16: Number of bins ............: 0 | ||
| 134 | + 2018-09-11T20:30:16: === Pointings === | ||
| 135 | + 2018-09-11T20:30:16: Mean offset angle .........: Unknown | ||
| 136 | + 2018-09-11T20:30:16: Mean zenith angle .........: 47.04 deg | ||
| 137 | + 2018-09-11T20:30:16: Mean azimuth angle ........: 13.76 deg | ||
| 138 | + 2018-09-11T20:30:16: === Energy range === | ||
| 139 | + 2018-09-11T20:30:16: Minimum energy ............: 660.693448007596 GeV | ||
| 140 | + 2018-09-11T20:30:16: Maximum energy ............: 100 TeV | ||
| 141 | + 2018-09-11T20:30:16: === Time range === | ||
| 142 | + 2018-09-11T20:30:16: MJD (days) ................: 53343.922 - 53347.933 | ||
| 143 | + 2018-09-11T20:30:16: UTC .......................: 2004-12-04T22:07:06 - 2004-12-08T22:22:02 | ||
| 144 | + 2018-09-11T20:30:16: Total ontime ..............: 6742.00 s = 112.37 min = 1.87 h | ||
| 145 | + 2018-09-11T20:30:16: Total livetime ............: 6313.81 s = 105.23 min = 1.75 h |
doc/source/users/tutorials/hess_dr1/skymap.png
0 → 100644
66.1 KB
doc/source/users/tutorials/hess_dr1/skymap.rst
0 → 100644
| 1 | +.. _hess_dr1_sky_map: | ||
| 2 | + | ||
| 3 | +Generating a sky map from the events | ||
| 4 | +------------------------------------ | ||
| 5 | + | ||
| 6 | + .. admonition:: What you will learn | ||
| 7 | + | ||
| 8 | + You will learn **how to generate a sky map from the selected events** | ||
| 9 | + and **how to find potential sources in the data**. | ||
| 10 | + | ||
| 11 | +As next step you will make a sky map of the selected events to inspect what's | ||
| 12 | +in the data. | ||
| 13 | +You do this using the :ref:`ctskymap` tool. | ||
| 14 | +Since the data correspond to observations of the Crab nebula you should centre | ||
| 15 | +the sky map on this source. | ||
| 16 | +The energy limits of the sky map should be set to the energy interval of the | ||
| 17 | +data (0.66 - 100 TeV). | ||
| 18 | +To create the sky map, type: | ||
| 19 | + | ||
| 20 | +.. code-block:: bash | ||
| 21 | + | ||
| 22 | + $ ctskymap debug=yes | ||
| 23 | + Input event list or observation definition XML file [events.fits] obs_crab_selected.xml | ||
| 24 | + Coordinate system (CEL - celestial, GAL - galactic) (CEL|GAL) [CEL] | ||
| 25 | + Projection method (AIT|AZP|CAR|GLS|MER|MOL|SFL|SIN|STG|TAN) [CAR] | ||
| 26 | + First coordinate of image center in degrees (RA or galactic l) (0-360) [83.63] | ||
| 27 | + Second coordinate of image center in degrees (DEC or galactic b) (-90-90) [22.01] | ||
| 28 | + Image scale (in degrees/pixel) [0.02] | ||
| 29 | + Size of the X axis in pixels [200] | ||
| 30 | + Size of the Y axis in pixels [200] | ||
| 31 | + Lower energy limit (TeV) [0.1] 0.66 | ||
| 32 | + Upper energy limit (TeV) [100.0] | ||
| 33 | + Background subtraction method (NONE|IRF|RING) [NONE] | ||
| 34 | + Output skymap file [skymap.fits] | ||
| 35 | + | ||
| 36 | +The resulting sky map, displayed using | ||
| 37 | +`ds9 <http://ds9.si.edu>`_ with a square-root color scaling, is shown below: | ||
| 38 | + | ||
| 39 | +.. figure:: skymap.png | ||
| 40 | + :width: 400px | ||
| 41 | + :align: center | ||
| 42 | + | ||
| 43 | + *Sky map of the selected events centred on the Crab nebula* | ||
| 44 | + | ||
| 45 | +Based on the sky map you can now extract a model for all potentially significant | ||
| 46 | +sources in the data. | ||
| 47 | +You do this using the :ref:`cssrcdetect` script, and to extract only significant | ||
| 48 | +sources, you should set the detection threshold for example to 5 sigma. | ||
| 49 | +For convenience, the :ref:`cssrcdetect` script can also add a background model | ||
| 50 | +component to the output | ||
| 51 | +:ref:`model definition XML file <glossary_moddef>`. | ||
| 52 | +Since the H.E.S.S. Instrument Response Function does not include a background | ||
| 53 | +template, the ``IRF`` option will not work. | ||
| 54 | +While sophisticated methods for the analysis of H.E.S.S. data still need to | ||
| 55 | +be developed, you may try the effective area model ``AEFF`` that uses the | ||
| 56 | +effective area as spatial template for the background component. | ||
| 57 | +So, now type: | ||
| 58 | + | ||
| 59 | +.. code-block:: bash | ||
| 60 | + | ||
| 61 | + $ cssrcdetect | ||
| 62 | + Input sky map file [skymap.fits] | ||
| 63 | + Source model type (POINT) [POINT] | ||
| 64 | + Background model type (NONE|IRF|AEFF|CUBE|RACC) [NONE] AEFF | ||
| 65 | + Detection threshold (Gaussian sigma) [5.0] | ||
| 66 | + Correlation kernel radius (deg) [0.1] | ||
| 67 | + Output model definition XML file [models.xml] crab_models.xml | ||
| 68 | + Output DS9 region file [ds9.reg] crab.reg | ||
| 69 | + | ||
| 70 | +Below an excerpt of the ``cssrcdetect.log`` log file. | ||
| 71 | +Only one significant source was found, and its position is consistent with the | ||
| 72 | +Crab nebula. | ||
| 73 | +This is also illustrated in the figure below where the region file | ||
| 74 | +``crab.reg`` that was produced by :ref:`cssrcdetect` was overlaid with | ||
| 75 | +`ds9 <http://ds9.si.edu>`_ | ||
| 76 | +on the sky map. | ||
| 77 | + | ||
| 78 | +.. code-block:: none | ||
| 79 | + | ||
| 80 | + 2018-09-11T20:32:20: +==================+ | ||
| 81 | + 2018-09-11T20:32:20: | Source detection | | ||
| 82 | + 2018-09-11T20:32:20: +==================+ | ||
| 83 | + 2018-09-11T20:32:20: === Iteration 1 === | ||
| 84 | + 2018-09-11T20:32:20: Map maximum ...............: 11.1003120131 | ||
| 85 | + 2018-09-11T20:32:20: Src001 position ...........: (RA,Dec)=(83.6192131308071,22.0199996472185) | ||
| 86 | + 2018-09-11T20:32:20: === Iteration 2 === | ||
| 87 | + 2018-09-11T20:32:20: Map maximum ...............: None above threshold | ||
| 88 | + | ||
| 89 | +.. figure:: skymap_crab.png | ||
| 90 | + :width: 400px | ||
| 91 | + :align: center | ||
| 92 | + | ||
| 93 | + *Sky map of the selected events centred on the Crab nebula* | ||
| 94 | + | ||
| 95 | +The | ||
| 96 | +:ref:`model definition file <glossary_moddef>` | ||
| 97 | +``crab_models.xml`` that was generated by :ref:`cssrcdetect` is shown below. | ||
| 98 | +It contains a point source ``Src001`` at the position of the Crab nebula | ||
| 99 | +and an effective area background model scaled by a spectral power law as | ||
| 100 | +background component. | ||
| 101 | + | ||
| 102 | +.. code-block:: xml | ||
| 103 | + | ||
| 104 | + <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
| 105 | + <source_library title="source library"> | ||
| 106 | + <source name="Src001" type="PointSource"> | ||
| 107 | + <spectrum type="PowerLaw"> | ||
| 108 | + <parameter name="Prefactor" value="1" error="0" scale="5.7e-18" min="0" free="1" /> | ||
| 109 | + <parameter name="Index" value="1" error="-0" scale="-2.48" min="-4.03225806451613" max="4.03225806451613" free="1" /> | ||
| 110 | + <parameter name="PivotEnergy" value="1" scale="300000" free="0" /> | ||
| 111 | + </spectrum> | ||
| 112 | + <spatialModel type="PointSource"> | ||
| 113 | + <parameter name="RA" value="83.6192131308071" error="0" scale="1" free="1" /> | ||
| 114 | + <parameter name="DEC" value="22.0199996472185" error="0" scale="1" free="1" /> | ||
| 115 | + </spatialModel> | ||
| 116 | + </source> | ||
| 117 | + <source name="Background" type="CTAAeffBackground"> | ||
| 118 | + <spectrum type="PowerLaw"> | ||
| 119 | + <parameter name="Prefactor" value="1" error="0" scale="1e-13" min="0" free="1" /> | ||
| 120 | + <parameter name="Index" value="1" error="-0" scale="-2.5" min="-4" max="4" free="1" /> | ||
| 121 | + <parameter name="PivotEnergy" value="1" scale="1000000" free="0" /> | ||
| 122 | + </spectrum> | ||
| 123 | + </source> | ||
| 124 | + </source_library> |
doc/source/users/tutorials/hess_dr1/skymap_crab.png
0 → 100644
68.7 KB