Commit 8e268d3df132fd3574898730772ccbb3a78d0baa
1 parent
e0bb02ee
Update quickstart tutorial
Showing
26 changed files
with
413 additions
and
418 deletions
doc/source/users/tutorials/beyond/beyond_residual.rst deleted
| 1 | -.. _sec_residual: | |
| 2 | - | |
| 3 | -Generating a residual map | |
| 4 | -~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| 5 | - | |
| 6 | -Once the data are fitted you may want to inspect the residuals between | |
| 7 | -the observed counts and the modeled event distribution. | |
| 8 | -This task is done using the :ref:`csresmap` script. | |
| 9 | -:ref:`csresmap` will create a stacked counts cube (using :ref:`ctbin`) | |
| 10 | -and subtract from this counts cube a model cube (computed using | |
| 11 | -:ref:`ctmodel`). | |
| 12 | -The difference will then be summed over all energy bins and divided by | |
| 13 | -the model value to obtained the fractional residuals | |
| 14 | - | |
| 15 | -.. math:: | |
| 16 | - Residual = \frac{Counts-Model}{Model} | |
| 17 | - | |
| 18 | -for all map pixels. | |
| 19 | - | |
| 20 | -Suppose that you have done the following unbinned ``ctlike`` analysis: | |
| 21 | - | |
| 22 | -.. code-block:: bash | |
| 23 | - | |
| 24 | - $ ctlike | |
| 25 | - Input event list, counts cube or observation definition XML file [events.fits] obs.xml | |
| 26 | - Calibration database [prod2] | |
| 27 | - Instrument response function [South_0.5h] | |
| 28 | - Input model XML file [$CTOOLS/share/models/crab.xml] | |
| 29 | - Output model XML file [crab_results.xml] | |
| 30 | - | |
| 31 | -The :ref:`csresmap` script is then used as follows: | |
| 32 | - | |
| 33 | -.. code-block:: bash | |
| 34 | - | |
| 35 | - $ csresmap | |
| 36 | - Parfile csresmap.par not found. Create default parfile. | |
| 37 | - Input event list, counts cube, or observation definition XML file [events.fits] obs.xml | |
| 38 | - Calibration database [prod2] | |
| 39 | - Instrument response function [South_0.5h] | |
| 40 | - Input model XML file [$CTOOLS/share/models/crab.xml] crab_results.xml | |
| 41 | - First coordinate of image center in degrees (RA or galactic l) (0-360) [83.63] | |
| 42 | - Second coordinate of image center in degrees (DEC or galactic b) (-90-90) [22.01] | |
| 43 | - Coordinate System (CEL|GAL) [CEL] | |
| 44 | - Projection method (AIT|AZP|CAR|MER|MOL|STG|TAN) [CAR] | |
| 45 | - Size of the X axis in pixels [200] | |
| 46 | - Size of the Y axis in pixels [200] | |
| 47 | - Pixel size (deg/pixel) [0.02] | |
| 48 | - Output residual map file [resmap.fits] | |
| 49 | - Residual map computation algorithm (SUB|SUBDIV|SUBDIVSQRT) [SUBDIV] | |
| 50 | - | |
| 51 | -In our example, the map will cover a field of 4° x 4° centred on the | |
| 52 | -Crab nebula at a pixel scale of 0.02 degrees per pixel. | |
| 53 | -The resulting residual map ``resmap.fits``, smoothed with a Gaussian | |
| 54 | -kernel of 3 pixels to enhance features, is shown in the following figure. | |
| 55 | -Obviously, the map is free from any significant residuals. | |
| 56 | - | |
| 57 | -.. figure:: resmap-crab.png | |
| 58 | - :height: 400px | |
| 59 | - :align: center | |
| 60 | - | |
| 61 | - *Residual map of the Crab nebula region* | |
| 62 | - |
doc/source/users/tutorials/quickstart/binning.rst
| ... | ... | @@ -21,22 +21,22 @@ using the :ref:`ctbin` tool as follows: |
| 21 | 21 | $ ctbin |
| 22 | 22 | Input event list or observation definition XML file [events.fits] selected_events.fits |
| 23 | 23 | First coordinate of image center in degrees (RA or galactic l) (0-360) [83.63] |
| 24 | - Second coordinate of image center in degrees (DEC or galactic b) (-90-90) [22.01] | |
| 24 | + Second coordinate of image center in degrees (DEC or galactic b) (-90-90) [22.51] | |
| 25 | 25 | Projection method (AIT|AZP|CAR|GLS|MER|MOL|SFL|SIN|STG|TAN) [CAR] |
| 26 | 26 | Coordinate system (CEL - celestial, GAL - galactic) (CEL|GAL) [CEL] |
| 27 | 27 | Image scale (in degrees/pixel) [0.02] |
| 28 | 28 | Size of the X axis in pixels [200] |
| 29 | 29 | Size of the Y axis in pixels [200] |
| 30 | 30 | Algorithm for defining energy bins (FILE|LIN|LOG) [LOG] |
| 31 | - Start value for first energy bin in TeV [0.1] | |
| 32 | - Stop value for last energy bin in TeV [100.0] | |
| 31 | + Lower energy limit (TeV) [0.1] | |
| 32 | + Upper energy limit (TeV) [100.0] | |
| 33 | 33 | Number of energy bins (1-200) [20] |
| 34 | 34 | Output counts cube file [cntcube.fits] |
| 35 | 35 | |
| 36 | -In this example the events from file ``events.fits`` will be binned into | |
| 37 | -a counts cube stored into the file ``cntcube.fits``. The counts cube | |
| 38 | -is centred on the location of the Crab nebula (Right Ascension 83.63 deg, | |
| 39 | -Declination 22.01 deg). A cartesian projection aligned in celestial | |
| 36 | +In this example the events from file ``selected_events.fits`` will be binned | |
| 37 | +into a counts cube stored into the file ``cntcube.fits``. The counts cube | |
| 38 | +is centred on the pointing direction (Right Ascension 83.63 deg, | |
| 39 | +Declination 22.51 deg). A cartesian projection aligned in celestial | |
| 40 | 40 | coordinates is used and the counts cube has |
| 41 | 41 | 200 x 200 spatial pixels of 0.02 x 0.02 degrees in size, covering |
| 42 | 42 | an area of 4 deg x 4 deg, and 20 logarithmically spaced energy bins, covering |
| ... | ... | @@ -80,17 +80,17 @@ reproduced below: |
| 80 | 80 | |
| 81 | 81 | .. code-block:: none |
| 82 | 82 | |
| 83 | - 2017-08-08T20:17:06: +=================+ | |
| 84 | - 2017-08-08T20:17:06: | Bin observation | | |
| 85 | - 2017-08-08T20:17:06: +=================+ | |
| 86 | - 2017-08-08T20:17:06: === CTA observation === | |
| 87 | - 2017-08-08T20:17:06: Events in list ............: 21991 | |
| 88 | - 2017-08-08T20:17:06: Events in cube ............: 18827 | |
| 89 | - 2017-08-08T20:17:06: Events outside RoI ........: 0 | |
| 90 | - 2017-08-08T20:17:06: Events with invalid WCS ...: 0 | |
| 91 | - 2017-08-08T20:17:06: Events outside cube area ..: 3164 | |
| 92 | - 2017-08-08T20:17:06: Events outside energy bins : 0 | |
| 93 | - | |
| 94 | -From the 21991 events that have been simulated and stored in the | |
| 95 | -``events.fits`` file, 18827 lie within the cube boundaries and are thus put | |
| 96 | -into the resulting counts cube. | |
| 83 | + 2018-01-24T14:23:03: +=================+ | |
| 84 | + 2018-01-24T14:23:03: | Bin observation | | |
| 85 | + 2018-01-24T14:23:03: +=================+ | |
| 86 | + 2018-01-24T14:23:03: === CTA observation (id=000001) === | |
| 87 | + 2018-01-24T14:23:03: Events in list ............: 21974 | |
| 88 | + 2018-01-24T14:23:03: Events in cube ............: 18799 | |
| 89 | + 2018-01-24T14:23:03: Events outside RoI ........: 0 | |
| 90 | + 2018-01-24T14:23:03: Events with invalid WCS ...: 0 | |
| 91 | + 2018-01-24T14:23:03: Events outside cube area ..: 3175 | |
| 92 | + 2018-01-24T14:23:03: Events outside energy bins : 0 | |
| 93 | + | |
| 94 | +From the 21974 events that were simulated and stored in the | |
| 95 | +``selected_events.fits`` file, 18799 lie within the cube boundaries and are thus | |
| 96 | +put into the resulting counts cube. | ... | ... |
doc/source/users/tutorials/quickstart/butterfly.jpg
doc/source/users/tutorials/quickstart/butterfly.rst
| ... | ... | @@ -38,10 +38,10 @@ default is set to 100. Below an excerpt of the first lines of the |
| 38 | 38 | |
| 39 | 39 | .. code-block:: none |
| 40 | 40 | |
| 41 | - 103514.216667934 8.08876441182872e-15 7.86364405017512e-15 8.31388477348232e-15 | |
| 42 | - 110917.48152624 6.81370736945431e-15 6.62965024227895e-15 6.99776449662967e-15 | |
| 43 | - 118850.222743702 5.73964152654309e-15 5.58918876927557e-15 5.89009428381061e-15 | |
| 44 | - 127350.308101666 4.83488401643174e-15 4.71191629605204e-15 4.95785173681143e-15 | |
| 41 | + 103514.216667934 8.08473784238882e-15 7.8714657958793e-15 8.29800988889835e-15 | |
| 42 | + 110917.48152624 6.81070529541223e-15 6.63639780809342e-15 6.98501278273104e-15 | |
| 43 | + 118850.222743702 5.73744103089563e-15 5.59501033791654e-15 5.87987172387472e-15 | |
| 44 | + 127350.308101666 4.83330700055084e-15 4.71693954114459e-15 4.94967445995709e-15 | |
| 45 | 45 | ... |
| 46 | 46 | |
| 47 | 47 | A graphical display of the results is shown below: |
| ... | ... | @@ -63,7 +63,7 @@ A graphical display of the results is shown below: |
| 63 | 63 | Python module. You can find these scripts in the |
| 64 | 64 | ``$CTOOLS/share/examples/python`` folder. |
| 65 | 65 | |
| 66 | - Read the section :ref:`1dc_howto_display` to learn more about the | |
| 66 | + Read the section about :ref:`sec_plotting` to learn more about the | |
| 67 | 67 | available scripts. The plot above was generated using: |
| 68 | 68 | |
| 69 | 69 | .. code-block:: bash | ... | ... |
doc/source/users/tutorials/quickstart/cntmap-map.jpg
doc/source/users/tutorials/quickstart/energy_dispersion.rst
| ... | ... | @@ -29,13 +29,13 @@ To simulate events taking the energy dispersion into account you run the |
| 29 | 29 | .. code-block:: bash |
| 30 | 30 | |
| 31 | 31 | $ ctobssim edisp=yes |
| 32 | - RA of pointing (degrees) (0-360) [83.5] | |
| 33 | - Dec of pointing (degrees) (-90-90) [22.8] | |
| 32 | + RA of pointing (degrees) (0-360) [83.63] | |
| 33 | + Dec of pointing (degrees) (-90-90) [22.51] | |
| 34 | 34 | Radius of FOV (degrees) (0-180) [5.0] |
| 35 | 35 | Start time (UTC string, JD, MJD or MET in seconds) [2020-01-01T00:00:00] |
| 36 | - Stop time (UTC string, JD, MJD or MET in seconds) [2020-01-01T00:30:00] 2020-01-01T01:00:00 | |
| 37 | - Lower energy limit (TeV) [0.1] 0.030 | |
| 38 | - Upper energy limit (TeV) [100.0] 200.0 | |
| 36 | + Stop time (UTC string, JD, MJD or MET in seconds) [2020-01-01T01:00:00] | |
| 37 | + Lower energy limit (TeV) [0.03] | |
| 38 | + Upper energy limit (TeV) [150.0] | |
| 39 | 39 | Calibration database [prod2] |
| 40 | 40 | Instrument response function [South_0.5h] |
| 41 | 41 | Input model definition XML file [$CTOOLS/share/models/crab.xml] |
| ... | ... | @@ -49,10 +49,10 @@ You then select events from the simulated data as before using the |
| 49 | 49 | $ ctselect |
| 50 | 50 | Input event list or observation definition XML file [events.fits] events_edisp.fits |
| 51 | 51 | RA for ROI centre (degrees) (0-360) [83.63] |
| 52 | - Dec for ROI centre (degrees) (-90-90) [22.01] | |
| 52 | + Dec for ROI centre (degrees) (-90-90) [22.51] | |
| 53 | 53 | Radius of ROI (degrees) (0-180) [3.0] |
| 54 | - Start time (UTC string, JD, MJD or MET in seconds) [NONE] 2020-01-01T00:10:00 | |
| 55 | - Stop time (UTC string, JD, MJD or MET in seconds) [NONE] 2020-01-01T00:40:00 | |
| 54 | + Start time (UTC string, JD, MJD or MET in seconds) [2020-01-01T00:10:00] | |
| 55 | + Stop time (UTC string, JD, MJD or MET in seconds) [2020-01-01T00:40:00] | |
| 56 | 56 | Lower energy limit (TeV) [0.1] |
| 57 | 57 | Upper energy limit (TeV) [100.0] |
| 58 | 58 | Output event list or observation definition XML file [selected_events.fits] selected_events_edisp.fits |
| ... | ... | @@ -65,15 +65,15 @@ Then you bin as before the selected events into a counts cube using the |
| 65 | 65 | $ ctbin |
| 66 | 66 | Input event list or observation definition XML file [selected_events.fits] selected_events_edisp.fits |
| 67 | 67 | First coordinate of image center in degrees (RA or galactic l) (0-360) [83.63] |
| 68 | - Second coordinate of image center in degrees (DEC or galactic b) (-90-90) [22.01] | |
| 68 | + Second coordinate of image center in degrees (DEC or galactic b) (-90-90) [22.51] | |
| 69 | 69 | Projection method (AIT|AZP|CAR|GLS|MER|MOL|SFL|SIN|STG|TAN) [CAR] |
| 70 | 70 | Coordinate system (CEL - celestial, GAL - galactic) (CEL|GAL) [CEL] |
| 71 | 71 | Image scale (in degrees/pixel) [0.02] |
| 72 | 72 | Size of the X axis in pixels [200] |
| 73 | 73 | Size of the Y axis in pixels [200] |
| 74 | 74 | Algorithm for defining energy bins (FILE|LIN|LOG) [LOG] |
| 75 | - Start value for first energy bin in TeV [0.1] | |
| 76 | - Stop value for last energy bin in TeV [100.0] | |
| 75 | + Lower energy limit (TeV) [0.1] | |
| 76 | + Upper energy limit (TeV) [100.0] | |
| 77 | 77 | Number of energy bins (1-200) [20] |
| 78 | 78 | Output counts cube file [cntcube.fits] cntcube_edisp.fits |
| 79 | 79 | |
| ... | ... | @@ -89,15 +89,16 @@ using the :ref:`ctexpcube` tool. You run the tool as follows: |
| 89 | 89 | Instrument response function [South_0.5h] |
| 90 | 90 | Input counts cube file to extract energy dispersion cube definition [NONE] |
| 91 | 91 | First coordinate of image center in degrees (RA or galactic l) (0-360) [83.63] |
| 92 | - Second coordinate of image center in degrees (DEC or galactic b) (-90-90) [22.01] | |
| 92 | + Second coordinate of image center in degrees (DEC or galactic b) (-90-90) [22.51] | |
| 93 | 93 | Projection method (AIT|AZP|CAR|GLS|MER|MOL|SFL|SIN|STG|TAN) [CAR] |
| 94 | 94 | Coordinate system (CEL - celestial, GAL - galactic) (CEL|GAL) [CEL] |
| 95 | 95 | Image scale (in degrees/pixel) [1.0] |
| 96 | 96 | Size of the X axis in pixels [10] |
| 97 | 97 | Size of the Y axis in pixels [10] |
| 98 | + Algorithm for defining energy bins (FILE|LIN|LOG) [LOG] | |
| 98 | 99 | Lower energy limit (TeV) [0.1] |
| 99 | 100 | Upper energy limit (TeV) [100.0] |
| 100 | - Number of energy bins [20] | |
| 101 | + Number of energy bins (1-200) [20] | |
| 101 | 102 | Output energy dispersion cube file [edispcube.fits] |
| 102 | 103 | |
| 103 | 104 | Now you are ready to perform a binned maximum likelihood analysis taking the | ... | ... |
doc/source/users/tutorials/quickstart/fitting.rst
| ... | ... | @@ -51,24 +51,24 @@ that was produced by the run: |
| 51 | 51 | |
| 52 | 52 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
| 53 | 53 | <source_library title="source library"> |
| 54 | - <source name="Crab" type="PointSource"> | |
| 55 | - <spectrum type="PowerLaw"> | |
| 56 | - <parameter name="Prefactor" value="5.75838848465398" error="0.106769545262219" scale="1e-16" min="1e-07" max="1000" free="1" /> | |
| 57 | - <parameter name="Index" value="2.48329029246896" error="0.0156629819926589" scale="-1" min="0" max="5" free="1" /> | |
| 58 | - <parameter name="PivotEnergy" value="0.3" scale="1000000" min="0.01" max="1000" free="0" /> | |
| 59 | - </spectrum> | |
| 60 | - <spatialModel type="PointSource"> | |
| 61 | - <parameter name="RA" value="83.6331" scale="1" min="-360" max="360" free="0" /> | |
| 62 | - <parameter name="DEC" value="22.0145" scale="1" min="-90" max="90" free="0" /> | |
| 63 | - </spatialModel> | |
| 64 | - </source> | |
| 65 | - <source name="BackgroundModel" type="CTACubeBackground" instrument="CTA,HESS,MAGIC,VERITAS"> | |
| 66 | - <spectrum type="PowerLaw"> | |
| 67 | - <parameter name="Prefactor" value="1.01452697987952" error="0.0164053949309481" scale="1" min="0.01" max="100" free="1" /> | |
| 68 | - <parameter name="Index" value="0.0139985850735283" error="0.00978611932246665" scale="1" min="-5" max="5" free="1" /> | |
| 69 | - <parameter name="PivotEnergy" value="1" scale="1000000" free="0" /> | |
| 70 | - </spectrum> | |
| 71 | - </source> | |
| 54 | + <source name="Crab" type="PointSource"> | |
| 55 | + <spectrum type="PowerLaw"> | |
| 56 | + <parameter name="Prefactor" value="5.76059824355157" error="0.100804418203193" scale="1e-16" min="1e-07" max="1000" free="1" /> | |
| 57 | + <parameter name="Index" value="2.48246178370535" error="0.0150306767905499" scale="-1" min="0" max="5" free="1" /> | |
| 58 | + <parameter name="PivotEnergy" value="0.3" scale="1000000" min="0.01" max="1000" free="0" /> | |
| 59 | + </spectrum> | |
| 60 | + <spatialModel type="PointSource"> | |
| 61 | + <parameter name="RA" value="83.6331" scale="1" min="-360" max="360" free="0" /> | |
| 62 | + <parameter name="DEC" value="22.0145" scale="1" min="-90" max="90" free="0" /> | |
| 63 | + </spatialModel> | |
| 64 | + </source> | |
| 65 | + <source name="BackgroundModel" type="CTACubeBackground" instrument="CTA,HESS,MAGIC,VERITAS"> | |
| 66 | + <spectrum type="PowerLaw"> | |
| 67 | + <parameter name="Prefactor" value="1.00863986588954" error="0.0159030370642366" scale="1" min="0.01" max="100" free="1" /> | |
| 68 | + <parameter name="Index" value="0.0113292722406164" error="0.00951929088334377" scale="1" min="-5" max="5" free="1" /> | |
| 69 | + <parameter name="PivotEnergy" value="1" scale="1000000" free="0" /> | |
| 70 | + </spectrum> | |
| 71 | + </source> | |
| 72 | 72 | </source_library> |
| 73 | 73 | |
| 74 | 74 | In this example, the ``Prefactor`` and ``Index`` of the spectral model for the |
| ... | ... | @@ -100,65 +100,63 @@ Below the last lines of the log file that was produced by this run: |
| 100 | 100 | |
| 101 | 101 | .. code-block:: none |
| 102 | 102 | |
| 103 | - 2017-11-28T15:36:34: +=================================+ | |
| 104 | - 2017-11-28T15:36:34: | Maximum likelihood optimisation | | |
| 105 | - 2017-11-28T15:36:34: +=================================+ | |
| 106 | - 2017-11-28T15:36:34: >Iteration 0: -logL=52917.614, Lambda=1.0e-03 | |
| 107 | - 2017-11-28T15:36:35: >Iteration 1: -logL=52916.284, Lambda=1.0e-03, delta=1.330, step=1.0e+00, m | |
| 108 | - ax(|grad|)=-2.668420 [Prefactor:6] | |
| 109 | - 2017-11-28T15:36:35: >Iteration 2: -logL=52916.283, Lambda=1.0e-04, delta=0.001, step=1.0e+00, m | |
| 110 | - ax(|grad|)=-0.037269 [Index:7] | |
| 111 | - 2017-11-28T15:36:36: | |
| 112 | - 2017-11-28T15:36:36: +=========================================+ | |
| 113 | - 2017-11-28T15:36:36: | Maximum likelihood optimisation results | | |
| 114 | - 2017-11-28T15:36:36: +=========================================+ | |
| 115 | - 2017-11-28T15:36:36: === GOptimizerLM === | |
| 116 | - 2017-11-28T15:36:36: Optimized function value ..: 52916.283 | |
| 117 | - 2017-11-28T15:36:36: Absolute precision ........: 0.005 | |
| 118 | - 2017-11-28T15:36:36: Acceptable value decrease .: 2 | |
| 119 | - 2017-11-28T15:36:36: Optimization status .......: converged | |
| 120 | - 2017-11-28T15:36:36: Number of parameters ......: 10 | |
| 121 | - 2017-11-28T15:36:36: Number of free parameters .: 4 | |
| 122 | - 2017-11-28T15:36:36: Number of iterations ......: 2 | |
| 123 | - 2017-11-28T15:36:36: Lambda ....................: 1e-05 | |
| 124 | - 2017-11-28T15:36:36: Maximum log likelihood ....: -52916.283 | |
| 125 | - 2017-11-28T15:36:36: Observed events (Nobs) ...: 17279.000 | |
| 126 | - 2017-11-28T15:36:36: Predicted events (Npred) ..: 17278.995 (Nobs - Npred = 0.00451555556355743) | |
| 127 | - 2017-11-28T15:36:36: === GModels === | |
| 128 | - 2017-11-28T15:36:36: Number of models ..........: 2 | |
| 129 | - 2017-11-28T15:36:36: Number of parameters ......: 10 | |
| 130 | - 2017-11-28T15:36:36: === GModelSky === | |
| 131 | - 2017-11-28T15:36:36: Name ......................: Crab | |
| 132 | - 2017-11-28T15:36:36: Instruments ...............: all | |
| 133 | - 2017-11-28T15:36:36: Instrument scale factors ..: unity | |
| 134 | - 2017-11-28T15:36:36: Observation identifiers ...: all | |
| 135 | - 2017-11-28T15:36:36: Model type ................: PointSource | |
| 136 | - 2017-11-28T15:36:36: Model components ..........: "PointSource" * "PowerLaw" * "Constant" | |
| 137 | - 2017-11-28T15:36:36: Number of parameters ......: 6 | |
| 138 | - 2017-11-28T15:36:36: Number of spatial par's ...: 2 | |
| 139 | - 2017-11-28T15:36:36: RA .......................: 83.6331 [-360,360] deg (fixed,scale=1) | |
| 140 | - 2017-11-28T15:36:36: DEC ......................: 22.0145 [-90,90] deg (fixed,scale=1) | |
| 141 | - 2017-11-28T15:36:36: Number of spectral par's ..: 3 | |
| 142 | - 2017-11-28T15:36:36: Prefactor ................: 5.75838848465398e-16 +/- 1.06769545262219e-17 [1e-23,1e-13] ph/cm2/s/MeV (free,scale=1e-16,gradient) | |
| 143 | - 2017-11-28T15:36:36: Index ....................: -2.48329029246896 +/- 0.0156629819926589 [-0,-5] (free,scale=-1,gradient) | |
| 144 | - 2017-11-28T15:36:36: PivotEnergy ..............: 300000 [10000,1000000000] MeV (fixed,scale=1000000,gradient) | |
| 145 | - 2017-11-28T15:36:36: Number of temporal par's ..: 1 | |
| 146 | - 2017-11-28T15:36:36: Normalization ............: 1 (relative value) (fixed,scale=1,gradient) | |
| 147 | - 2017-11-28T15:36:36: === GCTAModelCubeBackground === | |
| 148 | - 2017-11-28T15:36:36: Name ......................: BackgroundModel | |
| 149 | - 2017-11-28T15:36:36: Instruments ...............: CTA, HESS, MAGIC, VERITAS | |
| 150 | - 2017-11-28T15:36:36: Instrument scale factors ..: unity | |
| 151 | - 2017-11-28T15:36:36: Observation identifiers ...: all | |
| 152 | - 2017-11-28T15:36:36: Model type ................: "PowerLaw" * "Constant" | |
| 153 | - 2017-11-28T15:36:36: Number of parameters ......: 4 | |
| 154 | - 2017-11-28T15:36:36: Number of spectral par's ..: 3 | |
| 155 | - 2017-11-28T15:36:36: Prefactor ................: 1.01452697987952 +/- 0.0164053949309481 [0.01,100] ph/cm2/s/MeV (free,scale=1,gradient) | |
| 156 | - 2017-11-28T15:36:36: Index ....................: 0.0139985850735283 +/- 0.00978611932246665 [-5,5] (free,scale=1,gradient) | |
| 157 | - 2017-11-28T15:36:36: PivotEnergy ..............: 1000000 MeV (fixed,scale=1000000,gradient) | |
| 158 | - 2017-11-28T15:36:36: Number of temporal par's ..: 1 | |
| 159 | - 2017-11-28T15:36:36: Normalization ............: 1 (relative value) (fixed,scale=1,gradient) | |
| 160 | - | |
| 161 | -The maximum likelihood optimizer required 3 iterations to converge. This | |
| 103 | + 2018-01-24T14:29:51: +=================================+ | |
| 104 | + 2018-01-24T14:29:51: | Maximum likelihood optimisation | | |
| 105 | + 2018-01-24T14:29:51: +=================================+ | |
| 106 | + 2018-01-24T14:29:51: >Iteration 0: -logL=56469.945, Lambda=1.0e-03 | |
| 107 | + 2018-01-24T14:29:52: >Iteration 1: -logL=56468.674, Lambda=1.0e-03, delta=1.271, step=1.0e+00, max(|grad|)=-1.725465 [Prefactor:6] | |
| 108 | + 2018-01-24T14:29:53: >Iteration 2: -logL=56468.674, Lambda=1.0e-04, delta=0.000, step=1.0e+00, max(|grad|)=-0.020159 [Index:7] | |
| 109 | + 2018-01-24T14:29:53: | |
| 110 | + 2018-01-24T14:29:53: +=========================================+ | |
| 111 | + 2018-01-24T14:29:53: | Maximum likelihood optimisation results | | |
| 112 | + 2018-01-24T14:29:53: +=========================================+ | |
| 113 | + 2018-01-24T14:29:53: === GOptimizerLM === | |
| 114 | + 2018-01-24T14:29:53: Optimized function value ..: 56468.674 | |
| 115 | + 2018-01-24T14:29:53: Absolute precision ........: 0.005 | |
| 116 | + 2018-01-24T14:29:53: Acceptable value decrease .: 2 | |
| 117 | + 2018-01-24T14:29:53: Optimization status .......: converged | |
| 118 | + 2018-01-24T14:29:53: Number of parameters ......: 10 | |
| 119 | + 2018-01-24T14:29:53: Number of free parameters .: 4 | |
| 120 | + 2018-01-24T14:29:53: Number of iterations ......: 2 | |
| 121 | + 2018-01-24T14:29:53: Lambda ....................: 1e-05 | |
| 122 | + 2018-01-24T14:29:53: Maximum log likelihood ....: -56468.674 | |
| 123 | + 2018-01-24T14:29:53: Observed events (Nobs) ...: 18799.000 | |
| 124 | + 2018-01-24T14:29:53: Predicted events (Npred) ..: 18798.998 (Nobs - Npred = 0.00197278879204532) | |
| 125 | + 2018-01-24T14:29:53: === GModels === | |
| 126 | + 2018-01-24T14:29:53: Number of models ..........: 2 | |
| 127 | + 2018-01-24T14:29:53: Number of parameters ......: 10 | |
| 128 | + 2018-01-24T14:29:53: === GModelSky === | |
| 129 | + 2018-01-24T14:29:53: Name ......................: Crab | |
| 130 | + 2018-01-24T14:29:53: Instruments ...............: all | |
| 131 | + 2018-01-24T14:29:53: Instrument scale factors ..: unity | |
| 132 | + 2018-01-24T14:29:53: Observation identifiers ...: all | |
| 133 | + 2018-01-24T14:29:53: Model type ................: PointSource | |
| 134 | + 2018-01-24T14:29:53: Model components ..........: "PointSource" * "PowerLaw" * "Constant" | |
| 135 | + 2018-01-24T14:29:53: Number of parameters ......: 6 | |
| 136 | + 2018-01-24T14:29:53: Number of spatial par's ...: 2 | |
| 137 | + 2018-01-24T14:29:53: RA .......................: 83.6331 [-360,360] deg (fixed,scale=1) | |
| 138 | + 2018-01-24T14:29:53: DEC ......................: 22.0145 [-90,90] deg (fixed,scale=1) | |
| 139 | + 2018-01-24T14:29:53: Number of spectral par's ..: 3 | |
| 140 | + 2018-01-24T14:29:53: Prefactor ................: 5.76059824355157e-16 +/- 1.00804418203193e-17 [1e-23,1e-13] ph/cm2/s/MeV (free,scale=1e-16,gradient) | |
| 141 | + 2018-01-24T14:29:53: Index ....................: -2.48246178370535 +/- 0.0150306767905499 [-0,-5] (free,scale=-1,gradient) | |
| 142 | + 2018-01-24T14:29:53: PivotEnergy ..............: 300000 [10000,1000000000] MeV (fixed,scale=1000000,gradient) | |
| 143 | + 2018-01-24T14:29:53: Number of temporal par's ..: 1 | |
| 144 | + 2018-01-24T14:29:53: Normalization ............: 1 (relative value) (fixed,scale=1,gradient) | |
| 145 | + 2018-01-24T14:29:53: === GCTAModelCubeBackground === | |
| 146 | + 2018-01-24T14:29:53: Name ......................: BackgroundModel | |
| 147 | + 2018-01-24T14:29:53: Instruments ...............: CTA, HESS, MAGIC, VERITAS | |
| 148 | + 2018-01-24T14:29:53: Instrument scale factors ..: unity | |
| 149 | + 2018-01-24T14:29:53: Observation identifiers ...: all | |
| 150 | + 2018-01-24T14:29:53: Model type ................: "PowerLaw" * "Constant" | |
| 151 | + 2018-01-24T14:29:53: Number of parameters ......: 4 | |
| 152 | + 2018-01-24T14:29:53: Number of spectral par's ..: 3 | |
| 153 | + 2018-01-24T14:29:53: Prefactor ................: 1.00863986588954 +/- 0.0159030370642366 [0.01,100] ph/cm2/s/MeV (free,scale=1,gradient) | |
| 154 | + 2018-01-24T14:29:53: Index ....................: 0.0113292722406164 +/- 0.00951929088334377 [-5,5] (free,scale=1,gradient) | |
| 155 | + 2018-01-24T14:29:53: PivotEnergy ..............: 1000000 MeV (fixed,scale=1000000,gradient) | |
| 156 | + 2018-01-24T14:29:53: Number of temporal par's ..: 1 | |
| 157 | + 2018-01-24T14:29:53: Normalization ............: 1 (relative value) (fixed,scale=1,gradient) | |
| 158 | + | |
| 159 | +The maximum likelihood optimizer required 2 iterations to converge. This | |
| 162 | 160 | is pretty fast, but recall that you used the same model file for the simulation |
| 163 | 161 | and for fitting, hence the initial parameter values were already very close |
| 164 | 162 | to the best fitting values. To see the impact of the initial parameters on |
| ... | ... | @@ -202,13 +200,13 @@ are not too far from the best fitting values). |
| 202 | 200 | |
| 203 | 201 | .. code-block:: none |
| 204 | 202 | |
| 205 | - 2017-11-28T15:47:53: Name ......................: Crab | |
| 206 | - 2017-11-28T15:47:53: Instruments ...............: all | |
| 207 | - 2017-11-28T15:47:53: Test Statistic ............: 19478.9230755261 | |
| 203 | + 2018-01-24T14:32:49: Name ......................: Crab | |
| 204 | + 2018-01-24T14:32:49: Instruments ...............: all | |
| 205 | + 2018-01-24T14:32:49: Test Statistic ............: 21626.0036468824 | |
| 208 | 206 | |
| 209 | 207 | The Test Statistic value will also be added as new attribute |
| 210 | 208 | ``ts`` to the XML result file: |
| 211 | 209 | |
| 212 | 210 | .. code-block:: xml |
| 213 | 211 | |
| 214 | - <source name="Crab" type="PointSource" ts="19478.923" tscalc="1"> | |
| 212 | + <source name="Crab" type="PointSource" ts="21626.004" tscalc="1"> | ... | ... |
doc/source/users/tutorials/quickstart/onoff.jpg
0 → 100644
234 KB
doc/source/users/tutorials/quickstart/onoff.png deleted
38.8 KB
doc/source/users/tutorials/quickstart/onoff.rst
| ... | ... | @@ -18,7 +18,7 @@ Doing an On/Off analysis |
| 18 | 18 | sure that the spatial component of the model you want to analyse is of |
| 19 | 19 | type ``PointSource``. |
| 20 | 20 | |
| 21 | -Last, we consider the classical technique for IACT spectral analysis, | |
| 21 | +Finally, we consider the classical technique for IACT spectral analysis, | |
| 22 | 22 | in which 1D spectra for On and Off regions are used jointly to |
| 23 | 23 | determine the source parameters. |
| 24 | 24 | |
| ... | ... | @@ -49,16 +49,17 @@ To derive On/Off observations from the ``events_edisp.fits`` event list, type: |
| 49 | 49 | Input event list or observation definition XML file [obs.xml] events_edisp.fits |
| 50 | 50 | Calibration database [prod2] |
| 51 | 51 | Instrument response function [South_0.5h] |
| 52 | - Binning algorithm (LIN|LOG|FILE) [LOG] | |
| 53 | - Lower energy limit (TeV) [0.1] | |
| 54 | - Upper energy limit (TeV) [100.0] | |
| 52 | + Algorithm for defining energy bins (FILE|LIN|LOG) [LOG] | |
| 53 | + Start value for first energy bin in TeV [0.1] | |
| 54 | + Stop value for last energy bin in TeV [100.0] | |
| 55 | 55 | Number of energy bins [120] 30 |
| 56 | + Stack multiple observations into single PHA, ARF and RMF files? [no] | |
| 57 | + Output observation definition XML file [onoff_obs.xml] | |
| 58 | + Method for background estimation (REFLECTED|CUSTOM) [REFLECTED] | |
| 56 | 59 | Coordinate system (CEL - celestial, GAL - galactic) (CEL|GAL) [CEL] |
| 57 | 60 | Right Ascension of source region centre (deg) (0-360) [83.63] |
| 58 | 61 | Declination of source region centre (deg) (-90-90) [22.01] |
| 59 | 62 | Radius of source region circle (deg) (0-180) [0.2] |
| 60 | - Stack multiple observations into single PHA, ARF and RMF files? [no] | |
| 61 | - Output observation definition XML file [onoff_obs.xml] | |
| 62 | 63 | |
| 63 | 64 | .. note:: |
| 64 | 65 | We have used the events simulated accounting for energy dispersion, since |
| ... | ... | @@ -80,7 +81,7 @@ The :ref:`csphagen` script has produced several files. The |
| 80 | 81 | :ref:`output observation definition XML file <glossary_obsdef>` |
| 81 | 82 | ``onoff_obs.xml`` contains a single On/Off observation: |
| 82 | 83 | |
| 83 | -.. code-block:: bash | |
| 84 | +.. code-block:: xml | |
| 84 | 85 | |
| 85 | 86 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
| 86 | 87 | <observation_list title="observation list"> |
| ... | ... | @@ -188,63 +189,63 @@ parameters are still the same within statistical uncertainties as the ones |
| 188 | 189 | found in binned/unbinned mode. This may not always be the case, especially if |
| 189 | 190 | the background is not well known a priori. |
| 190 | 191 | |
| 191 | -.. code-block:: bash | |
| 192 | - | |
| 193 | - 2017-11-28T17:26:56: +=================================+ | |
| 194 | - 2017-11-28T17:26:56: | Maximum likelihood optimisation | | |
| 195 | - 2017-11-28T17:26:56: +=================================+ | |
| 196 | - 2017-11-28T17:26:56: >Iteration 0: -logL=-48350.908, Lambda=1.0e-03 | |
| 197 | - 2017-11-28T17:26:56: >Iteration 1: -logL=-48352.759, Lambda=1.0e-03, delta=1.852, step=1.0e+00, max(|grad|)=2.829489 [Index:7] | |
| 198 | - 2017-11-28T17:26:56: >Iteration 2: -logL=-48352.760, Lambda=1.0e-04, delta=0.000, step=1.0e+00, max(|grad|)=0.002408 [Index:3] | |
| 199 | - 2017-11-28T17:26:56: | |
| 200 | - 2017-11-28T17:26:56: +=========================================+ | |
| 201 | - 2017-11-28T17:26:56: | Maximum likelihood optimisation results | | |
| 202 | - 2017-11-28T17:26:56: +=========================================+ | |
| 203 | - 2017-11-28T17:26:56: === GOptimizerLM === | |
| 204 | - 2017-11-28T17:26:56: Optimized function value ..: -48352.760 | |
| 205 | - 2017-11-28T17:26:56: Absolute precision ........: 0.005 | |
| 206 | - 2017-11-28T17:26:56: Acceptable value decrease .: 2 | |
| 207 | - 2017-11-28T17:26:56: Optimization status .......: converged | |
| 208 | - 2017-11-28T17:26:56: Number of parameters ......: 10 | |
| 209 | - 2017-11-28T17:26:56: Number of free parameters .: 4 | |
| 210 | - 2017-11-28T17:26:56: Number of iterations ......: 2 | |
| 211 | - 2017-11-28T17:26:56: Lambda ....................: 1e-05 | |
| 212 | - 2017-11-28T17:26:56: Maximum log likelihood ....: 48352.760 | |
| 213 | - 2017-11-28T17:26:56: Observed events (Nobs) ...: 6656.000 | |
| 214 | - 2017-11-28T17:26:56: Predicted events (Npred) ..: 6655.663 (Nobs - Npred = 0.337440257160779) | |
| 215 | - 2017-11-28T17:26:56: === GModels === | |
| 216 | - 2017-11-28T17:26:56: Number of models ..........: 2 | |
| 217 | - 2017-11-28T17:26:56: Number of parameters ......: 10 | |
| 218 | - 2017-11-28T17:26:56: === GModelSky === | |
| 219 | - 2017-11-28T17:26:56: Name ......................: Crab | |
| 220 | - 2017-11-28T17:26:56: Instruments ...............: all | |
| 221 | - 2017-11-28T17:26:56: Instrument scale factors ..: unity | |
| 222 | - 2017-11-28T17:26:56: Observation identifiers ...: all | |
| 223 | - 2017-11-28T17:26:56: Model type ................: PointSource | |
| 224 | - 2017-11-28T17:26:56: Model components ..........: "PointSource" * "PowerLaw" * "Constant" | |
| 225 | - 2017-11-28T17:26:56: Number of parameters ......: 6 | |
| 226 | - 2017-11-28T17:26:56: Number of spatial par's ...: 2 | |
| 227 | - 2017-11-28T17:26:56: RA .......................: 83.6331 [-360,360] deg (fixed,scale=1) | |
| 228 | - 2017-11-28T17:26:56: DEC ......................: 22.0145 [-90,90] deg (fixed,scale=1) | |
| 229 | - 2017-11-28T17:26:56: Number of spectral par's ..: 3 | |
| 230 | - 2017-11-28T17:26:56: Prefactor ................: 5.69533666063277e-16 +/- 7.77619410705106e-18 [1e-23,1e-13] ph/cm2/s/MeV (free,scale=1e-16,gradient) | |
| 231 | - 2017-11-28T17:26:56: Index ....................: -2.47347083803876 +/- 0.0114544870463654 [-0,-5] (free,scale=-1,gradient) | |
| 232 | - 2017-11-28T17:26:56: PivotEnergy ..............: 300000 [10000,1000000000] MeV (fixed,scale=1000000,gradient) | |
| 233 | - 2017-11-28T17:26:56: Number of temporal par's ..: 1 | |
| 234 | - 2017-11-28T17:26:56: Normalization ............: 1 (relative value) (fixed,scale=1,gradient) | |
| 235 | - 2017-11-28T17:26:56: === GCTAModelIrfBackground === | |
| 236 | - 2017-11-28T17:26:56: Name ......................: CTABackgroundModel | |
| 237 | - 2017-11-28T17:26:56: Instruments ...............: CTAOnOff | |
| 238 | - 2017-11-28T17:26:56: Instrument scale factors ..: unity | |
| 239 | - 2017-11-28T17:26:56: Observation identifiers ...: all | |
| 240 | - 2017-11-28T17:26:56: Model type ................: "PowerLaw" * "Constant" | |
| 241 | - 2017-11-28T17:26:56: Number of parameters ......: 4 | |
| 242 | - 2017-11-28T17:26:56: Number of spectral par's ..: 3 | |
| 243 | - 2017-11-28T17:26:56: Prefactor ................: 1.00017594707712 +/- 0.0373732914079376 [0.001,1000] ph/cm2/s/MeV (free,scale=1,gradient) | |
| 244 | - 2017-11-28T17:26:56: Index ....................: 0.0190520959815092 +/- 0.0220805114253248 [-5,5] (free,scale=1,gradient) | |
| 245 | - 2017-11-28T17:26:56: PivotEnergy ..............: 1000000 [10000,1000000000] MeV (fixed,scale=1000000,gradient) | |
| 246 | - 2017-11-28T17:26:56: Number of temporal par's ..: 1 | |
| 247 | - 2017-11-28T17:26:56: Normalization ............: 1 (relative value) (fixed,scale=1,gradient) | |
| 192 | +.. code-block:: none | |
| 193 | + | |
| 194 | + 2018-01-24T15:03:20: +=================================+ | |
| 195 | + 2018-01-24T15:03:20: | Maximum likelihood optimisation | | |
| 196 | + 2018-01-24T15:03:20: +=================================+ | |
| 197 | + 2018-01-24T15:03:20: >Iteration 0: -logL=-44981.922, Lambda=1.0e-03 | |
| 198 | + 2018-01-24T15:03:20: >Iteration 1: -logL=-44983.914, Lambda=1.0e-03, delta=1.992, step=1.0e+00, max(|grad|)=2.056476 [Index:7] | |
| 199 | + 2018-01-24T15:03:20: >Iteration 2: -logL=-44983.915, Lambda=1.0e-04, delta=0.001, step=1.0e+00, max(|grad|)=0.001765 [Index:3] | |
| 200 | + 2018-01-24T15:03:20: | |
| 201 | + 2018-01-24T15:03:20: +=========================================+ | |
| 202 | + 2018-01-24T15:03:20: | Maximum likelihood optimisation results | | |
| 203 | + 2018-01-24T15:03:20: +=========================================+ | |
| 204 | + 2018-01-24T15:03:20: === GOptimizerLM === | |
| 205 | + 2018-01-24T15:03:20: Optimized function value ..: -44983.915 | |
| 206 | + 2018-01-24T15:03:20: Absolute precision ........: 0.005 | |
| 207 | + 2018-01-24T15:03:20: Acceptable value decrease .: 2 | |
| 208 | + 2018-01-24T15:03:20: Optimization status .......: converged | |
| 209 | + 2018-01-24T15:03:20: Number of parameters ......: 10 | |
| 210 | + 2018-01-24T15:03:20: Number of free parameters .: 4 | |
| 211 | + 2018-01-24T15:03:20: Number of iterations ......: 2 | |
| 212 | + 2018-01-24T15:03:20: Lambda ....................: 1e-05 | |
| 213 | + 2018-01-24T15:03:20: Maximum log likelihood ....: 44983.915 | |
| 214 | + 2018-01-24T15:03:20: Observed events (Nobs) ...: 7309.000 | |
| 215 | + 2018-01-24T15:03:20: Predicted events (Npred) ..: 7306.626 (Nobs - Npred = 2.37371839911157) | |
| 216 | + 2018-01-24T15:03:20: === GModels === | |
| 217 | + 2018-01-24T15:03:20: Number of models ..........: 2 | |
| 218 | + 2018-01-24T15:03:20: Number of parameters ......: 10 | |
| 219 | + 2018-01-24T15:03:20: === GModelSky === | |
| 220 | + 2018-01-24T15:03:20: Name ......................: Crab | |
| 221 | + 2018-01-24T15:03:20: Instruments ...............: all | |
| 222 | + 2018-01-24T15:03:20: Instrument scale factors ..: unity | |
| 223 | + 2018-01-24T15:03:20: Observation identifiers ...: all | |
| 224 | + 2018-01-24T15:03:20: Model type ................: PointSource | |
| 225 | + 2018-01-24T15:03:20: Model components ..........: "PointSource" * "PowerLaw" * "Constant" | |
| 226 | + 2018-01-24T15:03:20: Number of parameters ......: 6 | |
| 227 | + 2018-01-24T15:03:20: Number of spatial par's ...: 2 | |
| 228 | + 2018-01-24T15:03:20: RA .......................: 83.6331 [-360,360] deg (fixed,scale=1) | |
| 229 | + 2018-01-24T15:03:20: DEC ......................: 22.0145 [-90,90] deg (fixed,scale=1) | |
| 230 | + 2018-01-24T15:03:20: Number of spectral par's ..: 3 | |
| 231 | + 2018-01-24T15:03:20: Prefactor ................: 5.59354639816441e-16 +/- 7.3028712529757e-18 [1e-23,1e-13] ph/cm2/s/MeV (free,scale=1e-16,gradient) | |
| 232 | + 2018-01-24T15:03:20: Index ....................: -2.47773254234859 +/- 0.0110401748178683 [-0,-5] (free,scale=-1,gradient) | |
| 233 | + 2018-01-24T15:03:20: PivotEnergy ..............: 300000 [10000,1000000000] MeV (fixed,scale=1000000,gradient) | |
| 234 | + 2018-01-24T15:03:20: Number of temporal par's ..: 1 | |
| 235 | + 2018-01-24T15:03:20: Normalization ............: 1 (relative value) (fixed,scale=1,gradient) | |
| 236 | + 2018-01-24T15:03:20: === GCTAModelIrfBackground === | |
| 237 | + 2018-01-24T15:03:20: Name ......................: BackgroundModel | |
| 238 | + 2018-01-24T15:03:20: Instruments ...............: CTAOnOff | |
| 239 | + 2018-01-24T15:03:20: Instrument scale factors ..: unity | |
| 240 | + 2018-01-24T15:03:20: Observation identifiers ...: all | |
| 241 | + 2018-01-24T15:03:20: Model type ................: "PowerLaw" * "Constant" | |
| 242 | + 2018-01-24T15:03:20: Number of parameters ......: 4 | |
| 243 | + 2018-01-24T15:03:20: Number of spectral par's ..: 3 | |
| 244 | + 2018-01-24T15:03:20: Prefactor ................: 0.977042261939201 +/- 0.0498175569832557 [0.01,100] ph/cm2/s/MeV (free,scale=1,gradient) | |
| 245 | + 2018-01-24T15:03:20: Index ....................: 0.00289056644049351 +/- 0.0299910588265984 [-5,5] (free,scale=1,gradient) | |
| 246 | + 2018-01-24T15:03:20: PivotEnergy ..............: 1000000 MeV (fixed,scale=1000000,gradient) | |
| 247 | + 2018-01-24T15:03:20: Number of temporal par's ..: 1 | |
| 248 | + 2018-01-24T15:03:20: Normalization ............: 1 (relative value) (fixed,scale=1,gradient) | |
| 248 | 249 | |
| 249 | 250 | :ref:`ctlike` has a hidden parameter called ``statistic`` that sets the |
| 250 | 251 | statistic used for the fit. By default, :ref:`ctlike` will use ``CSTAT`` | ... | ... |
doc/source/users/tutorials/quickstart/residual_map.jpg
0 → 100644
209 KB
doc/source/users/tutorials/quickstart/residuals.rst renamed to doc/source/users/tutorials/quickstart/residual_map.rst
doc/source/users/tutorials/quickstart/residual_spectrum.png
0 → 100644
70.6 KB
doc/source/users/tutorials/quickstart/residual_spectrum.rst
0 → 100644
| 1 | +.. _sec_residual_spectrum: | |
| 2 | + | |
| 3 | +Generating a residual spectrum | |
| 4 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| 5 | + | |
| 6 | +In the previous tutorial you have used the :ref:`csresmap` script to | |
| 7 | +inspect the spatial residuals. You can also inspect the spectral | |
| 8 | +residuals using the :ref:`csresspec` script. | |
| 9 | + | |
| 10 | +The :ref:`csresspec` script can deal with any observation type (unbinned, | |
| 11 | +binned, stacked, On/Off). For the example case with unbinned | |
| 12 | +observations the script is then used as follows: | |
| 13 | + | |
| 14 | +.. code-block:: bash | |
| 15 | + | |
| 16 | + $ csresspec components=yes | |
| 17 | + Input event list, counts cube, or observation definition XML file [obs.xml] | |
| 18 | + Calibration database [prod2] | |
| 19 | + Instrument response function [South_0.5h] | |
| 20 | + Lower energy limit (TeV) [0.1] | |
| 21 | + Upper energy limit (TeV) [100.0] | |
| 22 | + Number of model cube energy bins [30] | |
| 23 | + Stack observations [yes] | |
| 24 | + Coordinate System (CEL|GAL) [CEL] | |
| 25 | + Projection method (AIT|AZP|CAR|GLS|MER|MOL|SFL|SIN|STG|TAN) [CAR] | |
| 26 | + First coordinate of image/source region center in degrees (RA or galactic l) (0-360) [83.63] | |
| 27 | + Second coordinate of image/source region center in degrees (DEC or galactic b) (-90-90) [22.01] | |
| 28 | + Size of the X axis in pixels [200] 51 | |
| 29 | + Size of the Y axis in pixels [200] 51 | |
| 30 | + Pixel size (deg/pixel) [0.02] | |
| 31 | + Input model definition XML file [crab_results.xml] | |
| 32 | + Mask data to calculate residuals in ROI [yes] no | |
| 33 | + Residuals computation algorithm (SUB|SUBDIV|SUBDIVSQRT|SIGNIFICANCE) [SIGNIFICANCE] | |
| 34 | + Output residual spectrum file [residual_spectrum.fits] | |
| 35 | + | |
| 36 | +In our example, the residuals will cover energies from 100 GeV to 100 | |
| 37 | +TeV, in 30 energy bins. Since we have decided to stack multiple | |
| 38 | +unbinned observations we have also entered parameters to perform a | |
| 39 | +spatial binning. Note that we have defined the spatial grid such that | |
| 40 | +we will obtain the residuals in a 1 degree square region around the | |
| 41 | +Crab. Optionally, a mask can be applied to either unbinned or binned | |
| 42 | +3D observations. We have used the hidden ``components`` parameter to | |
| 43 | +include the individual model components in the results file. | |
| 44 | + | |
| 45 | +The :ref:`csresspec` script created the FITS file ``residual_spectrum.fits`` that contains | |
| 46 | +the results of the residual computation. A graphical display of the fit results is | |
| 47 | +shown below. | |
| 48 | + | |
| 49 | +.. figure:: residual_spectrum.png | |
| 50 | + :width: 600px | |
| 51 | + :align: center | |
| 52 | + | |
| 53 | + *Data, model, and residuals from the spectral fit of the Crab nebula* | |
| 54 | + | |
| 55 | +.. note:: | |
| 56 | + The figure was created by typing: | |
| 57 | + | |
| 58 | + .. code-block:: bash | |
| 59 | + | |
| 60 | + $ $CTOOLS/share/examples/python/show_spectrum.py residual_spectrum.fits | |
| 61 | + | |
| 62 | + Use the option ``-h`` to select the table to display if there are | |
| 63 | + multiple observations. | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | ... | ... |
doc/source/users/tutorials/quickstart/residuals.jpg deleted
16.7 KB
doc/source/users/tutorials/quickstart/response.rst
| ... | ... | @@ -53,15 +53,16 @@ You run :ref:`ctpsfcube` as follows: |
| 53 | 53 | Instrument response function [South_0.5h] |
| 54 | 54 | Input counts cube file to extract PSF cube definition [NONE] |
| 55 | 55 | First coordinate of image center in degrees (RA or galactic l) (0-360) [83.63] |
| 56 | - Second coordinate of image center in degrees (DEC or galactic b) (-90-90) [22.01] | |
| 56 | + Second coordinate of image center in degrees (DEC or galactic b) (-90-90) [22.51] | |
| 57 | 57 | Projection method (AIT|AZP|CAR|GLS|MER|MOL|SFL|SIN|STG|TAN) [CAR] |
| 58 | 58 | Coordinate system (CEL - celestial, GAL - galactic) (CEL|GAL) [CEL] |
| 59 | 59 | Image scale (in degrees/pixel) [1.0] |
| 60 | 60 | Size of the X axis in pixels [10] |
| 61 | 61 | Size of the Y axis in pixels [10] |
| 62 | + Algorithm for defining energy bins (FILE|LIN|LOG) [LOG] | |
| 62 | 63 | Lower energy limit (TeV) [0.1] |
| 63 | 64 | Upper energy limit (TeV) [100.0] |
| 64 | - Number of energy bins [20] | |
| 65 | + Number of energy bins (1-200) [20] | |
| 65 | 66 | Output PSF cube file [psfcube.fits] |
| 66 | 67 | |
| 67 | 68 | This produces the FITS file ``psfcube.fits`` that contains the point spread | ... | ... |
doc/source/users/tutorials/quickstart/selecting.rst
| ... | ... | @@ -20,7 +20,7 @@ You do this event selection using the :ref:`ctselect` tool as follows: |
| 20 | 20 | $ ctselect |
| 21 | 21 | Input event list or observation definition XML file [events.fits] |
| 22 | 22 | RA for ROI centre (degrees) (0-360) [83.63] |
| 23 | - Dec for ROI centre (degrees) (-90-90) [22.01] | |
| 23 | + Dec for ROI centre (degrees) (-90-90) [22.51] | |
| 24 | 24 | Radius of ROI (degrees) (0-180) [3.0] |
| 25 | 25 | Start time (UTC string, JD, MJD or MET in seconds) [NONE] 2020-01-01T00:10:00 |
| 26 | 26 | Stop time (UTC string, JD, MJD or MET in seconds) [NONE] 2020-01-01T00:40:00 |
| ... | ... | @@ -35,44 +35,43 @@ event selection: |
| 35 | 35 | |
| 36 | 36 | .. code-block:: none |
| 37 | 37 | |
| 38 | - 2017-11-28T14:21:57: +===================+ | |
| 39 | - 2017-11-28T14:21:57: | Input observation | | |
| 40 | - 2017-11-28T14:21:57: +===================+ | |
| 41 | - 2017-11-28T14:21:57: === GObservations === | |
| 42 | - 2017-11-28T14:21:57: Number of observations ....: 1 | |
| 43 | - 2017-11-28T14:21:57: Number of models ..........: 0 | |
| 44 | - 2017-11-28T14:21:57: Number of observed events .: 200833 | |
| 45 | - 2017-11-28T14:21:57: Number of predicted events : 0 | |
| 46 | - 2017-11-28T14:21:57: | |
| 47 | - 2017-11-28T14:21:57: +=================+ | |
| 48 | - 2017-11-28T14:21:57: | Event selection | | |
| 49 | - 2017-11-28T14:21:57: +=================+ | |
| 50 | - 2017-11-28T14:21:57: === CTA observation === | |
| 51 | - 2017-11-28T14:21:57: Input filename ............: events.fits | |
| 52 | - 2017-11-28T14:21:57: Event extension name ......: EVENTS | |
| 53 | - 2017-11-28T14:21:57: GTI extension name ........: GTI | |
| 54 | - 2017-11-28T14:21:58: === Event selection === | |
| 55 | - 2017-11-28T14:21:58: Time range (MJD) ..........: 58849.0077451852 - 58849.0285785185 days | |
| 56 | - 2017-11-28T14:21:58: Time range (UTC) ..........: 2020-01-01T00:10:00 - 2020-01-01T00:40:00 | |
| 57 | - 2017-11-28T14:21:58: Time range (MET) ..........: 631109469.184 - 631111269.184 seconds | |
| 58 | - 2017-11-28T14:21:58: Selected energy range .....: 0.1 - 100 TeV | |
| 59 | - 2017-11-28T14:21:58: Requested RoI .............: Centre(RA,DEC)=(83.63, 22.01) deg, Radius=3 deg | |
| 60 | - 2017-11-28T14:21:58: RoI of data ...............: Centre(RA,DEC)=(83.5, 22.8) deg, Radius=5 deg | |
| 61 | - 2017-11-28T14:21:58: Selected RoI ..............: Centre(RA,DEC)=(83.63, 22.01) deg, Radius=3 deg | |
| 62 | - 2017-11-28T14:21:58: cfitsio selection .........: TIME >= 631109469.18399978 && TIME <= 631111269.18400002 && ENERGY >= 0.10000000 && ENERGY <= 100.00000000 && ANGSEP(83.630000,22.010000,RA,DEC) <= 3.000000 | |
| 63 | - 2017-11-28T14:21:58: FITS filename .............: /var/tmp/tmp.0.Nc6oWk[EVENTS][TIME >= 631109469.18399978 && TIME <= 631111269.18400002 && ENERGY >= 0.10000000 && ENERGY <= 100.00000000 && ANGSEP(83.630000,22.010000,RA,DEC) <= 3.000000] | |
| 64 | - 2017-11-28T14:21:58: | |
| 65 | - 2017-11-28T14:21:58: +====================+ | |
| 66 | - 2017-11-28T14:21:58: | Output observation | | |
| 67 | - 2017-11-28T14:21:58: +====================+ | |
| 68 | - 2017-11-28T14:21:58: === GObservations === | |
| 69 | - 2017-11-28T14:21:58: Number of observations ....: 1 | |
| 70 | - 2017-11-28T14:21:58: Number of models ..........: 0 | |
| 71 | - 2017-11-28T14:21:58: Number of observed events .: 20877 | |
| 72 | - 2017-11-28T14:21:58: Number of predicted events : 0 | |
| 38 | + 2018-01-24T14:07:07: +===================+ | |
| 39 | + 2018-01-24T14:07:07: | Input observation | | |
| 40 | + 2018-01-24T14:07:07: +===================+ | |
| 41 | + 2018-01-24T14:07:07: === GObservations === | |
| 42 | + 2018-01-24T14:07:07: Number of observations ....: 1 | |
| 43 | + 2018-01-24T14:07:07: Number of models ..........: 0 | |
| 44 | + 2018-01-24T14:07:07: Number of observed events .: 202210 | |
| 45 | + 2018-01-24T14:07:07: Number of predicted events : 0 | |
| 46 | + 2018-01-24T14:07:07: | |
| 47 | + 2018-01-24T14:07:07: +=================+ | |
| 48 | + 2018-01-24T14:07:07: | Event selection | | |
| 49 | + 2018-01-24T14:07:07: +=================+ | |
| 50 | + 2018-01-24T14:07:07: === CTA observation (id=000001) === | |
| 51 | + 2018-01-24T14:07:07: Input filename ............: events.fits | |
| 52 | + 2018-01-24T14:07:07: Event extension name ......: EVENTS | |
| 53 | + 2018-01-24T14:07:07: GTI extension name ........: GTI | |
| 54 | + 2018-01-24T14:07:07: === Event selection === | |
| 55 | + 2018-01-24T14:07:07: Time range (MJD) ..........: 58849.0077451852 - 58849.0285785185 days | |
| 56 | + 2018-01-24T14:07:07: Time range (UTC) ..........: 2020-01-01T00:10:00 - 2020-01-01T00:40:00 | |
| 57 | + 2018-01-24T14:07:07: Time range (MET) ..........: 631109469.184 - 631111269.184 seconds | |
| 58 | + 2018-01-24T14:07:07: Selected energy range .....: 0.1 - 100 TeV | |
| 59 | + 2018-01-24T14:07:07: Requested RoI .............: Centre(RA,DEC)=(83.63, 22.51) deg, Radius=3 deg | |
| 60 | + 2018-01-24T14:07:07: RoI of data ...............: Centre(RA,DEC)=(83.63, 22.51) deg, Radius=5 deg | |
| 61 | + 2018-01-24T14:07:07: Selected RoI ..............: Centre(RA,DEC)=(83.63, 22.51) deg, Radius=3 deg | |
| 62 | + 2018-01-24T14:07:07: cfitsio selection .........: TIME >= 631109469.18399978 && TIME <= 631111269.18400002 && ENERGY >= 0.10000000 && ENERGY <= 100.00000000 && ANGSEP(83.630000,22.510000,RA,DEC) <= 3.000000 | |
| 63 | + 2018-01-24T14:07:07: FITS filename .............: /var/tmp/tmp.0.aFKvXb[EVENTS][TIME >= 631109469.18399978 && TIME <= 631111269.18400002 && ENERGY >= 0.10000000 && ENERGY <= 100.00000000 && ANGSEP(83.630000,22.510000,RA,DEC) <= 3.000000] | |
| 64 | + 2018-01-24T14:07:07: | |
| 65 | + 2018-01-24T14:07:07: +====================+ | |
| 66 | + 2018-01-24T14:07:07: | Output observation | | |
| 67 | + 2018-01-24T14:07:07: +====================+ | |
| 68 | + 2018-01-24T14:07:07: === GObservations === | |
| 69 | + 2018-01-24T14:07:07: Number of observations ....: 1 | |
| 70 | + 2018-01-24T14:07:07: Number of models ..........: 0 | |
| 71 | + 2018-01-24T14:07:07: Number of observed events .: 21974 | |
| 72 | + 2018-01-24T14:07:07: Number of predicted events : 0 | |
| 73 | 73 | |
| 74 | - | |
| 75 | -From the 200833 events in the input event list 20877 events were selected. | |
| 74 | +From the 202210 events in the input event list 21974 events were selected. | |
| 76 | 75 | |
| 77 | 76 | .. note:: |
| 78 | 77 | Event selection by :ref:`ctselect` in a given dimension can be avoided | ... | ... |
doc/source/users/tutorials/quickstart/simulating.rst
| ... | ... | @@ -25,13 +25,13 @@ characteristics of the simulation: |
| 25 | 25 | .. code-block:: bash |
| 26 | 26 | |
| 27 | 27 | $ ctobssim |
| 28 | - RA of pointing (degrees) (0-360) [83.63] 83.5 | |
| 29 | - Dec of pointing (degrees) (-90-90) [22.01] 22.8 | |
| 28 | + RA of pointing (degrees) (0-360) [83.63] | |
| 29 | + Dec of pointing (degrees) (-90-90) [22.51] | |
| 30 | 30 | Radius of FOV (degrees) (0-180) [5.0] |
| 31 | 31 | Start time (UTC string, JD, MJD or MET in seconds) [2020-01-01T00:00:00] |
| 32 | - Stop time (UTC string, JD, MJD or MET in seconds) [2020-01-01T01:00:00] 2020-01-01T01:00:00 | |
| 33 | - Lower energy limit (TeV) [0.03] | |
| 34 | - Upper energy limit (TeV) [200.] | |
| 32 | + Stop time (UTC string, JD, MJD or MET in seconds) [2020-01-01T00:30:00] 2020-01-01T01:00:00 | |
| 33 | + Lower energy limit (TeV) [0.1] 0.03 | |
| 34 | + Upper energy limit (TeV) [100.0] 150.0 | |
| 35 | 35 | Calibration database [prod2] |
| 36 | 36 | Instrument response function [South_0.5h] |
| 37 | 37 | Input model definition XML file [$CTOOLS/share/models/crab.xml] |
| ... | ... | @@ -46,8 +46,10 @@ Otherwise, the specified value will overwrite the default value. |
| 46 | 46 | The round brackets ``( )`` indicate the range of possible parameter |
| 47 | 47 | values (if applicable). |
| 48 | 48 | |
| 49 | -.. note:: | |
| 49 | +In the example above the stop time and the energy range were specified, for the | |
| 50 | +remaining parameters the default value was used. | |
| 50 | 51 | |
| 52 | +.. note:: | |
| 51 | 53 | Times can be entered in various formats in ctools. Times can be provided |
| 52 | 54 | as |
| 53 | 55 | |
| ... | ... | @@ -71,7 +73,6 @@ is taken from the ``prod2`` database. The response for the southern array |
| 71 | 73 | using the cuts optimised for 0.5 hours of observing time is used. |
| 72 | 74 | |
| 73 | 75 | .. note:: |
| 74 | - | |
| 75 | 76 | ctools comes bundled with CTA |
| 76 | 77 | :ref:`instrument response functions <glossary_irf>` for the northern and |
| 77 | 78 | the southern array. The IRFs are based on a ``prod2`` |
| ... | ... | @@ -153,8 +154,6 @@ where the parameters in the XML definition have the following mappings: |
| 153 | 154 | * :math:`\gamma` = ``Index`` |
| 154 | 155 | * :math:`E_0` = ``PivotEnergy`` |
| 155 | 156 | |
| 156 | - | |
| 157 | - | |
| 158 | 157 | .. warning:: |
| 159 | 158 | **Energies are given in the XML file in MeV units.** This is a GammaLib |
| 160 | 159 | convention that can not be modified. So make sure you always use |
| ... | ... | @@ -164,7 +163,7 @@ where the parameters in the XML definition have the following mappings: |
| 164 | 163 | As customary for IACT observations, the pointing direction |
| 165 | 164 | was slightly offset from the source of interest, i.e., |
| 166 | 165 | the Crab. This makes it possible to better handle systematics due |
| 167 | - to the instrumental background. | |
| 166 | + to the limited knowledge of the instrumental background. | |
| 168 | 167 | |
| 169 | 168 | The instrumental background of CTA is modelled using the background |
| 170 | 169 | information provided in the |
| ... | ... | @@ -208,33 +207,33 @@ from this file are shown here: |
| 208 | 207 | |
| 209 | 208 | .. code-block:: none |
| 210 | 209 | |
| 211 | - 2017-11-28T14:13:40: === CTA observation === | |
| 212 | - 2017-11-28T14:13:40: Simulation cone ...........: RA=83.5 deg, Dec=22.8 deg, radius=5.5 deg | |
| 213 | - 2017-11-28T14:13:40: Time interval .............: 6.31109e+08 - 6.31112e+08 s | |
| 214 | - 2017-11-28T14:13:40: Photon energy range .......: 30 GeV - 72.3622611060088 GeV | |
| 215 | - 2017-11-28T14:13:40: Event energy range ........: 30 GeV - 72.3622611060088 GeV | |
| 216 | - 2017-11-28T14:13:40: Simulation area ..........: 1.97769e+09 cm2 | |
| 217 | - 2017-11-28T14:13:40: Use model ................: Crab | |
| 218 | - 2017-11-28T14:13:40: Normalization ............: 1 [Crab] | |
| 219 | - 2017-11-28T14:13:40: Flux .....................: 2.5413e-09 [Crab] photons/cm2/s | |
| 220 | - 2017-11-28T14:13:40: Normalized flux ..........: 2.5413e-09 [Crab] photons/cm2/s | |
| 221 | - 2017-11-28T14:13:40: Photon rate ..............: 5.0259 photons/s [Crab] | |
| 222 | - 2017-11-28T14:13:40: MC source photons ........: 18186 [Crab] | |
| 223 | - 2017-11-28T14:13:40: MC source events .........: 3544 [Crab] | |
| 224 | - 2017-11-28T14:13:40: MC source events .........: 3544 (all source models) | |
| 225 | - 2017-11-28T14:13:40: Photon energy range .......: 72.3622611060088 GeV - 174.543227745807 GeV | |
| 210 | + 2018-01-24T14:01:30: === CTA observation === | |
| 211 | + 2018-01-24T14:01:30: Simulation cone ...........: RA=83.63 deg, Dec=22.51 deg, radius=5.5 deg | |
| 212 | + 2018-01-24T14:01:30: Time interval .............: 6.31109e+08 - 6.31112e+08 s | |
| 213 | + 2018-01-24T14:01:30: Photon energy range .......: 30 GeV - 70.310187347763 GeV | |
| 214 | + 2018-01-24T14:01:30: Event energy range ........: 30 GeV - 70.310187347763 GeV | |
| 215 | + 2018-01-24T14:01:30: Simulation area ..........: 1.90195e+09 cm2 | |
| 216 | + 2018-01-24T14:01:30: Use model ................: Crab | |
| 217 | + 2018-01-24T14:01:30: Normalization ............: 1 [Crab] | |
| 218 | + 2018-01-24T14:01:30: Flux .....................: 2.50006e-09 [Crab] photons/cm2/s | |
| 219 | + 2018-01-24T14:01:30: Normalized flux ..........: 2.50006e-09 [Crab] photons/cm2/s | |
| 220 | + 2018-01-24T14:01:30: Photon rate ..............: 4.75499 photons/s [Crab] | |
| 221 | + 2018-01-24T14:01:30: MC source photons ........: 17169 [Crab] | |
| 222 | + 2018-01-24T14:01:30: MC source events .........: 3870 [Crab] | |
| 223 | + 2018-01-24T14:01:30: MC source events .........: 3870 (all source models) | |
| 224 | + 2018-01-24T14:01:30: Photon energy range .......: 70.310187347763 GeV - 164.784081495918 GeV | |
| 226 | 225 | ... |
| 227 | - 2017-11-28T14:13:40: MC source photons .........: 47219 [Crab] | |
| 228 | - 2017-11-28T14:13:40: MC source events ..........: 11356 [Crab] | |
| 229 | - 2017-11-28T14:13:49: MC events outside ROI .....: 0 | |
| 230 | - 2017-11-28T14:13:49: MC background events ......: 189477 | |
| 231 | - 2017-11-28T14:13:49: MC identifier 1 ...........: Crab | |
| 232 | - 2017-11-28T14:13:49: MC identifier 2 ...........: CTABackgroundModel | |
| 233 | - 2017-11-28T14:13:49: MC events .................: 200833 (all models) | |
| 226 | + 2018-01-24T14:01:30: MC source photons .........: 46368 [Crab] | |
| 227 | + 2018-01-24T14:01:30: MC source events ..........: 12749 [Crab] | |
| 228 | + 2018-01-24T14:01:38: MC events outside ROI .....: 0 | |
| 229 | + 2018-01-24T14:01:38: MC background events ......: 189461 | |
| 230 | + 2018-01-24T14:01:38: MC identifier 1 ...........: Crab | |
| 231 | + 2018-01-24T14:01:38: MC identifier 2 ...........: CTABackgroundModel | |
| 232 | + 2018-01-24T14:01:38: MC events .................: 202210 (all models) | |
| 234 | 233 | |
| 235 | 234 | Each line starts with the UTC time at which the line has been written. In |
| 236 | -this run, 47219 Crab photons have been thrown. 11356 of these photons have been | |
| 237 | -registered by CTA as events. In the same time interval, 189477 background | |
| 235 | +this run, 46368 Crab photons have been thrown. 12749 of these photons have been | |
| 236 | +registered by CTA as events. In the same time interval, 189461 background | |
| 238 | 237 | events have been registred by CTA. |
| 239 | 238 | |
| 240 | 239 | .. note:: |
| ... | ... | @@ -252,7 +251,7 @@ You may change the name of the log file using the hidden parameter |
| 252 | 251 | |
| 253 | 252 | .. code-block:: bash |
| 254 | 253 | |
| 255 | - $ ctobssim logfile=my-private-log-file | |
| 254 | + $ ctobssim logfile=my-private-log-file | |
| 256 | 255 | |
| 257 | 256 | Furthermore, you may decide on the amount of information provided in the |
| 258 | 257 | log file (the chattiness of the executable) using the hidden parameter |
| ... | ... | @@ -260,7 +259,7 @@ log file (the chattiness of the executable) using the hidden parameter |
| 260 | 259 | |
| 261 | 260 | .. code-block:: bash |
| 262 | 261 | |
| 263 | - $ ctobssim chatter=4 | |
| 262 | + $ ctobssim chatter=4 | |
| 264 | 263 | |
| 265 | 264 | ``chatter`` can vary between 0 and 4, 0 providing no information while 4 |
| 266 | 265 | provides the most detailed information. |
| ... | ... | @@ -272,7 +271,7 @@ the hidden ``debug`` parameter to yes: |
| 272 | 271 | |
| 273 | 272 | .. code-block:: bash |
| 274 | 273 | |
| 275 | - $ ctobssim debug=yes | |
| 274 | + $ ctobssim debug=yes | |
| 276 | 275 | |
| 277 | 276 | .. note:: |
| 278 | 277 | All tools have the hidden parameters ``logfile``, ``chatter``, and | ... | ... |
doc/source/users/tutorials/quickstart/skymap.jpg
doc/source/users/tutorials/quickstart/skymap.rst
| ... | ... | @@ -57,20 +57,20 @@ example: |
| 57 | 57 | .. code-block:: bash |
| 58 | 58 | |
| 59 | 59 | $ ctskymap |
| 60 | - Input event list or observation definition XML file [events.fits] selected_events.fits | |
| 61 | - First coordinate of image center in degrees (RA or galactic l) (0-360) [83.63] | |
| 62 | - Second coordinate of image center in degrees (DEC or galactic b) (-90-90) [22.01] | |
| 63 | - Projection method (AIT|AZP|CAR|GLS|MER|MOL|SFL|SIN|STG|TAN) [CAR] | |
| 64 | - Coordinate system (CEL - celestial, GAL - galactic) (CEL|GAL) [CEL] | |
| 65 | - Image scale (in degrees/pixel) [0.02] | |
| 66 | - Size of the X axis in pixels [200] | |
| 67 | - Size of the Y axis in pixels [200] | |
| 68 | - Lower energy limit (TeV) [0.1] | |
| 69 | - Upper energy limit (TeV) [100.0] | |
| 70 | - Background subtraction method (NONE|IRF|RING) [NONE] IRF | |
| 71 | - Calibration database [prod2] | |
| 72 | - Instrument response function [South_0.5h] | |
| 73 | - Output skymap file [skymap.fits] skymap_subtracted.fits | |
| 60 | + Input event list or observation definition XML file [selected_events.fits] | |
| 61 | + First coordinate of image center in degrees (RA or galactic l) (0-360) [83.63] | |
| 62 | + Second coordinate of image center in degrees (DEC or galactic b) (-90-90) [22.01] | |
| 63 | + Projection method (AIT|AZP|CAR|GLS|MER|MOL|SFL|SIN|STG|TAN) [CAR] | |
| 64 | + Coordinate system (CEL - celestial, GAL - galactic) (CEL|GAL) [CEL] | |
| 65 | + Image scale (in degrees/pixel) [0.02] | |
| 66 | + Size of the X axis in pixels [200] | |
| 67 | + Size of the Y axis in pixels [200] | |
| 68 | + Lower energy limit (TeV) [0.1] | |
| 69 | + Upper energy limit (TeV) [100.0] | |
| 70 | + Background subtraction method (NONE|IRF|RING) [NONE] IRF | |
| 71 | + Calibration database [prod2] | |
| 72 | + Instrument response function [South_0.5h] | |
| 73 | + Output skymap file [skymap.fits] skymap_subtracted.fits | |
| 74 | 74 | |
| 75 | 75 | The resulting sky map, displayed using |
| 76 | 76 | `ds9 <http://ds9.si.edu>`_ in logarithmic color scale with a small Gaussian |
| ... | ... | @@ -96,24 +96,24 @@ region file, or FITS map) through the hidden ``inexclusion`` parameter. |
| 96 | 96 | |
| 97 | 97 | .. code-block:: bash |
| 98 | 98 | |
| 99 | - $ ctskymap inexclusion=exclusion.reg | |
| 100 | - Input event list or observation definition XML file [events.fits] selected_events.fits | |
| 101 | - First coordinate of image center in degrees (RA or galactic l) (0-360) [83.63] | |
| 102 | - Second coordinate of image center in degrees (DEC or galactic b) (-90-90) [22.01] | |
| 103 | - Projection method (AIT|AZP|CAR|GLS|MER|MOL|SFL|SIN|STG|TAN) [CAR] | |
| 104 | - Coordinate system (CEL - celestial, GAL - galactic) (CEL|GAL) [CEL] | |
| 105 | - Image scale (in degrees/pixel) [0.02] | |
| 106 | - Size of the X axis in pixels [200] | |
| 107 | - Size of the Y axis in pixels [200] | |
| 108 | - Lower energy limit (TeV) [0.1] | |
| 109 | - Upper energy limit (TeV) [100.0] | |
| 110 | - Background subtraction method (NONE|IRF|RING) [NONE] RING | |
| 111 | - Source region radius for estimating on-counts (degrees) [0.0] 0.2 | |
| 112 | - Inner ring radius (degrees) [0.6] | |
| 113 | - Outer ring radius (degrees) [0.8] | |
| 114 | - Calibration database [prod2] | |
| 115 | - Instrument response function [South_0.5h] | |
| 116 | - Output skymap file [skymap.fits] skymap_ring.fits | |
| 99 | + $ ctskymap inexclusion=exclusion.reg | |
| 100 | + Input event list or observation definition XML file [selected_events.fits] | |
| 101 | + First coordinate of image center in degrees (RA or galactic l) (0-360) [83.63] | |
| 102 | + Second coordinate of image center in degrees (DEC or galactic b) (-90-90) [22.01] | |
| 103 | + Projection method (AIT|AZP|CAR|GLS|MER|MOL|SFL|SIN|STG|TAN) [CAR] | |
| 104 | + Coordinate system (CEL - celestial, GAL - galactic) (CEL|GAL) [CEL] | |
| 105 | + Image scale (in degrees/pixel) [0.02] | |
| 106 | + Size of the X axis in pixels [200] | |
| 107 | + Size of the Y axis in pixels [200] | |
| 108 | + Lower energy limit (TeV) [0.1] | |
| 109 | + Upper energy limit (TeV) [100.0] | |
| 110 | + Background subtraction method (NONE|IRF|RING) [IRF] RING | |
| 111 | + Source region radius for estimating on-counts (degrees) [0.2] | |
| 112 | + Inner ring radius (degrees) [0.6] | |
| 113 | + Outer ring radius (degrees) [0.8] | |
| 114 | + Calibration database [prod2] | |
| 115 | + Instrument response function [South_0.5h] | |
| 116 | + Output skymap file [skymap_subtracted.fits] skymap_ring.fits | |
| 117 | 117 | |
| 118 | 118 | The exclusion file used contained just a circle centered on the Crab |
| 119 | 119 | nebula. |
| ... | ... | @@ -121,12 +121,8 @@ nebula. |
| 121 | 121 | .. code-block:: bash |
| 122 | 122 | |
| 123 | 123 | $ more exclusion.reg |
| 124 | - # Region file format: DS9 version 4.1 | |
| 125 | - global color=green dashlist=8 3 width=1 font="helvetica 10 | |
| 126 | - normal roman" select=1 highlite=1 dash=0 fixed=0 edit=1 move=1 | |
| 127 | - delete=1 include=1 source=1 | |
| 128 | 124 | fk5 |
| 129 | - circle(83.63,22.01,720.000") | |
| 125 | + circle(83.63,22.01,0.2) | |
| 130 | 126 | |
| 131 | 127 | The resulting sky map, displayed using |
| 132 | 128 | `ds9 <http://ds9.si.edu>`_ in logarithmic color scale is shown below. | ... | ... |
doc/source/users/tutorials/quickstart/skymap_ring.jpg
doc/source/users/tutorials/quickstart/skymap_subtracted.jpg
doc/source/users/tutorials/quickstart/spectrum.jpg
doc/source/users/tutorials/quickstart/unbinned.rst
| ... | ... | @@ -25,7 +25,7 @@ You do this with the :ref:`ctlike` tool as follows: |
| 25 | 25 | .. code-block:: bash |
| 26 | 26 | |
| 27 | 27 | $ ctlike |
| 28 | - Input event list, counts cube or observation definition XML file [selected_events.fits] | |
| 28 | + Input event list, counts cube or observation definition XML file [cntcube.fits] selected_events.fits | |
| 29 | 29 | Calibration database [prod2] |
| 30 | 30 | Instrument response function [South_0.5h] |
| 31 | 31 | Input model definition XML file [models.xml] $CTOOLS/share/models/crab.xml |
| ... | ... | @@ -56,62 +56,54 @@ the same events for both analyses. |
| 56 | 56 | |
| 57 | 57 | .. code-block:: none |
| 58 | 58 | |
| 59 | - 2017-11-28T16:26:57: +=================================+ | |
| 60 | - 2017-11-28T16:26:57: | Maximum likelihood optimisation | | |
| 61 | - 2017-11-28T16:26:57: +=================================+ | |
| 62 | - 2017-11-28T16:26:57: >Iteration 0: -logL=134457.962, Lambda=1.0e-03 | |
| 63 | - 2017-11-28T16:26:57: >Iteration 1: -logL=134437.621, Lambda=1.0e-03, delta=20.342, step=1.0e+00, max(|grad|)=43.475634 [Index:7] | |
| 64 | - 2017-11-28T16:26:57: >Iteration 2: -logL=134437.595, Lambda=1.0e-04, delta=0.026, step=1.0e+00, max(|grad|)=0.121800 [Index:7] | |
| 65 | - 2017-11-28T16:26:57: >Iteration 3: -logL=134437.595, Lambda=1.0e-05, delta=0.000, step=1.0e+00, max(|grad|)=0.001202 [Index:7] | |
| 66 | - 2017-11-28T16:26:57: | |
| 67 | - 2017-11-28T16:26:57: +=========================================+ | |
| 68 | - 2017-11-28T16:26:57: | Maximum likelihood optimisation results | | |
| 69 | - 2017-11-28T16:26:57: +=========================================+ | |
| 70 | - 2017-11-28T16:26:57: === GOptimizerLM === | |
| 71 | - 2017-11-28T16:26:57: Optimized function value ..: 134437.595 | |
| 72 | - 2017-11-28T16:26:57: Absolute precision ........: 0.005 | |
| 73 | - 2017-11-28T16:26:57: Acceptable value decrease .: 2 | |
| 74 | - 2017-11-28T16:26:57: Optimization status .......: converged | |
| 75 | - 2017-11-28T16:26:57: Number of parameters ......: 10 | |
| 76 | - 2017-11-28T16:26:57: Number of free parameters .: 4 | |
| 77 | - 2017-11-28T16:26:57: Number of iterations ......: 3 | |
| 78 | - 2017-11-28T16:26:57: Lambda ....................: 1e-06 | |
| 79 | - 2017-11-28T16:26:57: Maximum log likelihood ....: -134437.595 | |
| 80 | - 2017-11-28T16:26:57: Observed events (Nobs) ...: 20877.000 | |
| 81 | - 2017-11-28T16:26:57: Predicted events (Npred) ..: 20877.000 (Nobs - Npred = -1.41397322295234e-07) | |
| 82 | - 2017-11-28T16:26:57: === GModels === | |
| 83 | - 2017-11-28T16:26:57: Number of models ..........: 2 | |
| 84 | - 2017-11-28T16:26:57: Number of parameters ......: 10 | |
| 85 | - 2017-11-28T16:26:57: === GModelSky === | |
| 86 | - 2017-11-28T16:26:57: Name ......................: Crab | |
| 87 | - 2017-11-28T16:26:57: Instruments ...............: all | |
| 88 | - 2017-11-28T16:26:57: Instrument scale factors ..: unity | |
| 89 | - 2017-11-28T16:26:57: Observation identifiers ...: all | |
| 90 | - 2017-11-28T16:26:57: Model type ................: PointSource | |
| 91 | - 2017-11-28T16:26:57: Model components ..........: "PointSource" * "PowerLaw" * "Constant" | |
| 92 | - 2017-11-28T16:26:57: Number of parameters ......: 6 | |
| 93 | - 2017-11-28T16:26:57: Number of spatial par's ...: 2 | |
| 94 | - 2017-11-28T16:26:57: RA .......................: 83.6331 [-360,360] deg (fixed,scale=1) | |
| 95 | - 2017-11-28T16:26:57: DEC ......................: 22.0145 [-90,90] deg (fixed,scale=1) | |
| 96 | - 2017-11-28T16:26:57: Number of spectral par's ..: 3 | |
| 97 | - 2017-11-28T16:26:57: Prefactor ................: 5.85495471291474e-16 +/- 1.08121595582131e-17 [1e-23,1e-13] ph/cm2/s/MeV (free,scale=1e-16,gradient) | |
| 98 | - 2017-11-28T16:26:57: Index ....................: -2.48742680094013 +/- 0.0155955916697299 [-0,-5] (free,scale=-1,gradient) | |
| 99 | - 2017-11-28T16:26:57: PivotEnergy ..............: 300000 [10000,1000000000] MeV (fixed,scale=1000000,gradient) | |
| 100 | - 2017-11-28T16:26:57: Number of temporal par's ..: 1 | |
| 101 | - 2017-11-28T16:26:57: Normalization ............: 1 (relative value) (fixed,scale=1,gradient) | |
| 102 | - 2017-11-28T16:26:57: === GCTAModelIrfBackground === | |
| 103 | - 2017-11-28T16:26:57: Name ......................: CTABackgroundModel | |
| 104 | - 2017-11-28T16:26:57: Instruments ...............: CTA | |
| 105 | - 2017-11-28T16:26:57: Instrument scale factors ..: unity | |
| 106 | - 2017-11-28T16:26:57: Observation identifiers ...: all | |
| 107 | - 2017-11-28T16:26:57: Model type ................: "PowerLaw" * "Constant" | |
| 108 | - 2017-11-28T16:26:57: Number of parameters ......: 4 | |
| 109 | - 2017-11-28T16:26:57: Number of spectral par's ..: 3 | |
| 110 | - 2017-11-28T16:26:57: Prefactor ................: 0.966210894921824 +/- 0.0131220642906203 [0.001,1000] ph/cm2/s/MeV (free,scale=1,gradient) | |
| 111 | - 2017-11-28T16:26:57: Index ....................: 0.00879946195443994 +/- 0.00825144420159423 [-5,5] (free,scale=1,gradient) | |
| 112 | - 2017-11-28T16:26:57: PivotEnergy ..............: 1000000 [10000,1000000000] MeV (fixed,scale=1000000,gradient) | |
| 113 | - 2017-11-28T16:26:57: Number of temporal par's ..: 1 | |
| 114 | - 2017-11-28T16:26:57: Normalization ............: 1 (relative value) (fixed,scale=1,gradient) | |
| 59 | + 2018-01-24T14:42:49: +=========================================+ | |
| 60 | + 2018-01-24T14:42:49: | Maximum likelihood optimisation results | | |
| 61 | + 2018-01-24T14:42:49: +=========================================+ | |
| 62 | + 2018-01-24T14:42:49: === GOptimizerLM === | |
| 63 | + 2018-01-24T14:42:49: Optimized function value ..: 139993.152 | |
| 64 | + 2018-01-24T14:42:49: Absolute precision ........: 0.005 | |
| 65 | + 2018-01-24T14:42:49: Acceptable value decrease .: 2 | |
| 66 | + 2018-01-24T14:42:49: Optimization status .......: converged | |
| 67 | + 2018-01-24T14:42:49: Number of parameters ......: 10 | |
| 68 | + 2018-01-24T14:42:49: Number of free parameters .: 4 | |
| 69 | + 2018-01-24T14:42:49: Number of iterations ......: 2 | |
| 70 | + 2018-01-24T14:42:49: Lambda ....................: 1e-05 | |
| 71 | + 2018-01-24T14:42:49: Maximum log likelihood ....: -139993.152 | |
| 72 | + 2018-01-24T14:42:49: Observed events (Nobs) ...: 21974.000 | |
| 73 | + 2018-01-24T14:42:49: Predicted events (Npred) ..: 21973.998 (Nobs - Npred = 0.00192004605924012) | |
| 74 | + 2018-01-24T14:42:49: === GModels === | |
| 75 | + 2018-01-24T14:42:49: Number of models ..........: 2 | |
| 76 | + 2018-01-24T14:42:49: Number of parameters ......: 10 | |
| 77 | + 2018-01-24T14:42:49: === GModelSky === | |
| 78 | + 2018-01-24T14:42:49: Name ......................: Crab | |
| 79 | + 2018-01-24T14:42:49: Instruments ...............: all | |
| 80 | + 2018-01-24T14:42:49: Instrument scale factors ..: unity | |
| 81 | + 2018-01-24T14:42:49: Observation identifiers ...: all | |
| 82 | + 2018-01-24T14:42:49: Model type ................: PointSource | |
| 83 | + 2018-01-24T14:42:49: Model components ..........: "PointSource" * "PowerLaw" * "Constant" | |
| 84 | + 2018-01-24T14:42:49: Number of parameters ......: 6 | |
| 85 | + 2018-01-24T14:42:49: Number of spatial par's ...: 2 | |
| 86 | + 2018-01-24T14:42:49: RA .......................: 83.6331 [-360,360] deg (fixed,scale=1) | |
| 87 | + 2018-01-24T14:42:49: DEC ......................: 22.0145 [-90,90] deg (fixed,scale=1) | |
| 88 | + 2018-01-24T14:42:49: Number of spectral par's ..: 3 | |
| 89 | + 2018-01-24T14:42:49: Prefactor ................: 5.84749807744844e-16 +/- 1.02060247557839e-17 [1e-23,1e-13] ph/cm2/s/MeV (free,scale=1e-16,gradient) | |
| 90 | + 2018-01-24T14:42:49: Index ....................: -2.48831941472059 +/- 0.0150002799717933 [-0,-5] (free,scale=-1,gradient) | |
| 91 | + 2018-01-24T14:42:49: PivotEnergy ..............: 300000 [10000,1000000000] MeV (fixed,scale=1000000,gradient) | |
| 92 | + 2018-01-24T14:42:49: Number of temporal par's ..: 1 | |
| 93 | + 2018-01-24T14:42:49: Normalization ............: 1 (relative value) (fixed,scale=1,gradient) | |
| 94 | + 2018-01-24T14:42:49: === GCTAModelIrfBackground === | |
| 95 | + 2018-01-24T14:42:49: Name ......................: CTABackgroundModel | |
| 96 | + 2018-01-24T14:42:49: Instruments ...............: CTA | |
| 97 | + 2018-01-24T14:42:49: Instrument scale factors ..: unity | |
| 98 | + 2018-01-24T14:42:49: Observation identifiers ...: all | |
| 99 | + 2018-01-24T14:42:49: Model type ................: "PowerLaw" * "Constant" | |
| 100 | + 2018-01-24T14:42:49: Number of parameters ......: 4 | |
| 101 | + 2018-01-24T14:42:49: Number of spectral par's ..: 3 | |
| 102 | + 2018-01-24T14:42:49: Prefactor ................: 1.00311308345777 +/- 0.0134769768119516 [0.001,1000] ph/cm2/s/MeV (free,scale=1,gradient) | |
| 103 | + 2018-01-24T14:42:49: Index ....................: 0.00710999567642649 +/- 0.00818686036300859 [-5,5] (free,scale=1,gradient) | |
| 104 | + 2018-01-24T14:42:49: PivotEnergy ..............: 1000000 [10000,1000000000] MeV (fixed,scale=1000000,gradient) | |
| 105 | + 2018-01-24T14:42:49: Number of temporal par's ..: 1 | |
| 106 | + 2018-01-24T14:42:49: Normalization ............: 1 (relative value) (fixed,scale=1,gradient) | |
| 115 | 107 | |
| 116 | 108 | .. note:: |
| 117 | 109 | Many tools or scripts can also be used in unbinned mode, including | ... | ... |
doc/source/users/user_manual/plotting.rst
src/ctskymap/ctskymap.par
| ... | ... | @@ -43,7 +43,7 @@ yref, r, a, 22.01,-90,90, "Second coordinate of image center in degrees (DEC |
| 43 | 43 | # Background subtraction parameters |
| 44 | 44 | #================================== |
| 45 | 45 | bkgsubtract, s, a, NONE, NONE|IRF|RING,, "Background subtraction method" |
| 46 | -roiradius, r, a, 0.0,,, "Source region radius for estimating on-counts (degrees)" | |
| 46 | +roiradius, r, a, 0.2,,, "Source region radius for estimating on-counts (degrees)" | |
| 47 | 47 | inradius, r, a, 0.6,,, "Inner ring radius (degrees)" |
| 48 | 48 | outradius, r, a, 0.8,,, "Outer ring radius (degrees)" |
| 49 | 49 | inexclusion, f, h, NONE,,, "Exclusion map or DS9 region file name" | ... | ... |