diff --git a/doc/source/users/tutorials/howto/comptel/howto_comptel_archive.png b/doc/source/users/tutorials/howto/comptel/howto_comptel_archive.png new file mode 100644 index 0000000..ba23826 --- /dev/null +++ b/doc/source/users/tutorials/howto/comptel/howto_comptel_archive.png diff --git a/doc/source/users/tutorials/howto/comptel/howto_comptel_butterfly.png b/doc/source/users/tutorials/howto/comptel/howto_comptel_butterfly.png new file mode 100644 index 0000000..521cdae --- /dev/null +++ b/doc/source/users/tutorials/howto/comptel/howto_comptel_butterfly.png diff --git a/doc/source/users/tutorials/howto/comptel/howto_comptel_butterfly.rst b/doc/source/users/tutorials/howto/comptel/howto_comptel_butterfly.rst new file mode 100644 index 0000000..2b44ad2 --- /dev/null +++ b/doc/source/users/tutorials/howto/comptel/howto_comptel_butterfly.rst @@ -0,0 +1,39 @@ +.. _howto_comptel_butterfly: + +Generate a butterfly diagram for a model component +-------------------------------------------------- + + .. admonition:: What you will learn + + You will learn how to use :ref:`ctbutterfly` to create a butterfly diagram + for a model component from COMPTEL data. + +A butterfly diagram shows the envelope of all spectral models that are +statistically compatible with the data. You can create such a butterfly +diagram for the Crab using the :ref:`ctbutterfly` tool by providing +the +:ref:`model definition file ` +output file from :ref:`ctlike` as input: + +.. code-block:: bash + + $ ctbutterfly fit=yes + Input event list, counts cube or observation definition XML file [events.fits] obs.xml + Source of interest [Crab] + Input model definition XML file [$CTOOLS/share/models/crab.xml] models.xml + Start value for first energy bin in TeV [0.1] 0.00000075 + Stop value for last energy bin in TeV [100.0] 0.00003 + Output ASCII file [butterfly.txt] + +:ref:`ctbutterfly` produces the ASCII file ``butterfly.txt`` that contains +the envelope of the butterfly diagram. The figure below gives a graphical +representation of the envelope. The red data points show the combined +Crab nebular and pulsar spectrum from +`Kuiper et al. 2001, A&A, 378, 918 `_ +for comparison. + +.. figure:: howto_comptel_butterfly.png + :width: 600px + :align: center + + *Butterfly diagram of the fitted Crab spectrum* diff --git a/doc/source/users/tutorials/howto/comptel/howto_comptel_datasets.jpg b/doc/source/users/tutorials/howto/comptel/howto_comptel_datasets.jpg new file mode 100644 index 0000000..bccd12f --- /dev/null +++ b/doc/source/users/tutorials/howto/comptel/howto_comptel_datasets.jpg diff --git a/doc/source/users/tutorials/howto/comptel/howto_comptel_download.rst b/doc/source/users/tutorials/howto/comptel/howto_comptel_download.rst new file mode 100644 index 0000000..47e5df5 --- /dev/null +++ b/doc/source/users/tutorials/howto/comptel/howto_comptel_download.rst @@ -0,0 +1,62 @@ +.. _howto_comptel_download: + +Download COMPTEL data +--------------------- + + .. admonition:: What you will learn + + You will learn how to prepare COMPTEL data for an analysis with + ctools. + + +COMPTEL data can be downloaded from the HEASARC data server through the +`Xamin Web Interface `_. +As example, the figure below shows a request for data around the Crab pulsar. + +.. figure:: howto_comptel_query.jpg + :width: 600px + :align: center + + *Xamin Web Interface to query COMPTEL data* + +Click on the button ``Show table`` in the upper left which opens a new +window that shows all available data sets. Click on the ``+`` symbol of a +dataset to get a link to the data archive directory. + +.. figure:: howto_comptel_datasets.jpg + :width: 600px + :align: center + + *Available COMPTEL data for the Crab region* + +Clicking on the link brings you to the archive directory, shown below. + +.. figure:: howto_comptel_archive.png + :width: 600px + :align: center + + *COMPTEL data archive for viewing period 0001* + +The COMPTEL obervations were divided in so-called viewing periods (``vp``) of +typically 14 days. The Crab nebula was observed during many viewing periods. +In this example, the data for the viewing period 0001 was selected. From the +archive you now have to download the following files: + +* ``m32171_drx.fits.gz`` - Exposure map +* ``m34997_drg.fits.gz`` - Geometry factors (needed for response computation) +* ``m50438_dre.fits.gz`` - Counts cube for energy interval 0.75 - 1 MeV +* ``m50439_dre.fits.gz`` - Counts cube for energy interval 1 - 3 MeV +* ``m50440_dre.fits.gz`` - Counts cube for energy interval 3 - 10 MeV +* ``m50441_dre.fits.gz`` - Counts cube for energy interval 10 - 30 MeV + +The COMPTEL data are usually processed for four standard energy intervals, +and a 3-dimensional counts cube exists for each of these energy intervals. +Counts cubes are always suffixed ``_dre``, exposures ``_drx`` and geometry +factors ``_drg``. + + .. warning:: + + The files in the HEASARC archive have a ``.gz`` extension but apparently + the files are not gzipped. You may however leave the file names as they + are and specify later the file names without the ``.gz`` extension since + reading of gzipped files is transparent for ctools. diff --git a/doc/source/users/tutorials/howto/comptel/howto_comptel_fitting.rst b/doc/source/users/tutorials/howto/comptel/howto_comptel_fitting.rst new file mode 100644 index 0000000..4bbc53a --- /dev/null +++ b/doc/source/users/tutorials/howto/comptel/howto_comptel_fitting.rst @@ -0,0 +1,288 @@ +.. _howto_comptel_fitting: + +Fit a model to the data +----------------------- + + .. admonition:: What you will learn + + You will learn how to use :ref:`ctlike` to fit a parametric model to + COMPTEL data. + +Start with creating an +:ref:`observation definition file ` +that defines the names of the counts cube files, geometry factor files +and exposure map files. In addition you will need background model files, +but since those are not distributed with the data you will use the geometry +factors also as background files, which is a reasonable zero order +approximation of the instrumental background distribution in COMPTEL. + +Below the +:ref:`observation definition file ` +that is needed for the following analyses. Since the four counts cubes +correspond to the four energy bands, and every observation holds a single +counts cube, an observation has been added for every energy band. +The ``IAQ`` parameter indicates the instrument response, which needs +to be given for each band in the specified format. + +.. code-block:: xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Then you also need a +:ref:`model definition file ` +that describes the source and background model that you want to fit. In the +example below, a point source with a ower law is fit at the position of the +Crab on top of an instrumental background model. + +.. code-block:: xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ... + + + + + + + ... + + + + + + + ... + + + + + + + ... + + + +Since the file is relatively long it is not entirely reproduced here, but you +can download the file :download:`models.xml ` by clicking on +the file name. + +The first source in the +:ref:`model definition file ` +is the point source for the Crab, the next four sources are background +model components for each of the energy bands. + +You may have recognised the ``id`` attribute for each model component. This +attribute links a given model component to a given observation. For example, +``Background(1.0-3.0)MeV`` has ``id="200001"`` and will hence only be used +to model the background for the observation that corresponds to the 1 - 3 MeV +band. + +Each background model implements a so called Phibar-fitting of the file that +was specified for the background model (recall that you specified the geometry +factors as background model). Phibar-fitting means that the background model +is fitted to the data for each Phibar-layer of the counts cube. Each background +model is composed of 25 nodes, corresponding to the number of Phibar layers +of a COMPTEL counts cube, and each node is defined by it's Phibar value +(a fixed parameter) and it's Normalization (in general a free parameter). +For some background models some normalizations of Phibar layers have been set +to zero and the parameters fixed to exclude layers from the fitting that do +not contain any data (the filling-factor of a counts cube is energy dependent; +for the 0.75 - 1 MeV energy bin the first 8 layers are in fact empty). + +Now you are ready to fit the model using the :ref:`ctlike` model tool. You do +this as follows: + +.. code-block:: bash + + $ ctlike + Input event list, counts cube or observation definition XML file [events.fits] obs.xml + Input model definition XML file [$CTOOLS/share/models/crab.xml] models.xml + Output model definition XML file [crab_results.xml] + +:ref:`ctlike` creates on output the +:ref:`model definition file ` +``crab_results.xml`` where the parameter values were updated by their +fitted values, and where the statistical uncertainties were added using the +``error`` attribute. To investigate how the fit went you should inspect the +log file ``ctlike.log`` that was also created by :ref:`ctlike`: + +.. code-block:: bash + + 2017-08-26T22:05:05: +=================================+ + 2017-08-26T22:05:05: | Maximum likelihood optimisation | + 2017-08-26T22:05:05: +=================================+ + 2017-08-26T22:05:06: >Iteration 0: -logL=988086.091, Lambda=1.0e-03 + 2017-08-26T22:05:07: >Iteration 1: -logL=670534.792, Lambda=1.0e-03, delta=317551.299, step=1.0e+00, max(|grad|)=86219.859480 [Index:3] + 2017-08-26T22:05:08: >Iteration 2: -logL=387046.862, Lambda=1.0e-04, delta=283487.930, step=1.0e+00, max(|grad|)=69886.869623 [Index:3] + 2017-08-26T22:05:08: >Iteration 3: -logL=154426.362, Lambda=1.0e-05, delta=232620.499, step=1.0e+00, max(|grad|)=47994.333526 [Index:3] + 2017-08-26T22:05:09: >Iteration 4: -logL=-12393.885, Lambda=1.0e-06, delta=166820.247, step=1.0e+00, max(|grad|)=24763.811238 [Index:3] + 2017-08-26T22:05:10: >Iteration 5: -logL=-108271.655, Lambda=1.0e-07, delta=95877.770, step=1.0e+00, max(|grad|)=7544.090872 [Index:3] + 2017-08-26T22:05:11: >Iteration 6: -logL=-145906.957, Lambda=1.0e-08, delta=37635.302, step=1.0e+00, max(|grad|)=1167.483336 [Index:3] + 2017-08-26T22:05:12: >Iteration 7: -logL=-152898.212, Lambda=1.0e-09, delta=6991.255, step=1.0e+00, max(|grad|)=110.879761 [Index:3] + 2017-08-26T22:05:12: >Iteration 8: -logL=-153217.134, Lambda=1.0e-10, delta=318.921, step=1.0e+00, max(|grad|)=-2.969681 [Scale factor 2:111] + 2017-08-26T22:05:13: >Iteration 9: -logL=-153218.344, Lambda=1.0e-11, delta=1.210, step=1.0e+00, max(|grad|)=-0.047390 [Index:3] + 2017-08-26T22:05:14: >Iteration 10: -logL=-153218.344, Lambda=1.0e-12, delta=0.000, step=1.0e+00, max(|grad|)=-0.001891 [Index:3] + 2017-08-26T22:05:15: + 2017-08-26T22:05:15: +====================================+ + 2017-08-26T22:05:15: | Maximum likelihood re-optimisation | + 2017-08-26T22:05:15: +====================================+ + 2017-08-26T22:05:15: >Iteration 0: -logL=-152378.830, Lambda=1.0e-03 + 2017-08-26T22:05:16: >Iteration 1: -logL=-152759.255, Lambda=1.0e-03, delta=380.425, step=1.0e+00, max(|grad|)=-2.480864 [Scale factor 10:21] + 2017-08-26T22:05:16: >Iteration 2: -logL=-152760.518, Lambda=1.0e-04, delta=1.264, step=1.0e+00, max(|grad|)=-0.019031 [Scale factor 10:21] + 2017-08-26T22:05:16: >Iteration 3: -logL=-152760.518, Lambda=1.0e-05, delta=0.000, step=1.0e+00, max(|grad|)=-0.000001 [Scale factor 10:21] + 2017-08-26T22:05:16: + 2017-08-26T22:05:16: +============================================+ + 2017-08-26T22:05:16: | Maximum likelihood re-optimisation results | + 2017-08-26T22:05:16: +============================================+ + 2017-08-26T22:05:16: === GOptimizerLM === + 2017-08-26T22:05:16: Optimized function value ..: -152760.518 + 2017-08-26T22:05:16: Absolute precision ........: 0.005 + 2017-08-26T22:05:16: Acceptable value decrease .: 2 + 2017-08-26T22:05:16: Optimization status .......: converged + 2017-08-26T22:05:16: Number of parameters ......: 200 + 2017-08-26T22:05:16: Number of free parameters .: 87 + 2017-08-26T22:05:16: Number of iterations ......: 3 + 2017-08-26T22:05:16: Lambda ....................: 1e-06 + 2017-08-26T22:05:16: + 2017-08-26T22:05:16: +=========================================+ + 2017-08-26T22:05:16: | Maximum likelihood optimisation results | + 2017-08-26T22:05:16: +=========================================+ + 2017-08-26T22:05:16: === GOptimizerLM === + 2017-08-26T22:05:16: Optimized function value ..: -153218.344 + 2017-08-26T22:05:16: Absolute precision ........: 0.005 + 2017-08-26T22:05:16: Acceptable value decrease .: 2 + 2017-08-26T22:05:16: Optimization status .......: converged + 2017-08-26T22:05:16: Number of parameters ......: 206 + 2017-08-26T22:05:16: Number of free parameters .: 89 + 2017-08-26T22:05:16: Number of iterations ......: 10 + 2017-08-26T22:05:16: Lambda ....................: 1e-13 + 2017-08-26T22:05:16: Maximum log likelihood ....: 153218.344 + 2017-08-26T22:05:16: Observed events (Nobs) ...: 527595.000 + 2017-08-26T22:05:16: Predicted events (Npred) ..: 527594.000 (Nobs - Npred = 1.00004221417475) + 2017-08-26T22:05:16: === GModels === + 2017-08-26T22:05:16: Number of models ..........: 5 + 2017-08-26T22:05:16: Number of parameters ......: 206 + 2017-08-26T22:05:16: === GModelSky === + 2017-08-26T22:05:16: Name ......................: Crab + 2017-08-26T22:05:16: Instruments ...............: all + 2017-08-26T22:05:16: Test Statistic ............: 915.650908945536 + 2017-08-26T22:05:16: Instrument scale factors ..: unity + 2017-08-26T22:05:16: Observation identifiers ...: all + 2017-08-26T22:05:16: Model type ................: PointSource + 2017-08-26T22:05:16: Model components ..........: "PointSource" * "PowerLaw" * "Constant" + 2017-08-26T22:05:16: Number of parameters ......: 6 + 2017-08-26T22:05:16: Number of spatial par's ...: 2 + 2017-08-26T22:05:16: RA .......................: 83.6331 [-360,360] deg (fixed,scale=1) + 2017-08-26T22:05:16: DEC ......................: 22.0145 [-90,90] deg (fixed,scale=1) + 2017-08-26T22:05:16: Number of spectral par's ..: 3 + 2017-08-26T22:05:16: Prefactor ................: 0.00237517119227384 +/- 0.000107673211964802 [-1,1] ph/cm2/s/MeV (free,scale=0.001,gradient) + 2017-08-26T22:05:16: Index ....................: -2.47153532398462 +/- 0.0500838601327289 [5,-5] (free,scale=-1,gradient) + 2017-08-26T22:05:16: PivotEnergy ..............: 1 [0.01,1000] MeV (fixed,scale=1,gradient) + 2017-08-26T22:05:16: Number of temporal par's ..: 1 + 2017-08-26T22:05:16: Normalization ............: 1 (relative value) (fixed,scale=1,gradient) + +The fit converged after 10 iterations and did a second fit without the +source component to determine the Test Statistic value of the Crab. +The source is detected with a Test Statistic of 915.7 which corresponds to +a detection significance of about 30 sigma. + + .. note:: + + `Kuiper et al. 2001, A&A, 378, 918 `_ + presented the most comprehensive analysis of the COMPTEL Crab observations + and summarize in their Table 3 the gamma-ray intensity as function of + energy for the unpulsed and pulsed component of source. By adding the + intensities and fitting the resulting values we obtained a prefactor + of 2.5e-3, which is very close to the prefactor of 2.4e-3 obtained + in the analysis above. The spectral index of the Kuiper's data is + -2.2, a bit harder than the index of -2.5 obtained in the fit. + + .. note:: + + The position of a point source can also be adjusted by :ref:`ctlike` for + an analysis of COMPTEL data, hence you may set the corresponding parameters + to ``free="1"`` to determine also the best fitting source position. + + .. warning:: + + ctools supports for the moment only the fitting of point sources for + COMPTEL data. Other spatial shapes will be implemented in the future. diff --git a/doc/source/users/tutorials/howto/comptel/howto_comptel_query.jpg b/doc/source/users/tutorials/howto/comptel/howto_comptel_query.jpg new file mode 100644 index 0000000..e6165e9 --- /dev/null +++ b/doc/source/users/tutorials/howto/comptel/howto_comptel_query.jpg diff --git a/doc/source/users/tutorials/howto/comptel/howto_comptel_spectrum.png b/doc/source/users/tutorials/howto/comptel/howto_comptel_spectrum.png new file mode 100644 index 0000000..7fdbd3b --- /dev/null +++ b/doc/source/users/tutorials/howto/comptel/howto_comptel_spectrum.png diff --git a/doc/source/users/tutorials/howto/comptel/howto_comptel_spectrum.rst b/doc/source/users/tutorials/howto/comptel/howto_comptel_spectrum.rst new file mode 100644 index 0000000..c1d108b --- /dev/null +++ b/doc/source/users/tutorials/howto/comptel/howto_comptel_spectrum.rst @@ -0,0 +1,83 @@ +.. _howto_comptel_spectrum: + +Generate a spectral energy distribution for a source +---------------------------------------------------- + + .. admonition:: What you will learn + + You will learn how to use :ref:`ctlike` to derive the spectral energy + density of a source from COMPTEL data. + +So far the :ref:`csspec` script does not work for COMPTEL data, but you +will learn here a method that you can use to derive the spectrum of any +source using COMPTEL data. For this you have to modify the +:ref:`model definition file ` +and replace the spectral component of the Crab by a node function: + +.. code-block:: xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ... + + +Instead of the power law the model now contains a node function with four +intensity nodes between 0.75 MeV and 30 MeV, and the :ref:`ctlike` tool will +now adjust the intensities of each of the nodes which will result in a +spectrum. To do this type now: + +.. code-block:: bash + + $ ctlike + Input event list, counts cube or observation definition XML file [obs.xml] + Input model definition XML file [models.xml] model_nodes.xml + Output model definition XML file [crab_results.xml] crab_nodes_results.xml + +This will produce the +:ref:`model definition file ` +``crab_nodes_results.xml`` with the intensities of the fitted source at +each energy. The results are displayed graphically below. The red data points +show the combined Crab nebular and pulsar spectrum from +`Kuiper et al. 2001, A&A, 378, 918 `_ +for comparison. + +.. figure:: howto_comptel_spectrum.png + :width: 600px + :align: center + + *Spectrum of the Crab derived using a node function* +.. + + .. note:: + + The ``NodeFunction`` spectral models implements a piece-wise power law + that is defined by the intensity values at each node. diff --git a/doc/source/users/tutorials/howto/comptel/howto_comptel_tsmap.png b/doc/source/users/tutorials/howto/comptel/howto_comptel_tsmap.png new file mode 100644 index 0000000..08ddb6f --- /dev/null +++ b/doc/source/users/tutorials/howto/comptel/howto_comptel_tsmap.png diff --git a/doc/source/users/tutorials/howto/comptel/howto_comptel_tsmap.rst b/doc/source/users/tutorials/howto/comptel/howto_comptel_tsmap.rst new file mode 100644 index 0000000..5fac357 --- /dev/null +++ b/doc/source/users/tutorials/howto/comptel/howto_comptel_tsmap.rst @@ -0,0 +1,42 @@ +.. _howto_comptel_tsmap: + +Generate a Test Statistic map +----------------------------- + + .. admonition:: What you will learn + + You will learn how to use :ref:`cttsmap` to generate a Test Staristic + map from COMPTEL data. + +The Test Statistic (or maximum likelihood ratio) is a measure of the detection +significance of a gamma-ray source. By displacing the location of a test source +on a grid of positions you can generate a Test Statistic map that helps in +finding significant source and assessing the position uncertainty of a +source. You do this by using the :ref:`cttsmap` tool as follows: + +.. code-block:: bash + + $ cttsmap + Input event list, counts cube or observation definition XML file [events.fits] obs.xml + Test source name [Crab] + Input model definition XML file [$CTOOLS/share/models/crab.xml] models.xml + First coordinate of image center in degrees (RA or galactic l) (0-360) [83.63] + Second coordinate of image center in degrees (DEC or galactic b) (-90-90) [22.01] + Projection method (AIT|AZP|CAR|GLS|MER|MOL|SFL|SIN|STG|TAN) [CAR] + Coordinate system (CEL - celestial, GAL - galactic) (CEL|GAL) [CEL] + Image scale (in degrees/pixel) [0.02] 1.0 + Size of the X axis in pixels [200] 10 + Size of the Y axis in pixels [200] 10 + Output Test Statistic map file [tsmap.fits] + +:ref:`cttsmap` created a 10 x 10 pixels map with a pixel size of 1 degree +around the location of the Crab and saved the result in the FITS file +``tsmap.fits``. The file also contains the values of all fitted parameters +at each grid position. The Test Statistics map is displayed using +`ds9 `_ in the figure below: + +.. figure:: howto_comptel_tsmap.png + :width: 400px + :align: center + + *Test Statistic map for COMPTEL viewing period 1 of the Crab nebula* diff --git a/doc/source/users/tutorials/howto/comptel/howto_comptel_ulimit.rst b/doc/source/users/tutorials/howto/comptel/howto_comptel_ulimit.rst new file mode 100644 index 0000000..2e8e5ab --- /dev/null +++ b/doc/source/users/tutorials/howto/comptel/howto_comptel_ulimit.rst @@ -0,0 +1,106 @@ +.. _howto_comptel_ulimit: + +Derive upper flux limits for a source +------------------------------------- + + .. admonition:: What you will learn + + You will learn how to use :ref:`ctulimit` to determine upper flux limits + from COMPTEL data using a likelihood profile method. + +Suppose we have tried to get the flux from a source, for example the Vela +pulsar, but we have not managed to detect the source and now want to determine +an upper flux limit for that object. You can do this with the :ref:`ctulimit` +tool. + +First you have to retreive the COMPTEL data for the Vela pulsar. You can +do this by following +:ref:`the tutorial that explains how to download COMPTEL data `. +Suppose you have selected the data from viewing period 8. You then have to +create the following +:ref:`observation definition file `: + +.. code-block:: xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +As next step you have to create a +:ref:`model definition file `. +You can copy the file used for the Crab and adjust the point source +component as shown below. Note that you need to fix the spectral index, and +you should also constrain the ``Prefactor`` to positive values. + +.. code-block:: xml + + + + + + + + + + + + + + + + ... + + +Now you can run the :ref:`ctulimit` tool as follows. Since the tool is normally +tuned for Cherenkov Telescope data analysis, energies are by default given in +TeV. To specify a reference energy of the differential flux limit of 1 MeV you +need to provide the hidden parameter ``eref=0.000001``. You can also set the +flux interval for the intergal flux computation to 0.75 - 30 MeV by +specifying ``emin=0.000000075 emax=0.00003`` (all values are given in TeV): + +.. code-block:: bash + + $ ctulimit eref=0.000001 emin=0.000000075 emax=0.00003 + Input event list, counts cube or observation definition XML file [events.fits] obs.xml + Source of interest [Crab] Vela + Input model definition XML file [$CTOOLS/share/models/crab.xml] models.xml + +The results of the upper limit computation can then be extracted from the +``ctulimit.log`` file that is created by :ref:`ctulimit`: + +.. code-block:: bash + + 2017-08-27T08:13:44: +=====================+ + 2017-08-27T08:13:44: | Upper limit results | + 2017-08-27T08:13:44: +=====================+ + 2017-08-27T08:13:44: Differential flux limit ...: 9.26955448510129e-06 ph/cm2/s/MeV at 1e-06 TeV + 2017-08-27T08:13:44: Integral flux limit .......: 6.43104918005e-05 ph/cm2/s within [7.5e-08-3e-05] TeV + 2017-08-27T08:13:44: Energy flux limit .........: 1.54555137999306e-10 erg/cm2/s within [7.5e-08-3e-05] TeV diff --git a/doc/source/users/tutorials/howto/comptel/index.rst b/doc/source/users/tutorials/howto/comptel/index.rst new file mode 100644 index 0000000..74d5820 --- /dev/null +++ b/doc/source/users/tutorials/howto/comptel/index.rst @@ -0,0 +1,24 @@ +.. _howto_comptel: + +Analysing COMPTEL data +---------------------- + + .. admonition:: What you will learn + + You will learn how to analyse data from the COMPTEL telescope about NASA's + `CGRO `_ + satellite with ctools. + +You can use ctools to analyse data from the COMPTEL telescope aboard NASA's +`CGRO `_ satellite. +In this tutorial you will learn how to do that with a simple analysis. + +.. toctree:: + :maxdepth: 1 + + howto_comptel_download + howto_comptel_fitting + howto_comptel_butterfly + howto_comptel_spectrum + howto_comptel_tsmap + howto_comptel_ulimit diff --git a/doc/source/users/tutorials/howto/comptel/models.xml b/doc/source/users/tutorials/howto/comptel/models.xml new file mode 100644 index 0000000..f2e4821 --- /dev/null +++ b/doc/source/users/tutorials/howto/comptel/models.xml @@ -0,0 +1,422 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/source/users/tutorials/howto/fermi/howto_fermi_fitting.rst b/doc/source/users/tutorials/howto/fermi/howto_fermi_fitting.rst index 833b206..8152919 100644 --- a/doc/source/users/tutorials/howto/fermi/howto_fermi_fitting.rst +++ b/doc/source/users/tutorials/howto/fermi/howto_fermi_fitting.rst @@ -254,3 +254,9 @@ using the Fermi-LAT Science Tools. 2017-08-26T13:05:12: Test Statistic ............: 326326.556902542 which is also close to the value determined by gtlike. + + .. warning:: + + ctools supports for the moment only the fitting of point sources for + Fermi-LAT data. Other spatial shapes need to be preconvolved with the + instrument response functions and added to the ``srcmaps.fits`` file. diff --git a/doc/source/users/tutorials/howto/fermi/howto_fermi_spectrum.rst b/doc/source/users/tutorials/howto/fermi/howto_fermi_spectrum.rst index c3ae036..4158aab 100644 --- a/doc/source/users/tutorials/howto/fermi/howto_fermi_spectrum.rst +++ b/doc/source/users/tutorials/howto/fermi/howto_fermi_spectrum.rst @@ -60,7 +60,7 @@ will result in a spectrum. To do this type now: .. code-block:: bash - $ ctlike debug=yes + $ ctlike Input event list, counts cube or observation definition XML file [obs.xml] Input model definition XML file [models.xml] model_nodes.xml Output model definition XML file [vela_results.xml] vela_nodes_results.xml diff --git a/doc/source/users/tutorials/howto/fermi/index.rst b/doc/source/users/tutorials/howto/fermi/index.rst index a2e1359..8e6a8e7 100644 --- a/doc/source/users/tutorials/howto/fermi/index.rst +++ b/doc/source/users/tutorials/howto/fermi/index.rst @@ -8,7 +8,7 @@ Analysing Fermi-LAT data You will learn how to analyse data from the LAT telescope about NASA's `Fermi `_ satellite with ctools. -You can use ctools to analyse data from the LAT telescope about NASA's +You can use ctools to analyse data from the LAT telescope aboard NASA's `Fermi `_ satellite. To do this you need to be familar with the Fermi-LAT Science Tools that you will use to prepare the Fermi-LAT data for the analysis. You can download the diff --git a/doc/source/users/tutorials/howto/index.rst b/doc/source/users/tutorials/howto/index.rst index c6d5ac7..7b9a09d 100644 --- a/doc/source/users/tutorials/howto/index.rst +++ b/doc/source/users/tutorials/howto/index.rst @@ -22,5 +22,10 @@ These examples can be easily adapted to any data you have at your disposal. howto_phasecurve howto_exclude howto_vo + +.. toctree:: + :maxdepth: 1 + How to analyse Fermi-LAT data with ctools? - How to analyse H.E.S.S. data with ctools? \ No newline at end of file + How to analyse COMPTEL data with ctools? + How to analyse H.E.S.S. data with ctools?