Commit 7cca048020afe71362d9641ec3d1325f010d87d1
1 parent
883bc893
Update user documentation
Showing
70 changed files
with
790 additions
and
1461 deletions
doc/source/_templates/index.html
| ... | ... | @@ -9,7 +9,7 @@ of data from CGRO/COMPTEL, Fermi/LAT and INTEGRAL/SPI, enabling the exploration |
| 9 | 9 | of the full gamma-ray energy band, spanning from hundreds of keV to hundreds of |
| 10 | 10 | TeV. {%endtrans%}</p> |
| 11 | 11 | |
| 12 | -<p>{%trans%} The ctools philosophy inherited from ftools consists of providing | |
| 12 | +<p>{%trans%} The ctools philosophy is inherited from ftools and consists of providing | |
| 13 | 13 | building blocks that perform well-defined science data analysis tasks, including |
| 14 | 14 | observation and event selection, binning, sky map creation, source detection, |
| 15 | 15 | model fitting, spectra, phase curve and light curve generation, and observation | ... | ... |
doc/source/about.rst
| ... | ... | @@ -10,7 +10,7 @@ VERITAS, MAGIC and CTA. ctools supports also the analysis of data from |
| 10 | 10 | CGRO/COMPTEL, Fermi/LAT and INTEGRAL/SPI, enabling the exploration of the full |
| 11 | 11 | gamma-ray energy band, spanning from hundreds of keV to hundreds of TeV. |
| 12 | 12 | |
| 13 | -The ctools philosophy inherited from ftools consists of providing building | |
| 13 | +The ctools philosophy is inherited from ftools and consists of providing building | |
| 14 | 14 | blocks that perform well-defined science data analysis tasks, including |
| 15 | 15 | observation and event selection, binning, sky map creation, source detection, |
| 16 | 16 | model fitting, spectra, phase curve and light curve generation, and observation | ... | ... |
doc/source/admin/install_devel.rst
| ... | ... | @@ -147,7 +147,7 @@ version as follows: |
| 147 | 147 | |
| 148 | 148 | .. code-block:: bash |
| 149 | 149 | |
| 150 | - $ conda create -n ctools-devel python=3.6 | |
| 150 | + $ conda create -n ctools-devel python=3.9 | |
| 151 | 151 | $ source activate ctools-devel |
| 152 | 152 | $ conda install --use-local ctools=2.0.0.dev |
| 153 | 153 | |
| ... | ... | @@ -157,5 +157,5 @@ Python version you can build the conda package as follows: |
| 157 | 157 | |
| 158 | 158 | .. code-block:: bash |
| 159 | 159 | |
| 160 | - $ conda-build dev/conda.recipe --python 3.6 | |
| 160 | + $ conda-build dev/conda.recipe --python 3.9 | |
| 161 | 161 | ... | ... |
doc/source/admin/release_history/1.6.2.rst
| ... | ... | @@ -13,7 +13,7 @@ The following bugs were fixed: |
| 13 | 13 | * [`2962 <https://cta-redmine.irap.omp.eu/issues/2962>`_] - |
| 14 | 14 | Improve documentation and tutorials |
| 15 | 15 | * [`2954 <https://cta-redmine.irap.omp.eu/issues/2954>`_] - |
| 16 | - Correct handling of flux for diffuse cube models in csspec | |
| 16 | + Correct handling of flux for diffuse cube models in :ref:`csspec` | |
| 17 | 17 | * [`2912 <https://cta-redmine.irap.omp.eu/issues/2912>`_] - |
| 18 | 18 | Fix OpenMP issue in ctbin when using energy bounds from file |
| 19 | 19 | * [`2862 <https://cta-redmine.irap.omp.eu/issues/2862>`_] - | ... | ... |
doc/source/admin/release_history/1.6.rst
| ... | ... | @@ -32,8 +32,8 @@ Bug fixes |
| 32 | 32 | * [`2694 <https://cta-redmine.irap.omp.eu/issues/2694>`_] - |
| 33 | 33 | Compute ``DETX`` and ``DETY`` in :ref:`ctmodel` if they are not available |
| 34 | 34 | * [`2686 <https://cta-redmine.irap.omp.eu/issues/2686>`_] - |
| 35 | - Do no longer set missing boundaries in ``ctool::get_observations`` and | |
| 36 | - ``ctool::setup_observations`` | |
| 35 | + Do no longer set missing boundaries in :doxy:`ctool::get_observations` and | |
| 36 | + :doxy:`ctool::setup_observations` | |
| 37 | 37 | * [`2682 <https://cta-redmine.irap.omp.eu/issues/2682>`_] - |
| 38 | 38 | Avoid :ref:`ctselect` error in case that RoI radius is unchanged |
| 39 | 39 | * [`2652 <https://cta-redmine.irap.omp.eu/issues/2652>`_] - |
| ... | ... | @@ -71,7 +71,7 @@ Improvements |
| 71 | 71 | * [`2711 <https://cta-redmine.irap.omp.eu/issues/2711>`_] - |
| 72 | 72 | :ref:`csphagen` now creates appropriate model for likelihood fitting |
| 73 | 73 | * [`2685 <https://cta-redmine.irap.omp.eu/issues/2685>`_] - |
| 74 | - Add ``ctbkgcube::cntcube()`` method | |
| 74 | + Add :doxy:`ctbkgcube::cntcube` method | |
| 75 | 75 | Account for varying energy thresholds in :ref:`ctbin` weight computation |
| 76 | 76 | Unnormalize background cube values in :ref:`ctbkgcube` |
| 77 | 77 | * Add ``use_model_bkg`` parameter to :ref:`cslightcrv` | ... | ... |
doc/source/admin/release_history/1.7.4.rst
| ... | ... | @@ -15,4 +15,4 @@ The following bugs were fixed: |
| 15 | 15 | * [`3624 <https://cta-redmine.irap.omp.eu/issues/3624>`_] - |
| 16 | 16 | Replace spectral model by file function in :ref:`csspec` |
| 17 | 17 | * [`3623 <https://cta-redmine.irap.omp.eu/issues/3623>`_] - |
| 18 | - Update csinfo script | |
| 18 | + Update :doxy:`csinfo` script | ... | ... |
doc/source/admin/release_history/1.7.rst
doc/source/admin/release_history/2.0.rst
| ... | ... | @@ -26,7 +26,7 @@ Improvements |
| 26 | 26 | ------------ |
| 27 | 27 | |
| 28 | 28 | * [`3592 <https://cta-redmine.irap.omp.eu/issues/3592>`_] - |
| 29 | - Rename virtual abstract ``ctool::run()`` method to ``ctool::process()`` and add non-abstract ``ctool::run()`` method (#3592) | |
| 29 | + Rename virtual abstract :doxy:`ctool::run` method to :doxy:`ctool::process` and add non-abstract :doxy:`ctool::run` method | |
| 30 | 30 | * Add methods to access :ref:`ctlike` attributes |
| 31 | 31 | * Add restart of bisection in case of bad convergence in :ref:`ctulimit` |
| 32 | 32 | * [`3662 <https://cta-redmine.irap.omp.eu/issues/3662>`_] - |
| ... | ... | @@ -43,14 +43,14 @@ Improvements |
| 43 | 43 | Add hidden ``fix_spat`` parameter to :ref:`cttsmap` |
| 44 | 44 | * [`3555 <https://cta-redmine.irap.omp.eu/issues/3555>`_] - |
| 45 | 45 | Use test source position in :ref:`cssens` |
| 46 | -* Add optimizer setter to ``ctlikelihood`` base class. | |
| 46 | +* Add optimizer setter to :doxy:`ctlikelihood` base class. | |
| 47 | 47 | * Add ``refit_if_failed`` parameter to :ref:`ctlike` |
| 48 | 48 | * [`3441 <https://cta-redmine.irap.omp.eu/issues/3441>`_] - |
| 49 | - Add ``models()`` method to :ref:`ctobssim` | |
| 49 | + Add :doxy:`ctobssim::models` method | |
| 50 | 50 | * [`3431 <https://cta-redmine.irap.omp.eu/issues/3431>`_] - |
| 51 | 51 | Add :ref:`ctlike` results to XML file |
| 52 | 52 | * [`3324 <https://cta-redmine.irap.omp.eu/issues/3324>`_] - |
| 53 | - Replace ``std::tmpnam()`` by ``gammalib::tmpnam()`` function in :ref:`ctselect` | |
| 53 | + Replace :doxy:`std::tmpnam` by :doxy:`gammalib::tmpnam` function in :ref:`ctselect` | |
| 54 | 54 | * [`3324 <https://cta-redmine.irap.omp.eu/issues/3324>`_] - |
| 55 | 55 | Remove implicit conversion warnings |
| 56 | 56 | * [`1707 <https://cta-redmine.irap.omp.eu/issues/1707>`_] - |
| ... | ... | @@ -65,3 +65,5 @@ New features |
| 65 | 65 | * [`3738 <https://cta-redmine.irap.omp.eu/issues/3738>`_] - |
| 66 | 66 | Add COMPTEL analysis scripts |
| 67 | 67 | * Add :ref:`csadd2caldb` script |
| 68 | +* [`3592 <https://cta-redmine.irap.omp.eu/issues/3592>`_] - | |
| 69 | + Add :ref:`csfootprint` script | ... | ... |
doc/source/develop/coding/python.rst
| ... | ... | @@ -251,12 +251,12 @@ User Documentation |
| 251 | 251 | |
| 252 | 252 | .. code-block:: python |
| 253 | 253 | |
| 254 | - Methods | |
| 255 | - ------- | |
| 256 | - read(filename) | |
| 257 | - Read a table from a file | |
| 258 | - sort(column, order='ascending') | |
| 259 | - Sort by `column` | |
| 254 | + Methods | |
| 255 | + ------- | |
| 256 | + read(filename) | |
| 257 | + Read a table from a file | |
| 258 | + sort(column, order='ascending') | |
| 259 | + Sort by column | |
| 260 | 260 | |
| 261 | 261 | |
| 262 | 262 | Naming Conventions | ... | ... |
doc/source/help/issues.rst
doc/source/users/reference_manual/index.rst
| ... | ... | @@ -92,8 +92,8 @@ IACT database management scripts |
| 92 | 92 | csiactcopy --- Copies IACT data from one location to another <csiactcopy> |
| 93 | 93 | |
| 94 | 94 | |
| 95 | -COMPTEL Science Analysis scripts | |
| 96 | --------------------------------- | |
| 95 | +COMPTEL analysis scripts | |
| 96 | +------------------------ | |
| 97 | 97 | |
| 98 | 98 | .. toctree:: |
| 99 | 99 | :maxdepth: 1 | ... | ... |
doc/source/users/tutorials/comptel/binning.rst
0 → 100755
| 1 | +.. _comptel_binning: | |
| 2 | + | |
| 3 | +Binning the data | |
| 4 | +---------------- | |
| 5 | + | |
| 6 | + .. admonition:: What you will learn | |
| 7 | + | |
| 8 | + You will learn how to bin COMPTEL data for an analysis with ctools. | |
| 9 | + | |
| 10 | + | |
| 11 | +Data need to be binned for the analysis with ctools. The data are binned | |
| 12 | +in three-dimensional data cubes, called ``DRI`` (Data Required for Imaging). | |
| 13 | +``DRI`` datasets are spanned by the scatter directions :math:`\chi` and | |
| 14 | +:math:`\psi` and the Compton scatter angle :math:`\bar{\varphi}`. | |
| 15 | +Binned data products for an observation include event data (``DRE``), | |
| 16 | +geometry factors (``DRG``) and a background model (``DRB``). In addition, | |
| 17 | +a two-dimensional exposure map (``DRX``) is needed. Finally, the binned | |
| 18 | +data products also include the Instrument Response Function in the so-called | |
| 19 | +``IAQ`` format, which is a two-dimensional map that provides the interaction | |
| 20 | +probabilities as function of :math:`\varphi_{\rm geo}` and :math:`\bar{\varphi}` | |
| 21 | + | |
| 22 | +You bin the data with the :ref:`comobsbin` tool. Binned data products will be | |
| 23 | +written in a so-called data store so that they can be reused in different analyses. | |
| 24 | +:ref:`comobsbin` will only create binned data files that do not yet exist | |
| 25 | +in the datastore. The example below shows how you create binned data products | |
| 26 | +for viewing period ``0001``. | |
| 27 | + | |
| 28 | +.. code-block:: bash | |
| 29 | + | |
| 30 | + $ comobsbin | |
| 31 | + Input observation definition file [obs.xml] | |
| 32 | + Response type (MODEL|SIM2|SIM3) [MODEL] | |
| 33 | + Algorithm for defining energy bins (FILE|LIN|LOG) [FILE] LOG | |
| 34 | + Minimum energy (MeV) (0.05-50.0) [0.75] | |
| 35 | + Maximum energy (MeV) (0.05-50.0) [30.0] | |
| 36 | + Number of energy bins (1-20) [1] 4 | |
| 37 | + Phase expression in the format phasemin0-phasemax0;phasemin1-phasemax1;... [NONE] | |
| 38 | + Coordinate system (CEL - celestial, GAL - galactic) (CEL|GAL) [CEL] | |
| 39 | + Projection method (AIT|AZP|CAR|GLS|MOL|SFL|SIN|STG|TAN) [TAN] | |
| 40 | + Output folder for files [$COMDATASTORE] binned | |
| 41 | + Output observation definition file [obs_binned.xml] | |
| 42 | + | |
| 43 | +.. warning:: | |
| 44 | + | |
| 45 | + Note that the creation of binned data products is relatively time | |
| 46 | + consuming, in particular for geometry (``DRG``) and exposure | |
| 47 | + files (``DRX``). :ref:`comobsbin` may typically take between | |
| 48 | + 30 min and 2 hours to process the data for one viewing period, | |
| 49 | + depending on the operating system and processor speed. | |
| 50 | + | |
| 51 | +:ref:`comobsbin` produces on output an | |
| 52 | +:ref:`observation definition file <glossary_obsdef>` | |
| 53 | +which in the example is named ``obs_binned.xml``. The content of this file | |
| 54 | +is shown below. According to the user parameter, the energy interval | |
| 55 | +0.75-30 MeV was split into four logarithmically spaced energy bins, | |
| 56 | +and a model Instrument Response Function was computed for each of the | |
| 57 | +energy bins. :ref:`comobsbin` also generates a Phibar-normalised geometry | |
| 58 | +function as a first order approximation of the instrumental background model. | |
| 59 | + | |
| 60 | +.. code-block:: bash | |
| 61 | + | |
| 62 | + <?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
| 63 | + <observation_list title="observation list"> | |
| 64 | + <observation name="CRAB" id="vp0001_0_000750-001886keV" instrument="COM"> | |
| 65 | + <parameter name="DRE" file="binned/vp0001_0_cel_dre_000750-001886keV.fits" /> | |
| 66 | + <parameter name="DRB" file="binned/vp0001_0_cel_drb_000750-001886keV.fits" /> | |
| 67 | + <parameter name="DRG" file="binned/vp0001_0_cel_drg.fits" /> | |
| 68 | + <parameter name="DRX" file="binned/vp0001_0_drx.fits" /> | |
| 69 | + <parameter name="IAQ" value="binned/iaq_000750-001886keV.fits" /> | |
| 70 | + </observation> | |
| 71 | + <observation name="CRAB" id="vp0001_0_001886-004743keV" instrument="COM"> | |
| 72 | + <parameter name="DRE" file="binned/vp0001_0_cel_dre_001886-004743keV.fits" /> | |
| 73 | + <parameter name="DRB" file="binned/vp0001_0_cel_drb_001886-004743keV.fits" /> | |
| 74 | + <parameter name="DRG" file="binned/vp0001_0_cel_drg.fits" /> | |
| 75 | + <parameter name="DRX" file="binned/vp0001_0_drx.fits" /> | |
| 76 | + <parameter name="IAQ" value="binned/iaq_001886-004743keV.fits" /> | |
| 77 | + </observation> | |
| 78 | + <observation name="CRAB" id="vp0001_0_004743-011929keV" instrument="COM"> | |
| 79 | + <parameter name="DRE" file="binned/vp0001_0_cel_dre_004743-011929keV.fits" /> | |
| 80 | + <parameter name="DRB" file="binned/vp0001_0_cel_drb_004743-011929keV.fits" /> | |
| 81 | + <parameter name="DRG" file="binned/vp0001_0_cel_drg.fits" /> | |
| 82 | + <parameter name="DRX" file="binned/vp0001_0_drx.fits" /> | |
| 83 | + <parameter name="IAQ" value="binned/iaq_004743-011929keV.fits" /> | |
| 84 | + </observation> | |
| 85 | + <observation name="CRAB" id="vp0001_0_011929-029999keV" instrument="COM"> | |
| 86 | + <parameter name="DRE" file="binned/vp0001_0_cel_dre_011929-029999keV.fits" /> | |
| 87 | + <parameter name="DRB" file="binned/vp0001_0_cel_drb_011929-029999keV.fits" /> | |
| 88 | + <parameter name="DRG" file="binned/vp0001_0_cel_drg.fits" /> | |
| 89 | + <parameter name="DRX" file="binned/vp0001_0_drx.fits" /> | |
| 90 | + <parameter name="IAQ" value="binned/iaq_011929-029999keV.fits" /> | |
| 91 | + </observation> | |
| 92 | + </observation_list> | ... | ... |
doc/source/users/tutorials/comptel/download.rst
0 → 100755
| 1 | +.. _comptel_download: | |
| 2 | + | |
| 3 | +Download COMPTEL data | |
| 4 | +--------------------- | |
| 5 | + | |
| 6 | + .. admonition:: What you will learn | |
| 7 | + | |
| 8 | + You will learn how to download COMPTEL data for an analysis with | |
| 9 | + ctools. | |
| 10 | + | |
| 11 | + | |
| 12 | +Using HEASARC's Xamin interface | |
| 13 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| 14 | + | |
| 15 | +You can download COMPTEL data from the HEASARC data server through the | |
| 16 | +`Xamin Web Interface <https://heasarc.gsfc.nasa.gov/xamin/>`_. | |
| 17 | +As example, the figure below shows a request for data around the Crab pulsar. | |
| 18 | + | |
| 19 | +.. figure:: download_query.png | |
| 20 | + :width: 600px | |
| 21 | + :align: center | |
| 22 | + | |
| 23 | + *Xamin Web Interface to query COMPTEL data* | |
| 24 | + | |
| 25 | +Click on the button ``"Show table"`` in the upper left which opens a new | |
| 26 | +window that shows all available data sets. Click on the ``+`` symbol of an | |
| 27 | +observation identifier to show all available data products. In the example | |
| 28 | +below we selected that data products for obsid ``c.vp0001_0``, | |
| 29 | +which is the COMPTEL viewing period ``0001``, and inspected specifically | |
| 30 | +the Event and housekeeping data. | |
| 31 | + | |
| 32 | +.. figure:: download_products.png | |
| 33 | + :width: 600px | |
| 34 | + :align: center | |
| 35 | + | |
| 36 | + *Available COMPTEL data products for viewing period 0001* | |
| 37 | + | |
| 38 | +.. note:: | |
| 39 | + | |
| 40 | + The COMPTEL obervations are divided into so-called viewing periods (``vp``) of | |
| 41 | + typically 14 days. The Crab nebula was observed during many viewing periods. | |
| 42 | + In this example, the data for the viewing period ``0001`` were selected. | |
| 43 | + | |
| 44 | +.. note:: | |
| 45 | + | |
| 46 | + The CGRO mission was devided into nine mission phases that correspond to the | |
| 47 | + nine years of satellite operations. Viewing periods for ``phase01`` start | |
| 48 | + with ``00``, viewing periods for ``phase02`` start with ``02``, and so on. | |
| 49 | + | |
| 50 | + | |
| 51 | +Clicking on the carts of files will add data products to your Data Products | |
| 52 | +Cart for download. In the example below, we added all Orbit/Aspect Data | |
| 53 | +files, a Processed Event file and the Exposure Time file. The latter | |
| 54 | +is actually a misnomer, since the corresponding file does not contain the | |
| 55 | +exposure time but the Good Time Intervals for viewing period ``0001``. | |
| 56 | + | |
| 57 | +.. figure:: download_cart.png | |
| 58 | + :width: 600px | |
| 59 | + :align: center | |
| 60 | + | |
| 61 | + *Data products cart for viewing period 0001* | |
| 62 | + | |
| 63 | +Clicking on the ``"Download As Tar File"`` tab will download all data products | |
| 64 | +in a single tar file. Once the download is finished you need to put the | |
| 65 | +data in a standardised directory structure using the following commands: | |
| 66 | + | |
| 67 | +.. code-block:: bash | |
| 68 | + | |
| 69 | + $ mkdir -p data/phase01 | |
| 70 | + $ tar xvfz xamin_download.tar.gz -C data/phase01/ | |
| 71 | + x vp0001_0/m10695_tim.fits.gz | |
| 72 | + x vp0001_0/m20037_oad.fits.gz | |
| 73 | + x vp0001_0/m20039_oad.fits.gz | |
| 74 | + x vp0001_0/m20041_oad.fits.gz | |
| 75 | + x vp0001_0/m20045_oad.fits.gz | |
| 76 | + x vp0001_0/m20048_oad.fits.gz | |
| 77 | + x vp0001_0/m20050_oad.fits.gz | |
| 78 | + x vp0001_0/m20054_oad.fits.gz | |
| 79 | + x vp0001_0/m20058_oad.fits.gz | |
| 80 | + x vp0001_0/m20064_oad.fits.gz | |
| 81 | + x vp0001_0/m20066_oad.fits.gz | |
| 82 | + x vp0001_0/m20068_oad.fits.gz | |
| 83 | + x vp0001_0/m20071_oad.fits.gz | |
| 84 | + x vp0001_0/m20073_oad.fits.gz | |
| 85 | + x vp0001_0/m20078_oad.fits.gz | |
| 86 | + x vp0001_0/m20081_oad.fits.gz | |
| 87 | + x vp0001_0/m28511_evp.fits.gz | |
| 88 | + | |
| 89 | +.. note:: | |
| 90 | + | |
| 91 | + ctools expects that the COMPTEL data from HEASARC are stored in a standardised | |
| 92 | + directory structure that starts with a top-level data directory of any name | |
| 93 | + under which there are directories for each of the nine mission phases: | |
| 94 | + | |
| 95 | + .. code-block:: bash | |
| 96 | + | |
| 97 | + data | |
| 98 | + data/phase01 | |
| 99 | + data/phase02 | |
| 100 | + data/phase03 | |
| 101 | + data/phase04 | |
| 102 | + data/phase05 | |
| 103 | + data/phase06 | |
| 104 | + data/phase07 | |
| 105 | + data/phase08 | |
| 106 | + data/phase09 | |
| 107 | + | |
| 108 | +Once you untared and installed the downloaded data you need to create a database for | |
| 109 | +ctools analysis using :ref:`comgendb`. Before that we recommend to create a ``COMDATA`` | |
| 110 | +environment variable that holds the absolute path to the COMPTEL data archive. You do | |
| 111 | +these steps with the following commands: | |
| 112 | + | |
| 113 | +.. code-block:: bash | |
| 114 | + | |
| 115 | + $ export COMDATA=$PWD/data | |
| 116 | + $ comgendb | |
| 117 | + COMPTEL HEASARC archive directory [$COMDATA] | |
| 118 | + COMPTEL database directory [$COMDATA/dbase] | |
| 119 | + | |
| 120 | +You are now setup for COMPTEL science data analysis. | |
| 121 | + | |
| 122 | + | |
| 123 | +Using :ref:`comgendb` | |
| 124 | +~~~~~~~~~~~~~~~~~~~~~ | |
| 125 | + | |
| 126 | +You may alternatively use :ref:`comgendb` to download the full HEASARC COMPTEL | |
| 127 | +database on your computer. This requires ``wget`` to be installed on your system. | |
| 128 | +Downloading the full archive is useful if you intend to analyse more than a few | |
| 129 | +viewing periods. You can download the full archive and generate a database for | |
| 130 | +this archive using | |
| 131 | + | |
| 132 | +.. code-block:: bash | |
| 133 | + | |
| 134 | + $ export COMDATA=$PWD/data | |
| 135 | + $ comgendb download=yes | |
| 136 | + COMPTEL HEASARC archive directory [$COMDATA] | |
| 137 | + COMPTEL database directory [$COMDATA/dbase] | |
| 138 | + | |
| 139 | +Once you have setup your database in that way you have all data needed for COMPTEL | |
| 140 | +data analysis on your system and you never need to repeat this step again. | |
| 141 | + | |
| 142 | +.. warning:: | |
| 143 | + | |
| 144 | + The download of the full COMPTEL database from HEASARC will take several | |
| 145 | + hours. | ... | ... |
doc/source/users/tutorials/comptel/download_cart.png
0 → 100644
232 KB
doc/source/users/tutorials/comptel/download_products.png
0 → 100644
265 KB
doc/source/users/tutorials/comptel/download_query.png
0 → 100644
313 KB
doc/source/users/tutorials/comptel/fitting.rst
0 → 100755
| 1 | +.. _comptel_fitting: | |
| 2 | + | |
| 3 | +Fitting the data | |
| 4 | +---------------- | |
| 5 | + | |
| 6 | + .. admonition:: What you will learn | |
| 7 | + | |
| 8 | + You will learn how you fit a model to COMPTEL data. | |
| 9 | + | |
| 10 | + | |
| 11 | +Now you are prepared to fit the model to COMPTEL data. You do this using | |
| 12 | +the :ref:`comlixfit` script. In the example below the script is run with the | |
| 13 | +``debug=yes`` option so that the fit results are directly displayed in the | |
| 14 | +terminal. :ref:`comlixfit` performs an iterative background fitting using the | |
| 15 | +SRCLIX approach; in particuliar, the BGDLIXE method is used for background | |
| 16 | +model computation. | |
| 17 | + | |
| 18 | +The fit took 3 SRCLIX iterations to converge. The Crab is detected with | |
| 19 | +a test statistic value of 1074.78. The fit determined the position of the | |
| 20 | +gamma-ray source and the spectral power law parameters, which are the intensity | |
| 21 | +at a pivot energy of 1 MeV and the spectral index. As a quality check, the | |
| 22 | +fit predicted 517813.013 events in the model which is close to the observed | |
| 23 | +number of 517813 events. | |
| 24 | + | |
| 25 | +.. code-block:: bash | |
| 26 | + | |
| 27 | + $ comlixfit debug=yes | |
| 28 | + Input observation definition file [obs.xml] obs_binned.xml | |
| 29 | + Input model definition file [models.xml] | |
| 30 | + Method for background computation (PHINOR|BGDLIXA|BGDLIXE) [BGDLIXE] | |
| 31 | + Output observation definition file [outobs.xml] | |
| 32 | + Output model definition file [results.xml] | |
| 33 | + ... | |
| 34 | + 2022-03-17T13:20:40: +====================+ | |
| 35 | + 2022-03-17T13:20:40: | Input observations | | |
| 36 | + 2022-03-17T13:20:40: +====================+ | |
| 37 | + 2022-03-17T13:20:40: === GObservations === | |
| 38 | + 2022-03-17T13:20:40: Number of observations ....: 4 | |
| 39 | + 2022-03-17T13:20:40: Number of models ..........: 5 | |
| 40 | + 2022-03-17T13:20:40: Number of observed events .: 517813 | |
| 41 | + 2022-03-17T13:20:40: Number of predicted events : 0 | |
| 42 | + 2022-03-17T13:20:40: | |
| 43 | + 2022-03-17T13:20:40: +============================================+ | |
| 44 | + 2022-03-17T13:20:40: | Iterative maximum likelihood model fitting | | |
| 45 | + 2022-03-17T13:20:40: +============================================+ | |
| 46 | + 2022-03-17T13:20:48: logL after iteration 1 ....: -28465.83123 | |
| 47 | + 2022-03-17T13:20:55: logL after iteration 2 ....: -28466.41211 (0.58088) | |
| 48 | + 2022-03-17T13:21:00: logL after iteration 3 ....: -28466.29714 (-0.11498) | |
| 49 | + 2022-03-17T13:21:09: logL after final iteration : -28466.41290 (0.00079) | |
| 50 | + 2022-03-17T13:21:09: | |
| 51 | + 2022-03-17T13:21:09: +=========================================+ | |
| 52 | + 2022-03-17T13:21:09: | Maximum likelihood optimisation results | | |
| 53 | + 2022-03-17T13:21:09: +=========================================+ | |
| 54 | + 2022-03-17T13:21:09: === GOptimizerLM === | |
| 55 | + 2022-03-17T13:21:09: Optimized function value ..: -28466.413 | |
| 56 | + 2022-03-17T13:21:09: Absolute precision ........: 0.005 | |
| 57 | + 2022-03-17T13:21:09: Acceptable value decrease .: 0 | |
| 58 | + 2022-03-17T13:21:09: Optimization status .......: converged | |
| 59 | + 2022-03-17T13:21:09: Number of parameters ......: 106 | |
| 60 | + 2022-03-17T13:21:09: Number of free parameters .: 99 | |
| 61 | + 2022-03-17T13:21:09: Number of iterations ......: 4 | |
| 62 | + 2022-03-17T13:21:09: Lambda ....................: 0.1 | |
| 63 | + 2022-03-17T13:21:09: Total number of iterations : 14 | |
| 64 | + 2022-03-17T13:21:09: Maximum log likelihood ....: 28466.4129009 | |
| 65 | + 2022-03-17T13:21:09: Observed events (Nobs) ...: 517813.0 | |
| 66 | + 2022-03-17T13:21:09: Predicted events (Npred) ..: 517813.012556 | |
| 67 | + 2022-03-17T13:21:09: Nobs - Npred ..............: -0.012555927271 | |
| 68 | + 2022-03-17T13:21:09: === GModels === | |
| 69 | + 2022-03-17T13:21:09: Number of models ..........: 5 | |
| 70 | + 2022-03-17T13:21:09: Number of parameters ......: 106 | |
| 71 | + 2022-03-17T13:21:09: === GModelSky === | |
| 72 | + 2022-03-17T13:21:09: Name ......................: Crab | |
| 73 | + 2022-03-17T13:21:09: Instruments ...............: all | |
| 74 | + 2022-03-17T13:21:09: Test Statistic ............: 1074.78358831939 | |
| 75 | + 2022-03-17T13:21:09: Observation identifiers ...: all | |
| 76 | + 2022-03-17T13:21:09: Model type ................: PointSource | |
| 77 | + 2022-03-17T13:21:09: Model components ..........: "PointSource" * "PowerLaw" * "Constant" | |
| 78 | + 2022-03-17T13:21:09: Number of parameters ......: 6 | |
| 79 | + 2022-03-17T13:21:09: Number of spatial par's ...: 2 | |
| 80 | + 2022-03-17T13:21:09: RA .......................: 83.7688330639726 +/- 0.111131701366959 deg (free,scale=1) | |
| 81 | + 2022-03-17T13:21:09: DEC ......................: 21.6073511262309 +/- 0.101155131386771 deg (free,scale=1) | |
| 82 | + 2022-03-17T13:21:09: Number of spectral par's ..: 3 | |
| 83 | + 2022-03-17T13:21:09: Prefactor ................: 0.00213237276990501 +/- 9.60239430063358e-05 [1e-25,infty[ ph/cm2/s/MeV (free,scale=0.002,gradient) | |
| 84 | + 2022-03-17T13:21:09: Index ....................: -2.1249932516377 +/- 0.0369030627304123 [-10,10] (free,scale=-2,gradient) | |
| 85 | + 2022-03-17T13:21:09: PivotEnergy ..............: 1 MeV (fixed,scale=1,gradient) | |
| 86 | + 2022-03-17T13:21:09: Number of temporal par's ..: 1 | |
| 87 | + 2022-03-17T13:21:09: Normalization ............: 1 (relative value) (fixed,scale=1,gradient) | |
| 88 | + 2022-03-17T13:21:09: Number of scale par's .....: 0 | |
| 89 | + | |
| 90 | +.. note:: | |
| 91 | + | |
| 92 | + To shorten the output, omitted lines were replaced by three dots. | ... | ... |
doc/source/users/tutorials/comptel/howto_comptel_1.8MeV_tsmap.png deleted
87.6 KB
doc/source/users/tutorials/comptel/howto_comptel_1.8MeV_tsmap_5vp.png deleted
59.1 KB
doc/source/users/tutorials/comptel/howto_comptel_archive.png deleted
174 KB
doc/source/users/tutorials/comptel/howto_comptel_butterfly.png deleted
120 KB
doc/source/users/tutorials/comptel/howto_comptel_butterfly.rst deleted
| 1 | -.. _howto_comptel_butterfly: | |
| 2 | - | |
| 3 | -Generate a butterfly diagram for a model component | |
| 4 | --------------------------------------------------- | |
| 5 | - | |
| 6 | - .. admonition:: What you will learn | |
| 7 | - | |
| 8 | - You will learn how to use :ref:`ctbutterfly` to create a butterfly diagram | |
| 9 | - for a model component from COMPTEL data. | |
| 10 | - | |
| 11 | -A butterfly diagram shows the envelope of all spectral models that are | |
| 12 | -statistically compatible with the data. You can create such a butterfly | |
| 13 | -diagram for the Crab using the :ref:`ctbutterfly` tool by providing | |
| 14 | -the | |
| 15 | -:ref:`model definition file <glossary_moddef>` | |
| 16 | -output file from :ref:`ctlike` as input: | |
| 17 | - | |
| 18 | -.. code-block:: bash | |
| 19 | - | |
| 20 | - $ ctbutterfly fit=yes | |
| 21 | - Input event list, counts cube or observation definition XML file [events.fits] obs.xml | |
| 22 | - Source of interest [Crab] | |
| 23 | - Input model definition XML file [$CTOOLS/share/models/crab.xml] models.xml | |
| 24 | - Start value for first energy bin in TeV [0.1] 0.00000075 | |
| 25 | - Stop value for last energy bin in TeV [100.0] 0.00003 | |
| 26 | - Output ASCII file [butterfly.txt] | |
| 27 | - | |
| 28 | -:ref:`ctbutterfly` produces the ASCII file ``butterfly.txt`` that contains | |
| 29 | -the envelope of the butterfly diagram. The figure below gives a graphical | |
| 30 | -representation of the envelope. The red data points show the combined | |
| 31 | -Crab nebular and pulsar spectrum from | |
| 32 | -`Kuiper et al. 2001, A&A, 378, 918 <http://cdsads.u-strasbg.fr/abs/2001A%26A...378..918K>`_ | |
| 33 | -for comparison. | |
| 34 | - | |
| 35 | -.. figure:: howto_comptel_butterfly.png | |
| 36 | - :width: 600px | |
| 37 | - :align: center | |
| 38 | - | |
| 39 | - *Butterfly diagram of the fitted Crab spectrum* |
doc/source/users/tutorials/comptel/howto_comptel_datasets.jpg deleted
238 KB
doc/source/users/tutorials/comptel/howto_comptel_download.rst deleted
| 1 | -.. _howto_comptel_download: | |
| 2 | - | |
| 3 | -Download COMPTEL data | |
| 4 | ---------------------- | |
| 5 | - | |
| 6 | - .. admonition:: What you will learn | |
| 7 | - | |
| 8 | - You will learn how to prepare COMPTEL data for an analysis with | |
| 9 | - ctools. | |
| 10 | - | |
| 11 | - | |
| 12 | -COMPTEL data can be downloaded from the HEASARC data server through the | |
| 13 | -`Xamin Web Interface <https://heasarc.gsfc.nasa.gov/xamin/>`_. | |
| 14 | -As example, the figure below shows a request for data around the Crab pulsar. | |
| 15 | - | |
| 16 | -.. figure:: howto_comptel_query.jpg | |
| 17 | - :width: 600px | |
| 18 | - :align: center | |
| 19 | - | |
| 20 | - *Xamin Web Interface to query COMPTEL data* | |
| 21 | - | |
| 22 | -Click on the button ``Show table`` in the upper left which opens a new | |
| 23 | -window that shows all available data sets. Click on the ``+`` symbol of a | |
| 24 | -dataset to get a link to the data archive directory. | |
| 25 | - | |
| 26 | -.. figure:: howto_comptel_datasets.jpg | |
| 27 | - :width: 600px | |
| 28 | - :align: center | |
| 29 | - | |
| 30 | - *Available COMPTEL data for the Crab region* | |
| 31 | - | |
| 32 | -Clicking on the link brings you to the archive directory, shown below. | |
| 33 | - | |
| 34 | -.. figure:: howto_comptel_archive.png | |
| 35 | - :width: 600px | |
| 36 | - :align: center | |
| 37 | - | |
| 38 | - *COMPTEL data archive for viewing period 0001* | |
| 39 | - | |
| 40 | -The COMPTEL obervations were divided in so-called viewing periods (``vp``) of | |
| 41 | -typically 14 days. The Crab nebula was observed during many viewing periods. | |
| 42 | -In this example, the data for the viewing period 0001 was selected. From the | |
| 43 | -archive you now have to download the following files: | |
| 44 | - | |
| 45 | -* ``m32171_drx.fits.gz`` - Exposure map | |
| 46 | -* ``m34997_drg.fits.gz`` - Geometry factors (needed for response computation) | |
| 47 | -* ``m50438_dre.fits.gz`` - Counts cube for energy interval 0.75 - 1 MeV | |
| 48 | -* ``m50439_dre.fits.gz`` - Counts cube for energy interval 1 - 3 MeV | |
| 49 | -* ``m50440_dre.fits.gz`` - Counts cube for energy interval 3 - 10 MeV | |
| 50 | -* ``m50441_dre.fits.gz`` - Counts cube for energy interval 10 - 30 MeV | |
| 51 | - | |
| 52 | -The COMPTEL data are usually processed for four standard energy intervals, | |
| 53 | -and a 3-dimensional counts cube exists for each of these energy intervals. | |
| 54 | -Counts cubes are always suffixed ``_dre``, exposures ``_drx`` and geometry | |
| 55 | -factors ``_drg``. | |
| 56 | - | |
| 57 | -.. warning:: | |
| 58 | - The files in the HEASARC archive have a ``.gz`` extension but apparently | |
| 59 | - the files are not gzipped. You may however leave the file names as they | |
| 60 | - are and specify later the file names without the ``.gz`` extension since | |
| 61 | - reading of gzipped files is transparent for ctools. |
doc/source/users/tutorials/comptel/howto_comptel_dri.rst deleted
| 1 | -.. _howto_comptel_dri: | |
| 2 | - | |
| 3 | -Generating your own event selection | |
| 4 | ------------------------------------ | |
| 5 | - | |
| 6 | - .. admonition:: What you will learn | |
| 7 | - | |
| 8 | - You will learn how to use the GammaLib classes to generate your own | |
| 9 | - data cubes and response functions for a COMPTEL analysis. | |
| 10 | - | |
| 11 | -The data in the | |
| 12 | -`HEASARC archive <https://heasarc.gsfc.nasa.gov/xamin/>`_ | |
| 13 | -comprises counts cubes for the standard COMPTEL energy ranges (0.75-1 MeV, | |
| 14 | -1-3 MeV, 3-10 MeV and 10-30 MeV) per viewing period. In case that you want | |
| 15 | -to analyse a different energy range, or that you want to perform a different | |
| 16 | -event selection, you need to create ``DRE``, ``DRG``, ``DRB`` and ``DRX`` | |
| 17 | -data and the corresponding ``IAQ`` response function yourself. You can do | |
| 18 | -this with GammaLib. | |
| 19 | - | |
| 20 | -Let's assume you want to make a 1.8 MeV line map of the Galactic centre. | |
| 21 | -You can use for this the data of the COMPTEL viewing period 16 in phase 1 of | |
| 22 | -the mission. Go to the | |
| 23 | -`HEASARC archive <https://heasarc.gsfc.nasa.gov/xamin/>`_ | |
| 24 | -and download the ``EVP``, ``TIM`` and ``OAD`` datasets. Once this is done, | |
| 25 | -create the following | |
| 26 | -:ref:`observation definition file <glossary_obsdef>`: | |
| 27 | - | |
| 28 | -.. code-block:: xml | |
| 29 | - | |
| 30 | - <?xml version="1.0" standalone="no"?> | |
| 31 | - <observation_list title="observation library"> | |
| 32 | - <observation name="GC" id="000160" instrument="COM"> | |
| 33 | - <parameter name="EVP" file="$COMDATA/phase01/vp0016_0/m28846_evp.fits"/> | |
| 34 | - <parameter name="TIM" file="$COMDATA/phase01/vp0016_0/m11765_tim.fits"/> | |
| 35 | - <parameter name="OAD" file="$COMDATA/phase01/vp0016_0/m20745_oad.fits"/> | |
| 36 | - <parameter name="OAD" file="$COMDATA/phase01/vp0016_0/m20750_oad.fits"/> | |
| 37 | - <parameter name="OAD" file="$COMDATA/phase01/vp0016_0/m20753_oad.fits"/> | |
| 38 | - <parameter name="OAD" file="$COMDATA/phase01/vp0016_0/m20759_oad.fits"/> | |
| 39 | - <parameter name="OAD" file="$COMDATA/phase01/vp0016_0/m20760_oad.fits"/> | |
| 40 | - <parameter name="OAD" file="$COMDATA/phase01/vp0016_0/m20761_oad.fits"/> | |
| 41 | - <parameter name="OAD" file="$COMDATA/phase01/vp0016_0/m20762_oad.fits"/> | |
| 42 | - <parameter name="OAD" file="$COMDATA/phase01/vp0016_0/m20764_oad.fits"/> | |
| 43 | - <parameter name="OAD" file="$COMDATA/phase01/vp0016_0/m20770_oad.fits"/> | |
| 44 | - <parameter name="OAD" file="$COMDATA/phase01/vp0016_0/m20771_oad.fits"/> | |
| 45 | - <parameter name="OAD" file="$COMDATA/phase01/vp0016_0/m20772_oad.fits"/> | |
| 46 | - <parameter name="OAD" file="$COMDATA/phase01/vp0016_0/m20785_oad.fits"/> | |
| 47 | - <parameter name="OAD" file="$COMDATA/phase01/vp0016_0/m20786_oad.fits"/> | |
| 48 | - <parameter name="OAD" file="$COMDATA/phase01/vp0016_0/m20787_oad.fits"/> | |
| 49 | - <parameter name="OAD" file="$COMDATA/phase01/vp0016_0/m20788_oad.fits"/> | |
| 50 | - <parameter name="OAD" file="$COMDATA/phase01/vp0016_0/m20789_oad.fits"/> | |
| 51 | - </observation> | |
| 52 | - </observation_list> | |
| 53 | - | |
| 54 | -.. note:: | |
| 55 | - There exist two formats for the | |
| 56 | - :ref:`observation definition file <glossary_obsdef>` | |
| 57 | - for COMPTEL data, one that describes the locations of the COMPTEL | |
| 58 | - data space cubes and response functions, and one that desribes | |
| 59 | - the location of an ``EVP`` event list, a ``TIM`` Good Time | |
| 60 | - Interval file, and an arbitrary number of ``OAD`` Orbit Aspect | |
| 61 | - Data files. In general there exists one ``OAD`` per day, while | |
| 62 | - there is one ``EVP`` event file and one ``TIM`` Good Time Interval | |
| 63 | - file per viewing period. | |
| 64 | - | |
| 65 | - In the example above, the environment variable ``$COMDATA`` was set | |
| 66 | - to the root directory of the COMPTEL archive. | |
| 67 | - | |
| 68 | -Now you are ready to generate the ``DRE``, ``DRG``, ``DRB``, ``DRX`` and | |
| 69 | -``IAQ`` datasets that you need for a ctools analysis of COMPTEL data. | |
| 70 | -This will take a few minutes. Start | |
| 71 | -`Python <https://www.python.org>`_ | |
| 72 | -in your terminal and type the following: | |
| 73 | - | |
| 74 | -.. code-block:: python | |
| 75 | - | |
| 76 | - # You need GammaLib, of course ;) | |
| 77 | - import gammalib | |
| 78 | - | |
| 79 | - # Create sky map for the definition of the DRE and DRG data cubes | |
| 80 | - cube = gammalib.GSkyMap('TAN', 'GAL', 0.0, 20.0, 1.0, 1.0, 80, 80) | |
| 81 | - | |
| 82 | - # Create sky map for the definition of the DRX exposure map | |
| 83 | - expo = gammalib.GSkyMap('CAR', 'GAL', 0.0, 0.0, 1.0, 1.0, 360, 180) | |
| 84 | - | |
| 85 | - # Allocate DRE, DRG and DRX. DRE and DRG have a 3rd Phibar dimension, starting at 0.0 deg, | |
| 86 | - # with a binsize of 2.0 deg, and 25 Phibar layers. | |
| 87 | - dre = gammalib.GCOMDri(cube, 0.0, 2.0, 25) | |
| 88 | - drg = gammalib.GCOMDri(cube, 0.0, 2.0, 25) | |
| 89 | - drx = gammalib.GCOMDri(expo) | |
| 90 | - | |
| 91 | - # Set DRE energy range to 1.7-1.9 MeV, DRG and DRX are energy independent | |
| 92 | - dre.ebounds(gammalib.GEbounds(gammalib.GEnergy(1.7, 'MeV'), | |
| 93 | - gammalib.GEnergy(1.9, 'MeV'))) | |
| 94 | - | |
| 95 | - # Load observation definition XML file 'obs.xml' (the file you created above) | |
| 96 | - obsdef = gammalib.GObservations('obs.xml') | |
| 97 | - | |
| 98 | - # Compute DRE, DRG and DRX for the first observation in the XML file | |
| 99 | - dre.compute_dre(obsdef[0]) | |
| 100 | - drg.compute_drg(obsdef[0]) | |
| 101 | - drx.compute_drx(obsdef[0]) | |
| 102 | - | |
| 103 | - # Save DRE, DRG and DRX ('True' indicates to overwrite any existing file) | |
| 104 | - dre.save('dre.fits', True) | |
| 105 | - drg.save('drg.fits', True) | |
| 106 | - drx.save('drx.fits', True) | |
| 107 | - | |
| 108 | - # Load DRE and DRG to generate a DRB background model cube | |
| 109 | - dre = gammalib.GCOMDri('dre.fits') | |
| 110 | - drb = gammalib.GCOMDri('drg.fits') | |
| 111 | - | |
| 112 | - # Normalise DRB on the Phibar distribution of the DRE cube | |
| 113 | - npix = dre.nchi() * dre.npsi() | |
| 114 | - for k in range(dre.nphibar()): | |
| 115 | - sum_dre = 0.0 | |
| 116 | - sum_drb = 0.0 | |
| 117 | - for i in range(npix): | |
| 118 | - index = i + k * npix | |
| 119 | - sum_dre += dre[index] | |
| 120 | - sum_drb += drb[index] | |
| 121 | - if sum_drb > 0: | |
| 122 | - for i in range(npix): | |
| 123 | - index = i + k * npix | |
| 124 | - drb[index] *= sum_dre / sum_drb | |
| 125 | - | |
| 126 | - # Save DRB | |
| 127 | - drb.save('drb.fits', True) | |
| 128 | - | |
| 129 | - # Initialise IAQ that will hold the response function | |
| 130 | - iaq = gammalib.GCOMIaq(55.0, 1.0, 50.0, 2.0) | |
| 131 | - | |
| 132 | - # Compute IAQ for a line energy of 1.809 MeV and an energy band of 1.7-1.9 MeV | |
| 133 | - iaq.set(gammalib.GEnergy(1.809, 'MeV'), | |
| 134 | - gammalib.GEbounds(gammalib.GEnergy(1.7, 'MeV'), | |
| 135 | - gammalib.GEnergy(1.9, 'MeV'))) | |
| 136 | - | |
| 137 | - # Save IAQ and you are done | |
| 138 | - iaq.save('iaq.fits', True) | |
| 139 | - | |
| 140 | -Now you have everything at hand to perform a COMPTEL maximum likelihood | |
| 141 | -analysis. For that purpoe you need to gather all the datasets that you | |
| 142 | -just created in a new | |
| 143 | -:ref:`observation definition file <glossary_obsdef>` | |
| 144 | -that should look as follows: | |
| 145 | - | |
| 146 | -.. code-block:: xml | |
| 147 | - | |
| 148 | - <?xml version="1.0" standalone="no"?> | |
| 149 | - <observation_list title="observation library"> | |
| 150 | - <observation name="GC" id="000160" instrument="COM"> | |
| 151 | - <parameter name="DRE" file="dre.fits"/> | |
| 152 | - <parameter name="DRB" file="drb.fits"/> | |
| 153 | - <parameter name="DRG" file="drg.fits"/> | |
| 154 | - <parameter name="DRX" file="drx.fits"/> | |
| 155 | - <parameter name="IAQ" value="iaq.fits"/> | |
| 156 | - </observation> | |
| 157 | - </observation_list> | |
| 158 | - | |
| 159 | -.. warning:: | |
| 160 | - Be aware that the attribute for the ``IAQ`` parameter is ``value`` and | |
| 161 | - not ``file`` since the ``IAQ`` parameter is not necessarily a file | |
| 162 | - but can be also a response name of the calibration database. | |
| 163 | - | |
| 164 | -Before doing a model fit you need a model. We included one in the ctools package | |
| 165 | -that you can find at ``$CTOOLS/share/models/comptel_howto_gc.xml``. Here the | |
| 166 | -first few lines of this model: | |
| 167 | - | |
| 168 | -.. code-block:: xml | |
| 169 | - | |
| 170 | - <?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
| 171 | - <source_library title="source library"> | |
| 172 | - <source name="GC" type="PointSource" tscalc="1"> | |
| 173 | - <spectrum type="Constant"> | |
| 174 | - <parameter name="Normalization" scale="1.0e-5" value="1.0" min="-100.0" max="100.0" free="1"/> | |
| 175 | - </spectrum> | |
| 176 | - <spatialModel type="PointSource"> | |
| 177 | - <parameter name="RA" scale="1.0" value="266.40" min="-360" max="360" free="0"/> | |
| 178 | - <parameter name="DEC" scale="1.0" value="-28.94" min="-90" max="90" free="0"/> | |
| 179 | - </spatialModel> | |
| 180 | - </source> | |
| 181 | - <source name="Background" type="DRBFitting" instrument="COM"> | |
| 182 | - <node> | |
| 183 | - <parameter name="Phibar" value="9" scale="1" min="0" max="50" free="0" /> | |
| 184 | - <parameter name="Normalization" value="1.0" scale="1" min="0" max="1000" free="1" /> | |
| 185 | - </node> | |
| 186 | - ... | |
| 187 | - <node> | |
| 188 | - <parameter name="Phibar" value="49" scale="1" min="0" max="50" free="0" /> | |
| 189 | - <parameter name="Normalization" value="1.0" scale="1" min="0" max="1000" free="1" /> | |
| 190 | - </node> | |
| 191 | - </source> | |
| 192 | - </source_library> | |
| 193 | - | |
| 194 | -This file contains a single point source at the position of the Galactic | |
| 195 | -Centre. The spectral model is a simple constant normalisation that will | |
| 196 | -return the gamma-ray line flux in units of | |
| 197 | -:math:`{\rm photons}\,{\rm cm}^{-2}\,{\rm s}^{-1}`. | |
| 198 | -For the background we do a Phibar fitting of the ``DRB`` cube. Since the | |
| 199 | -first four layers of the ``DRE`` cube are empty we start the nodes at the | |
| 200 | -fifth layer which corresponds to a Phibar value of 9 degrees. There are | |
| 201 | -subsequent nodes spaced by 2 degrees (not shown) up to a Phibar value of | |
| 202 | -49 degrees. | |
| 203 | - | |
| 204 | -Now it's time for model fitting. You can produce for example a Test Statistic | |
| 205 | -map of the region around the Galactic centre as follows: | |
| 206 | - | |
| 207 | -.. code-block:: bash | |
| 208 | - | |
| 209 | - $ cttsmap | |
| 210 | - Input event list, counts cube or observation definition XML file [events.fits] obs_dri.xml | |
| 211 | - Test source name [Crab] GC | |
| 212 | - Input model definition XML file [$CTOOLS/share/models/crab.xml] $CTOOLS/share/models/comptel_howto_gc.xml | |
| 213 | - Coordinate system (CEL - celestial, GAL - galactic) (CEL|GAL) [CEL] GAL | |
| 214 | - Projection method (AIT|AZP|CAR|GLS|MER|MOL|SFL|SIN|STG|TAN) [CAR] | |
| 215 | - First coordinate of image center in degrees (RA or galactic l) (0-360) [83.63] 0.0 | |
| 216 | - Second coordinate of image center in degrees (DEC or galactic b) (-90-90) [22.01] 0.0 | |
| 217 | - Image scale (in degrees/pixel) [0.02] 1.0 | |
| 218 | - Size of the X axis in pixels [200] 50 | |
| 219 | - Size of the Y axis in pixels [200] 30 | |
| 220 | - Output Test Statistic map file [tsmap.fits] | |
| 221 | - | |
| 222 | -Below is the resulting Test Statistic map that shows 1.8 MeV emission | |
| 223 | -following the Galactic plane and peaking near the Galactic centre. | |
| 224 | - | |
| 225 | -.. figure:: howto_comptel_1.8MeV_tsmap.png | |
| 226 | - :width: 500px | |
| 227 | - :align: center | |
| 228 | - | |
| 229 | - *1.8 MeV Test Statistic map for COMPTEL viewing period 16 of the Galactic Centre* | |
| 230 | - | |
| 231 | -It is left to you as an exercise to extend this example. To get a better | |
| 232 | -statistics you may for example combine observations. For that purpose you | |
| 233 | -can add the ``DRI`` datasets of multiple observations into single ``DRE``, | |
| 234 | -``DRG``, ``DRB`` and ``DRX`` datasets, | |
| 235 | -that's the way how the COMPTEL analysis was done. You can however also leave | |
| 236 | -the ``DRI`` datasets separate and combine their description in the | |
| 237 | -:ref:`observation definition file <glossary_obsdef>`. | |
| 238 | -To combine for example the data of viewing periods 5, 7.5, 13, 16 and 27 | |
| 239 | -the | |
| 240 | -:ref:`observation definition file <glossary_obsdef>` | |
| 241 | -should look like this: | |
| 242 | - | |
| 243 | -.. code-block:: xml | |
| 244 | - | |
| 245 | - <?xml version="1.0" standalone="no"?> | |
| 246 | - <observation_list title="observation library"> | |
| 247 | - <observation name="GC" id="000050" instrument="COM"> | |
| 248 | - <parameter name="DRE" file="dre_0050.fits"/> | |
| 249 | - <parameter name="DRB" file="drb_0050.fits"/> | |
| 250 | - <parameter name="DRG" file="drg_0050.fits"/> | |
| 251 | - <parameter name="DRX" file="drx_0050.fits"/> | |
| 252 | - <parameter name="IAQ" value="iaq.fits"/> | |
| 253 | - </observation> | |
| 254 | - <observation name="GC" id="000075" instrument="COM"> | |
| 255 | - <parameter name="DRE" file="dre_0075.fits"/> | |
| 256 | - <parameter name="DRB" file="drb_0075.fits"/> | |
| 257 | - <parameter name="DRG" file="drg_0075.fits"/> | |
| 258 | - <parameter name="DRX" file="drx_0075.fits"/> | |
| 259 | - <parameter name="IAQ" value="iaq.fits"/> | |
| 260 | - </observation> | |
| 261 | - <observation name="GC" id="000130" instrument="COM"> | |
| 262 | - <parameter name="DRE" file="dre_0130.fits"/> | |
| 263 | - <parameter name="DRB" file="drb_0130.fits"/> | |
| 264 | - <parameter name="DRG" file="drg_0130.fits"/> | |
| 265 | - <parameter name="DRX" file="drx_0130.fits"/> | |
| 266 | - <parameter name="IAQ" value="iaq.fits"/> | |
| 267 | - </observation> | |
| 268 | - <observation name="GC" id="000160" instrument="COM"> | |
| 269 | - <parameter name="DRE" file="dre_0160.fits"/> | |
| 270 | - <parameter name="DRB" file="drb_0160.fits"/> | |
| 271 | - <parameter name="DRG" file="drg_0160.fits"/> | |
| 272 | - <parameter name="DRX" file="drx_0160.fits"/> | |
| 273 | - <parameter name="IAQ" value="iaq.fits"/> | |
| 274 | - </observation> | |
| 275 | - <observation name="GC" id="000270" instrument="COM"> | |
| 276 | - <parameter name="DRE" file="dre_0270.fits"/> | |
| 277 | - <parameter name="DRB" file="drb_0270.fits"/> | |
| 278 | - <parameter name="DRG" file="drg_0270.fits"/> | |
| 279 | - <parameter name="DRX" file="drx_0270.fits"/> | |
| 280 | - <parameter name="IAQ" value="iaq.fits"/> | |
| 281 | - </observation> | |
| 282 | - </observation_list> | |
| 283 | - | |
| 284 | -The corresponding Test Statistic map is shown below. | |
| 285 | - | |
| 286 | -.. figure:: howto_comptel_1.8MeV_tsmap_5vp.png | |
| 287 | - :width: 500px | |
| 288 | - :align: center | |
| 289 | - | |
| 290 | - *1.8 MeV Test Statistic map for COMPTEL viewing periods 5, 7.5, 13, 16 and 27 of the Galactic Centre* |
doc/source/users/tutorials/comptel/howto_comptel_fitting.rst deleted
| 1 | -.. _howto_comptel_fitting: | |
| 2 | - | |
| 3 | -Fit a model to the data | |
| 4 | ------------------------ | |
| 5 | - | |
| 6 | - .. admonition:: What you will learn | |
| 7 | - | |
| 8 | - You will learn how to use :ref:`ctlike` to fit a parametric model to | |
| 9 | - COMPTEL data. | |
| 10 | - | |
| 11 | -Start with creating an | |
| 12 | -:ref:`observation definition file <glossary_obsdef>` | |
| 13 | -that defines the names of the counts cube files, geometry factor files | |
| 14 | -and exposure map files. In addition you will need background model files, | |
| 15 | -but since those are not distributed with the data you will use the geometry | |
| 16 | -factors also as background files, which is a reasonable zero order | |
| 17 | -approximation of the instrumental background distribution in COMPTEL. | |
| 18 | - | |
| 19 | -Below the | |
| 20 | -:ref:`observation definition file <glossary_obsdef>` | |
| 21 | -that is needed for the following analyses. Since the four counts cubes | |
| 22 | -correspond to the four energy bands, and every observation holds a single | |
| 23 | -counts cube, an observation has been added for every energy band. | |
| 24 | -The ``IAQ`` parameter indicates the instrument response, which needs | |
| 25 | -to be given for each band in the specified format. | |
| 26 | - | |
| 27 | -.. code-block:: xml | |
| 28 | - | |
| 29 | - <?xml version="1.0" standalone="no"?> | |
| 30 | - <observation_list title="observation library"> | |
| 31 | - <observation name="Crab" id="100001" instrument="COM"> | |
| 32 | - <parameter name="DRE" file="m50438_dre.fits"/> | |
| 33 | - <parameter name="DRB" file="m34997_drg.fits"/> | |
| 34 | - <parameter name="DRG" file="m34997_drg.fits"/> | |
| 35 | - <parameter name="DRX" file="m32171_drx.fits"/> | |
| 36 | - <parameter name="IAQ" value="ENERG(0.75-1.0)MeV"/> | |
| 37 | - </observation> | |
| 38 | - <observation name="Crab" id="200001" instrument="COM"> | |
| 39 | - <parameter name="DRE" file="m50439_dre.fits"/> | |
| 40 | - <parameter name="DRB" file="m34997_drg.fits"/> | |
| 41 | - <parameter name="DRG" file="m34997_drg.fits"/> | |
| 42 | - <parameter name="DRX" file="m32171_drx.fits"/> | |
| 43 | - <parameter name="IAQ" value="ENERG(1.0-3.0)MeV"/> | |
| 44 | - </observation> | |
| 45 | - <observation name="Crab" id="300001" instrument="COM"> | |
| 46 | - <parameter name="DRE" file="m50440_dre.fits"/> | |
| 47 | - <parameter name="DRB" file="m34997_drg.fits"/> | |
| 48 | - <parameter name="DRG" file="m34997_drg.fits"/> | |
| 49 | - <parameter name="DRX" file="m32171_drx.fits"/> | |
| 50 | - <parameter name="IAQ" value="ENERG(3.0-10.0)MeV"/> | |
| 51 | - </observation> | |
| 52 | - <observation name="Crab" id="400001" instrument="COM"> | |
| 53 | - <parameter name="DRE" file="m50441_dre.fits"/> | |
| 54 | - <parameter name="DRB" file="m34997_drg.fits"/> | |
| 55 | - <parameter name="DRG" file="m34997_drg.fits"/> | |
| 56 | - <parameter name="DRX" file="m32171_drx.fits"/> | |
| 57 | - <parameter name="IAQ" value="ENERG(10.0-30.0)MeV"/> | |
| 58 | - </observation> | |
| 59 | - </observation_list> | |
| 60 | - | |
| 61 | -Then you also need a | |
| 62 | -:ref:`model definition file <glossary_moddef>` | |
| 63 | -that describes the source and background model that you want to fit. In the | |
| 64 | -example below, a point source with a ower law is fit at the position of the | |
| 65 | -Crab on top of an instrumental background model. | |
| 66 | - | |
| 67 | -.. code-block:: xml | |
| 68 | - | |
| 69 | - <?xml version="1.0" standalone="no"?> | |
| 70 | - <source_library title="source library"> | |
| 71 | - <source name="Crab" type="PointSource" tscalc="1"> | |
| 72 | - <spectrum type="PowerLaw"> | |
| 73 | - <parameter name="Prefactor" scale="1e-3" value="1.0" min="-1000.0" max="1000.0" free="1"/> | |
| 74 | - <parameter name="Index" scale="-1" value="2.0" min="-5.0" max="+5.0" free="1"/> | |
| 75 | - <parameter name="PivotEnergy" scale="1.0" value="1.65" min="0.01" max="1000.0" free="0"/> | |
| 76 | - </spectrum> | |
| 77 | - <spatialModel type="PointSource"> | |
| 78 | - <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="0"/> | |
| 79 | - <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="0"/> | |
| 80 | - </spatialModel> | |
| 81 | - </source> | |
| 82 | - <source name="Background(0.75-1.0)MeV" type="DRBFitting" instrument="COM" id="100001"> | |
| 83 | - <node> | |
| 84 | - <parameter name="Phibar" scale="1.0" value="1.0" min="0.0" max="50.0" free="0"/> | |
| 85 | - <parameter name="Normalization" scale="1.0" value="0.0" min="0.0" max="1000.0" free="0"/> | |
| 86 | - </node> | |
| 87 | - <node> | |
| 88 | - <parameter name="Phibar" scale="1.0" value="3.0" min="0.0" max="50.0" free="0"/> | |
| 89 | - <parameter name="Normalization" scale="1.0" value="0.0" min="0.0" max="1000.0" free="0"/> | |
| 90 | - </node> | |
| 91 | - <node> | |
| 92 | - <parameter name="Phibar" scale="1.0" value="5.0" min="0.0" max="50.0" free="0"/> | |
| 93 | - <parameter name="Normalization" scale="1.0" value="0.0" min="0.0" max="1000.0" free="0"/> | |
| 94 | - </node> | |
| 95 | - <node> | |
| 96 | - <parameter name="Phibar" scale="1.0" value="7.0" min="0.0" max="50.0" free="0"/> | |
| 97 | - <parameter name="Normalization" scale="1.0" value="0.0" min="0.0" max="1000.0" free="0"/> | |
| 98 | - </node> | |
| 99 | - <node> | |
| 100 | - <parameter name="Phibar" scale="1.0" value="9.0" min="0.0" max="50.0" free="0"/> | |
| 101 | - <parameter name="Normalization" scale="1.0" value="0.0" min="0.0" max="1000.0" free="0"/> | |
| 102 | - </node> | |
| 103 | - <node> | |
| 104 | - <parameter name="Phibar" scale="1.0" value="11.0" min="0.0" max="50.0" free="0"/> | |
| 105 | - <parameter name="Normalization" scale="1.0" value="0.0" min="0.0" max="1000.0" free="0"/> | |
| 106 | - </node> | |
| 107 | - <node> | |
| 108 | - <parameter name="Phibar" scale="1.0" value="13.0" min="0.0" max="50.0" free="0"/> | |
| 109 | - <parameter name="Normalization" scale="1.0" value="0.0" min="0.0" max="1000.0" free="0"/> | |
| 110 | - </node> | |
| 111 | - <node> | |
| 112 | - <parameter name="Phibar" scale="1.0" value="15.0" min="0.0" max="50.0" free="0"/> | |
| 113 | - <parameter name="Normalization" scale="1.0" value="0.0" min="0.0" max="1000.0" free="0"/> | |
| 114 | - </node> | |
| 115 | - <node> | |
| 116 | - <parameter name="Phibar" scale="1.0" value="17.0" min="0.0" max="50.0" free="0"/> | |
| 117 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 118 | - </node> | |
| 119 | - ... | |
| 120 | - </source> | |
| 121 | - <source name="Background(1.0-3.0)MeV" type="DRBFitting" instrument="COM" id="200001"> | |
| 122 | - <node> | |
| 123 | - <parameter name="Phibar" scale="1.0" value="1.0" min="0.0" max="50.0" free="0"/> | |
| 124 | - <parameter name="Normalization" scale="1.0" value="0.0" min="0.0" max="1000.0" free="0"/> | |
| 125 | - </node> | |
| 126 | - ... | |
| 127 | - </source> | |
| 128 | - <source name="Background(3.0-10.0)MeV" type="DRBFitting" instrument="COM" id="300001"> | |
| 129 | - <node> | |
| 130 | - <parameter name="Phibar" scale="1.0" value="1.0" min="0.0" max="50.0" free="0"/> | |
| 131 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 132 | - </node> | |
| 133 | - ... | |
| 134 | - </source> | |
| 135 | - <source name="Background(10.0-30.0)MeV" type="DRBFitting" instrument="COM" id="400001"> | |
| 136 | - <node> | |
| 137 | - <parameter name="Phibar" scale="1.0" value="1.0" min="0.0" max="50.0" free="0"/> | |
| 138 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 139 | - </node> | |
| 140 | - ... | |
| 141 | - </source> | |
| 142 | - </source_library> | |
| 143 | - | |
| 144 | -Since the file is relatively long it is not entirely reproduced here, but you | |
| 145 | -can download the file :download:`models.xml <models.xml>` by clicking on | |
| 146 | -the file name. | |
| 147 | - | |
| 148 | -The first source in the | |
| 149 | -:ref:`model definition file <glossary_moddef>` | |
| 150 | -is the point source for the Crab, the next four sources are background | |
| 151 | -model components for each of the energy bands. | |
| 152 | - | |
| 153 | -You may have recognised the ``id`` attribute for each model component. This | |
| 154 | -attribute links a given model component to a given observation. For example, | |
| 155 | -``Background(1.0-3.0)MeV`` has ``id="200001"`` and will hence only be used | |
| 156 | -to model the background for the observation that corresponds to the 1 - 3 MeV | |
| 157 | -band. | |
| 158 | - | |
| 159 | -Each background model implements a so called Phibar-fitting of the file that | |
| 160 | -was specified for the background model (recall that you specified the geometry | |
| 161 | -factors as background model). Phibar-fitting means that the background model | |
| 162 | -is fitted to the data for each Phibar-layer of the counts cube. Each background | |
| 163 | -model is composed of 25 nodes, corresponding to the number of Phibar layers | |
| 164 | -of a COMPTEL counts cube, and each node is defined by it's Phibar value | |
| 165 | -(a fixed parameter) and it's Normalization (in general a free parameter). | |
| 166 | -For some background models some normalizations of Phibar layers have been set | |
| 167 | -to zero and the parameters fixed to exclude layers from the fitting that do | |
| 168 | -not contain any data (the filling-factor of a counts cube is energy dependent; | |
| 169 | -for the 0.75 - 1 MeV energy bin the first 8 layers are in fact empty). | |
| 170 | - | |
| 171 | -Now you are ready to fit the model using the :ref:`ctlike` model tool. You do | |
| 172 | -this as follows: | |
| 173 | - | |
| 174 | -.. code-block:: bash | |
| 175 | - | |
| 176 | - $ ctlike | |
| 177 | - Input event list, counts cube or observation definition XML file [events.fits] obs.xml | |
| 178 | - Input model definition XML file [$CTOOLS/share/models/crab.xml] models.xml | |
| 179 | - Output model definition XML file [crab_results.xml] | |
| 180 | - | |
| 181 | -:ref:`ctlike` creates on output the | |
| 182 | -:ref:`model definition file <glossary_moddef>` | |
| 183 | -``crab_results.xml`` where the parameter values were updated by their | |
| 184 | -fitted values, and where the statistical uncertainties were added using the | |
| 185 | -``error`` attribute. To investigate how the fit went you should inspect the | |
| 186 | -log file ``ctlike.log`` that was also created by :ref:`ctlike`: | |
| 187 | - | |
| 188 | -.. code-block:: none | |
| 189 | - | |
| 190 | - 2019-04-04T15:11:31: +=================================+ | |
| 191 | - 2019-04-04T15:11:31: | Maximum likelihood optimisation | | |
| 192 | - 2019-04-04T15:11:31: +=================================+ | |
| 193 | - 2019-04-04T15:11:32: >Iteration 0: -logL=988079.891, Lambda=1.0e-03 | |
| 194 | - 2019-04-04T15:11:32: >Iteration 1: -logL=670528.685, Lambda=1.0e-03, delta=317551.206, step=1.0e+00, max(|grad|)=86223.268050 [Index:3] | |
| 195 | - 2019-04-04T15:11:33: >Iteration 2: -logL=387041.036, Lambda=1.0e-04, delta=283487.648, step=1.0e+00, max(|grad|)=69889.358952 [Index:3] | |
| 196 | - 2019-04-04T15:11:34: >Iteration 3: -logL=154421.136, Lambda=1.0e-05, delta=232619.900, step=1.0e+00, max(|grad|)=47995.573198 [Index:3] | |
| 197 | - 2019-04-04T15:11:35: >Iteration 4: -logL=-12398.051, Lambda=1.0e-06, delta=166819.188, step=1.0e+00, max(|grad|)=24764.034734 [Index:3] | |
| 198 | - 2019-04-04T15:11:35: >Iteration 5: -logL=-108274.155, Lambda=1.0e-07, delta=95876.104, step=1.0e+00, max(|grad|)=7544.055951 [Index:3] | |
| 199 | - 2019-04-04T15:11:36: >Iteration 6: -logL=-145907.646, Lambda=1.0e-08, delta=37633.490, step=1.0e+00, max(|grad|)=1167.458562 [Index:3] | |
| 200 | - 2019-04-04T15:11:36: >Iteration 7: -logL=-152898.181, Lambda=1.0e-09, delta=6990.535, step=1.0e+00, max(|grad|)=110.883829 [Index:3] | |
| 201 | - 2019-04-04T15:11:37: >Iteration 8: -logL=-153217.048, Lambda=1.0e-10, delta=318.867, step=1.0e+00, max(|grad|)=-2.969678 [Scale factor 2:111] | |
| 202 | - 2019-04-04T15:11:37: >Iteration 9: -logL=-153218.258, Lambda=1.0e-11, delta=1.210, step=1.0e+00, max(|grad|)=-0.047105 [Index:3] | |
| 203 | - 2019-04-04T15:11:38: >Iteration 10: -logL=-153218.258, Lambda=1.0e-12, delta=0.000, step=1.0e+00, max(|grad|)=-0.001877 [Index:3] | |
| 204 | - 2019-04-04T15:11:38: | |
| 205 | - 2019-04-04T15:11:38: +====================================+ | |
| 206 | - 2019-04-04T15:11:38: | Maximum likelihood re-optimisation | | |
| 207 | - 2019-04-04T15:11:38: +====================================+ | |
| 208 | - 2019-04-04T15:11:39: >Iteration 0: -logL=-152378.895, Lambda=1.0e-03 | |
| 209 | - 2019-04-04T15:11:39: >Iteration 1: -logL=-152759.255, Lambda=1.0e-03, delta=380.360, step=1.0e+00, max(|grad|)=-2.480233 [Scale factor 10:21] | |
| 210 | - 2019-04-04T15:11:39: >Iteration 2: -logL=-152760.518, Lambda=1.0e-04, delta=1.263, step=1.0e+00, max(|grad|)=-0.019021 [Scale factor 10:21] | |
| 211 | - 2019-04-04T15:11:40: >Iteration 3: -logL=-152760.518, Lambda=1.0e-05, delta=0.000, step=1.0e+00, max(|grad|)=-0.000001 [Scale factor 10:21] | |
| 212 | - 2019-04-04T15:11:40: | |
| 213 | - 2019-04-04T15:11:40: +============================================+ | |
| 214 | - 2019-04-04T15:11:40: | Maximum likelihood re-optimisation results | | |
| 215 | - 2019-04-04T15:11:40: +============================================+ | |
| 216 | - 2019-04-04T15:11:40: === GOptimizerLM === | |
| 217 | - 2019-04-04T15:11:40: Optimized function value ..: -152760.518 | |
| 218 | - 2019-04-04T15:11:40: Absolute precision ........: 0.005 | |
| 219 | - 2019-04-04T15:11:40: Acceptable value decrease .: 2 | |
| 220 | - 2019-04-04T15:11:40: Optimization status .......: converged | |
| 221 | - 2019-04-04T15:11:40: Number of parameters ......: 200 | |
| 222 | - 2019-04-04T15:11:40: Number of free parameters .: 87 | |
| 223 | - 2019-04-04T15:11:40: Number of iterations ......: 3 | |
| 224 | - 2019-04-04T15:11:40: Lambda ....................: 1e-06 | |
| 225 | - 2019-04-04T15:11:40: | |
| 226 | - 2019-04-04T15:11:40: +=========================================+ | |
| 227 | - 2019-04-04T15:11:40: | Maximum likelihood optimisation results | | |
| 228 | - 2019-04-04T15:11:40: +=========================================+ | |
| 229 | - 2019-04-04T15:11:40: === GOptimizerLM === | |
| 230 | - 2019-04-04T15:11:40: Optimized function value ..: -153218.258 | |
| 231 | - 2019-04-04T15:11:40: Absolute precision ........: 0.005 | |
| 232 | - 2019-04-04T15:11:40: Acceptable value decrease .: 2 | |
| 233 | - 2019-04-04T15:11:40: Optimization status .......: converged | |
| 234 | - 2019-04-04T15:11:40: Number of parameters ......: 206 | |
| 235 | - 2019-04-04T15:11:40: Number of free parameters .: 89 | |
| 236 | - 2019-04-04T15:11:40: Number of iterations ......: 10 | |
| 237 | - 2019-04-04T15:11:40: Lambda ....................: 1e-13 | |
| 238 | - 2019-04-04T15:11:40: Maximum log likelihood ....: 153218.258 | |
| 239 | - 2019-04-04T15:11:40: Observed events (Nobs) ...: 527595.000 | |
| 240 | - 2019-04-04T15:11:40: Predicted events (Npred) ..: 527594.000 (Nobs - Npred = 1.00004248635378) | |
| 241 | - 2019-04-04T15:11:40: === GModels === | |
| 242 | - 2019-04-04T15:11:40: Number of models ..........: 5 | |
| 243 | - 2019-04-04T15:11:40: Number of parameters ......: 206 | |
| 244 | - 2019-04-04T15:11:40: === GModelSky === | |
| 245 | - 2019-04-04T15:11:40: Name ......................: Crab | |
| 246 | - 2019-04-04T15:11:40: Instruments ...............: all | |
| 247 | - 2019-04-04T15:11:40: Test Statistic ............: 915.478960024426 | |
| 248 | - 2019-04-04T15:11:40: Observation identifiers ...: all | |
| 249 | - 2019-04-04T15:11:40: Model type ................: PointSource | |
| 250 | - 2019-04-04T15:11:40: Model components ..........: "PointSource" * "PowerLaw" * "Constant" | |
| 251 | - 2019-04-04T15:11:40: Number of parameters ......: 6 | |
| 252 | - 2019-04-04T15:11:40: Number of spatial par's ...: 2 | |
| 253 | - 2019-04-04T15:11:40: RA .......................: 83.6331 [-360,360] deg (fixed,scale=1) | |
| 254 | - 2019-04-04T15:11:40: DEC ......................: 22.0145 [-90,90] deg (fixed,scale=1) | |
| 255 | - 2019-04-04T15:11:40: Number of spectral par's ..: 3 | |
| 256 | - 2019-04-04T15:11:40: Prefactor ................: 0.00237485707890478 +/- 0.000107670251181817 [-1,1] ph/cm2/s/MeV (free,scale=0.001,gradient) | |
| 257 | - 2019-04-04T15:11:40: Index ....................: -2.47146337740947 +/- 0.0500850436160353 [5,-5] (free,scale=-1,gradient) | |
| 258 | - 2019-04-04T15:11:40: PivotEnergy ..............: 1 [0.01,1000] MeV (fixed,scale=1,gradient) | |
| 259 | - 2019-04-04T15:11:40: Number of temporal par's ..: 1 | |
| 260 | - 2019-04-04T15:11:40: Normalization ............: 1 (relative value) (fixed,scale=1,gradient) | |
| 261 | - 2019-04-04T15:11:40: Number of scale par's .....: 0 | |
| 262 | - | |
| 263 | -The fit converged after 10 iterations and did a second fit without the | |
| 264 | -source component to determine the Test Statistic value of the Crab. | |
| 265 | -The source is detected with a Test Statistic of 915.7 which corresponds to | |
| 266 | -a detection significance of about 30 sigma. | |
| 267 | - | |
| 268 | -.. note:: | |
| 269 | - `Kuiper et al. 2001, A&A, 378, 918 <http://cdsads.u-strasbg.fr/abs/2001A%26A...378..918K>`_ | |
| 270 | - presented the most comprehensive analysis of the COMPTEL Crab observations | |
| 271 | - and summarize in their Table 3 the gamma-ray intensity as function of | |
| 272 | - energy for the unpulsed and pulsed component of source. By adding the | |
| 273 | - intensities and fitting the resulting values we obtained a prefactor | |
| 274 | - of 2.5e-3, which is very close to the prefactor of 2.4e-3 obtained | |
| 275 | - in the analysis above. The spectral index of the Kuiper's data is | |
| 276 | - -2.2, a bit harder than the index of -2.5 obtained in the fit. | |
| 277 | - | |
| 278 | -.. note:: | |
| 279 | - The position of a point source can also be adjusted by :ref:`ctlike` for | |
| 280 | - an analysis of COMPTEL data, hence you may set the corresponding parameters | |
| 281 | - to ``free="1"`` to determine also the best fitting source position. | |
| 282 | - | |
| 283 | -.. warning:: | |
| 284 | - ctools supports for the moment only the fitting of point sources for | |
| 285 | - COMPTEL data. Other spatial shapes will be implemented in the future. |
doc/source/users/tutorials/comptel/howto_comptel_query.jpg deleted
262 KB
doc/source/users/tutorials/comptel/howto_comptel_spectrum.png deleted
52.7 KB
doc/source/users/tutorials/comptel/howto_comptel_spectrum.rst deleted
| 1 | -.. _howto_comptel_spectrum: | |
| 2 | - | |
| 3 | -Generate a spectral energy distribution for a source | |
| 4 | ----------------------------------------------------- | |
| 5 | - | |
| 6 | - .. admonition:: What you will learn | |
| 7 | - | |
| 8 | - You will learn how to use :ref:`ctlike` to derive the spectral energy | |
| 9 | - density of a source from COMPTEL data. | |
| 10 | - | |
| 11 | -To determine a spectrum of the Crab nebula you can use the :ref:`csspec` | |
| 12 | -script. To do this, type | |
| 13 | - | |
| 14 | -.. code-block:: bash | |
| 15 | - | |
| 16 | - $ csspec | |
| 17 | - Input event list, counts cube, or observation definition XML file [events.fits] obs.xml | |
| 18 | - Input model definition XML file [$CTOOLS/share/models/crab.xml] models.xml | |
| 19 | - Source name [Crab] | |
| 20 | - Spectrum generation method (SLICE|NODES|AUTO) [AUTO] | |
| 21 | - Algorithm for defining energy bins (FILE|LIN|LOG|POW) [LOG] | |
| 22 | - Start value for first energy bin in TeV [0.1] 0.00000075 | |
| 23 | - Stop value for last energy bin in TeV [100.0] 0.00003 | |
| 24 | - Number of energy bins (1-200) [20] 4 | |
| 25 | - Output spectrum file [spectrum.fits] | |
| 26 | - | |
| 27 | -This will generate a logarithmically spaced spectrum composed of 4 energy bins | |
| 28 | -comprised within 0.75 MeV and 30 GeV. The :ref:`csspec` tool is run in the ``AUTO`` | |
| 29 | -mode, which for COMPTEL data corresponds to the ``NODES`` method. :ref:`csspec` | |
| 30 | -will convert the Crab spectrum in the input model into a node function and fit | |
| 31 | -all intensity nodes using :ref:`ctlike`. The resulting node intensities are | |
| 32 | -then interpreted as the spectral point, and are displayed as red data points | |
| 33 | -in the figure below. The black data points show the combined Crab nebular and | |
| 34 | -pulsar spectrum from | |
| 35 | -`Kuiper et al. 2001, A&A, 378, 918 <http://cdsads.u-strasbg.fr/abs/2001A%26A...378..918K>`_ | |
| 36 | -for comparison. | |
| 37 | - | |
| 38 | -.. figure:: howto_comptel_spectrum.png | |
| 39 | - :width: 600px | |
| 40 | - :align: center | |
| 41 | - | |
| 42 | - *Spectrum of the Crab derived using a node function* |
doc/source/users/tutorials/comptel/howto_comptel_tsmap.png deleted
20.1 KB
doc/source/users/tutorials/comptel/howto_comptel_tsmap.rst deleted
| 1 | -.. _howto_comptel_tsmap: | |
| 2 | - | |
| 3 | -Generate a Test Statistic map | |
| 4 | ------------------------------ | |
| 5 | - | |
| 6 | - .. admonition:: What you will learn | |
| 7 | - | |
| 8 | - You will learn how to use :ref:`cttsmap` to generate a Test Staristic | |
| 9 | - map from COMPTEL data. | |
| 10 | - | |
| 11 | -The Test Statistic (or maximum likelihood ratio) is a measure of the detection | |
| 12 | -significance of a gamma-ray source. By displacing the location of a test source | |
| 13 | -on a grid of positions you can generate a Test Statistic map that helps in | |
| 14 | -finding significant source and assessing the position uncertainty of a | |
| 15 | -source. You do this by using the :ref:`cttsmap` tool as follows: | |
| 16 | - | |
| 17 | -.. code-block:: bash | |
| 18 | - | |
| 19 | - $ cttsmap | |
| 20 | - Input event list, counts cube or observation definition XML file [events.fits] obs.xml | |
| 21 | - Test source name [Crab] | |
| 22 | - Input model definition XML file [$CTOOLS/share/models/crab.xml] models.xml | |
| 23 | - Coordinate system (CEL - celestial, GAL - galactic) (CEL|GAL) [CEL] | |
| 24 | - Projection method (AIT|AZP|CAR|GLS|MER|MOL|SFL|SIN|STG|TAN) [CAR] | |
| 25 | - First coordinate of image center in degrees (RA or galactic l) (0-360) [83.63] | |
| 26 | - Second coordinate of image center in degrees (DEC or galactic b) (-90-90) [22.01] | |
| 27 | - Image scale (in degrees/pixel) [0.02] 1.0 | |
| 28 | - Size of the X axis in pixels [200] 10 | |
| 29 | - Size of the Y axis in pixels [200] 10 | |
| 30 | - Output Test Statistic map file [tsmap.fits] | |
| 31 | - | |
| 32 | -:ref:`cttsmap` created a 10 x 10 pixels map with a pixel size of 1 degree | |
| 33 | -around the location of the Crab and saved the result in the FITS file | |
| 34 | -``tsmap.fits``. The file also contains the values of all fitted parameters | |
| 35 | -at each grid position. The Test Statistics map is displayed using | |
| 36 | -`ds9 <http://ds9.si.edu>`_ in the figure below: | |
| 37 | - | |
| 38 | -.. figure:: howto_comptel_tsmap.png | |
| 39 | - :width: 400px | |
| 40 | - :align: center | |
| 41 | - | |
| 42 | - *Test Statistic map for COMPTEL viewing period 1 of the Crab nebula* |
doc/source/users/tutorials/comptel/howto_comptel_ulimit.rst deleted
| 1 | -.. _howto_comptel_ulimit: | |
| 2 | - | |
| 3 | -Derive upper flux limits for a source | |
| 4 | -------------------------------------- | |
| 5 | - | |
| 6 | - .. admonition:: What you will learn | |
| 7 | - | |
| 8 | - You will learn how to use :ref:`ctulimit` to determine upper flux limits | |
| 9 | - from COMPTEL data using a likelihood profile method. | |
| 10 | - | |
| 11 | -Suppose we have tried to get the flux from a source, for example the Vela | |
| 12 | -pulsar, but we have not managed to detect the source and now want to determine | |
| 13 | -an upper flux limit for that object. You can do this with the :ref:`ctulimit` | |
| 14 | -tool. | |
| 15 | - | |
| 16 | -First you have to retreive the COMPTEL data for the Vela pulsar. You can | |
| 17 | -do this by following | |
| 18 | -:ref:`the tutorial that explains how to download COMPTEL data <howto_comptel_download>`. | |
| 19 | -Suppose you have selected the data from viewing period 8. You then have to | |
| 20 | -create the following | |
| 21 | -:ref:`observation definition file <glossary_obsdef>`: | |
| 22 | - | |
| 23 | -.. code-block:: xml | |
| 24 | - | |
| 25 | - <?xml version="1.0" standalone="no"?> | |
| 26 | - <observation_list title="observation library"> | |
| 27 | - <observation name="Vela" id="100001" instrument="COM"> | |
| 28 | - <parameter name="DRE" file="m50866_dre.fits"/> | |
| 29 | - <parameter name="DRB" file="m35330_drg.fits"/> | |
| 30 | - <parameter name="DRG" file="m35330_drg.fits"/> | |
| 31 | - <parameter name="DRX" file="m32504_drx.fits"/> | |
| 32 | - <parameter name="IAQ" value="UNH(0.75-1.0)MeV"/> | |
| 33 | - </observation> | |
| 34 | - <observation name="Vela" id="200001" instrument="COM"> | |
| 35 | - <parameter name="DRE" file="m50867_dre.fits"/> | |
| 36 | - <parameter name="DRB" file="m35330_drg.fits"/> | |
| 37 | - <parameter name="DRG" file="m35330_drg.fits"/> | |
| 38 | - <parameter name="DRX" file="m32504_drx.fits"/> | |
| 39 | - <parameter name="IAQ" value="UNH(1.0-3.0)MeV"/> | |
| 40 | - </observation> | |
| 41 | - <observation name="Vela" id="300001" instrument="COM"> | |
| 42 | - <parameter name="DRE" file="m50868_dre.fits"/> | |
| 43 | - <parameter name="DRB" file="m35330_drg.fits"/> | |
| 44 | - <parameter name="DRG" file="m35330_drg.fits"/> | |
| 45 | - <parameter name="DRX" file="m32504_drx.fits"/> | |
| 46 | - <parameter name="IAQ" value="UNH(3.0-10.0)MeV"/> | |
| 47 | - </observation> | |
| 48 | - <observation name="Vela" id="400001" instrument="COM"> | |
| 49 | - <parameter name="DRE" file="m50869_dre.fits"/> | |
| 50 | - <parameter name="DRB" file="m35330_drg.fits"/> | |
| 51 | - <parameter name="DRG" file="m35330_drg.fits"/> | |
| 52 | - <parameter name="DRX" file="m32504_drx.fits"/> | |
| 53 | - <parameter name="IAQ" value="UNH(10.0-30.0)MeV"/> | |
| 54 | - </observation> | |
| 55 | - </observation_list> | |
| 56 | - | |
| 57 | -As next step you have to create a | |
| 58 | -:ref:`model definition file <glossary_moddef>`. | |
| 59 | -You can copy the file used for the Crab and adjust the point source | |
| 60 | -component as shown below. Note that you need to fix the spectral index, and | |
| 61 | -you should also constrain the ``Prefactor`` to positive values. | |
| 62 | - | |
| 63 | -.. code-block:: xml | |
| 64 | - | |
| 65 | - <?xml version="1.0" standalone="no"?> | |
| 66 | - <source_library title="source library"> | |
| 67 | - <source name="Vela" type="PointSource"> | |
| 68 | - <spectrum type="PowerLaw"> | |
| 69 | - <parameter name="Prefactor" scale="1e-3" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 70 | - <parameter name="Index" scale="-1" value="1.5" min="0.0" max="+5.0" free="0"/> | |
| 71 | - <parameter name="PivotEnergy" scale="1.0" value="1.0" min="0.01" max="1000.0" free="0"/> | |
| 72 | - </spectrum> | |
| 73 | - <spatialModel type="PointSource"> | |
| 74 | - <parameter name="RA" scale="1.0" value="128.84" min="-360" max="360" free="0"/> | |
| 75 | - <parameter name="DEC" scale="1.0" value="-45.18" min="-90" max="90" free="0"/> | |
| 76 | - </spatialModel> | |
| 77 | - </source> | |
| 78 | - <source name="Background(0.75-1.0)MeV" type="DRBFitting" instrument="COM" id="100001"> | |
| 79 | - ... | |
| 80 | - </source_library> | |
| 81 | - | |
| 82 | -Now you can run the :ref:`ctulimit` tool as follows. Since the tool is normally | |
| 83 | -tuned for Cherenkov Telescope data analysis, energies are by default given in | |
| 84 | -TeV. To specify a reference energy of the differential flux limit of 1 MeV you | |
| 85 | -need to provide the hidden parameter ``eref=0.000001``. You can also set the | |
| 86 | -flux interval for the intergal flux computation to 0.75 - 30 MeV by | |
| 87 | -specifying ``emin=0.000000075 emax=0.00003`` (all values are given in TeV): | |
| 88 | - | |
| 89 | -.. code-block:: bash | |
| 90 | - | |
| 91 | - $ ctulimit eref=0.000001 emin=0.000000075 emax=0.00003 | |
| 92 | - Input event list, counts cube or observation definition XML file [events.fits] obs.xml | |
| 93 | - Source of interest [Crab] Vela | |
| 94 | - Input model definition XML file [$CTOOLS/share/models/crab.xml] models.xml | |
| 95 | - | |
| 96 | -The results of the upper limit computation can then be extracted from the | |
| 97 | -``ctulimit.log`` file that is created by :ref:`ctulimit`: | |
| 98 | - | |
| 99 | -.. code-block:: bash | |
| 100 | - | |
| 101 | - 2019-04-04T15:47:22: +=====================+ | |
| 102 | - 2019-04-04T15:47:22: | Upper limit results | | |
| 103 | - 2019-04-04T15:47:22: +=====================+ | |
| 104 | - 2019-04-04T15:47:22: Differential flux limit ...: 9.26467937144868e-06 ph/cm2/s/MeV at 1e-06 TeV | |
| 105 | - 2019-04-04T15:47:22: Integral flux limit .......: 6.42766691440729e-05 ph/cm2/s within [7.5e-08-3e-05] TeV | |
| 106 | - 2019-04-04T15:47:22: Energy flux limit .........: 1.54473853201363e-10 erg/cm2/s within [7.5e-08-3e-05] TeV |
doc/source/users/tutorials/comptel/index.rst
| ... | ... | @@ -12,10 +12,11 @@ COMPTEL |
| 12 | 12 | .. toctree:: |
| 13 | 13 | :maxdepth: 1 |
| 14 | 14 | |
| 15 | - howto_comptel_download | |
| 16 | - howto_comptel_fitting | |
| 17 | - howto_comptel_butterfly | |
| 18 | - howto_comptel_spectrum | |
| 19 | - howto_comptel_tsmap | |
| 20 | - howto_comptel_ulimit | |
| 21 | - howto_comptel_dri | |
| 15 | + download | |
| 16 | + selection | |
| 17 | + binning | |
| 18 | + modelling | |
| 19 | + fitting | |
| 20 | + residuals | |
| 21 | + tsmap | |
| 22 | + pulsar | ... | ... |
doc/source/users/tutorials/comptel/modelling.rst
0 → 100755
| 1 | +.. _comptel_modelling: | |
| 2 | + | |
| 3 | +Modeling the data | |
| 4 | +----------------- | |
| 5 | + | |
| 6 | + .. admonition:: What you will learn | |
| 7 | + | |
| 8 | + You will learn how to generate a | |
| 9 | + :ref:`model definition file <glossary_moddef>` | |
| 10 | + for the analysis of COMPTEL data. | |
| 11 | + | |
| 12 | + | |
| 13 | +As next step you need to create a model to describe the COMPTEL data. | |
| 14 | +This step is accomplished using the :ref:`comobsmodel` script. The | |
| 15 | +example below shows how you can generate a model for a point source at | |
| 16 | +the position of the Crab. | |
| 17 | + | |
| 18 | +.. code-block:: bash | |
| 19 | + | |
| 20 | + $ comobsmodel | |
| 21 | + Input observation definition file [obs.xml] obs_binned.xml | |
| 22 | + Right Ascension of point source (deg) [NONE] 83.6331 | |
| 23 | + Declination of point source (deg) [NONE] 22.0145 | |
| 24 | + Name of point source [NONE] Crab | |
| 25 | + Bremsstrahlung component (NONE|MAP|CUBE) [NONE] | |
| 26 | + Inverse Compton component (NONE|MAP|CUBE) [NONE] | |
| 27 | + Isotropic component (NONE|CONST|CONSTFIX) [NONE] | |
| 28 | + Output model definition file [models.xml] | |
| 29 | + | |
| 30 | +:ref:`comobsmodel` produces on output a | |
| 31 | +:ref:`model definition file <glossary_moddef>` | |
| 32 | +which in the example is named ``models.xml``. The content of this file | |
| 33 | +is shown below. The model comprises a point source with power law spectrum at the | |
| 34 | +position of the Crab and a background model component for each of the four energy | |
| 35 | +bins. By default the background model is of type ``DRBPhibarBins`` which defines | |
| 36 | +a free scaling factor for each of the :math:`\bar{\varphi}` layers of the COMPTEL data space. | |
| 37 | + | |
| 38 | +.. code-block:: bash | |
| 39 | + | |
| 40 | + <?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
| 41 | + <source_library title="source library"> | |
| 42 | + <source name="Crab" type="PointSource" tscalc="1"> | |
| 43 | + <spectrum type="PowerLaw"> | |
| 44 | + <parameter name="Prefactor" value="1" error="0" scale="0.002" min="5e-23" free="1" /> | |
| 45 | + <parameter name="Index" value="1" error="-0" scale="-2" min="-5" max="5" free="1" /> | |
| 46 | + <parameter name="PivotEnergy" value="1" scale="1" free="0" /> | |
| 47 | + </spectrum> | |
| 48 | + <spatialModel type="PointSource"> | |
| 49 | + <parameter name="RA" value="83.6331" error="0" scale="1" free="1" /> | |
| 50 | + <parameter name="DEC" value="22.0145" error="0" scale="1" free="1" /> | |
| 51 | + </spatialModel> | |
| 52 | + </source> | |
| 53 | + <source name="Background_vp0001_0_000750-001886keV" type="DRBPhibarBins" instrument="COM" id="vp0001_0_000750-001886keV"> | |
| 54 | + <parameter name="Normalization" value="1" scale="1" min="0" max="1000" free="0" /> | |
| 55 | + <parameter name="Normalization" value="1" scale="1" min="0" max="1000" free="0" /> | |
| 56 | + <parameter name="Normalization" value="1" scale="1" min="0" max="1000" free="0" /> | |
| 57 | + <parameter name="Normalization" value="1" scale="1" min="0" max="1000" free="0" /> | |
| 58 | + <parameter name="Normalization" value="1" error="0" scale="1" min="0" max="1000" free="1" /> | |
| 59 | + ... | |
| 60 | + <parameter name="Normalization" value="1" error="0" scale="1" min="0" max="1000" free="1" /> | |
| 61 | + </source> | |
| 62 | + <source name="Background_vp0001_0_001886-004743keV" type="DRBPhibarBins" instrument="COM" id="vp0001_0_001886-004743keV"> | |
| 63 | + <parameter name="Normalization" value="1" scale="1" min="0" max="1000" free="0" /> | |
| 64 | + <parameter name="Normalization" value="1" error="0" scale="1" min="0" max="1000" free="1" /> | |
| 65 | + ... | |
| 66 | + <parameter name="Normalization" value="1" error="0" scale="1" min="0" max="1000" free="1" /> | |
| 67 | + </source> | |
| 68 | + <source name="Background_vp0001_0_004743-011929keV" type="DRBPhibarBins" instrument="COM" id="vp0001_0_004743-011929keV"> | |
| 69 | + <parameter name="Normalization" value="1" error="0" scale="1" min="0" max="1000" free="1" /> | |
| 70 | + ... | |
| 71 | + <parameter name="Normalization" value="1" error="0" scale="1" min="0" max="1000" free="1" /> | |
| 72 | + </source> | |
| 73 | + <source name="Background_vp0001_0_011929-029999keV" type="DRBPhibarBins" instrument="COM" id="vp0001_0_011929-029999keV"> | |
| 74 | + <parameter name="Normalization" value="1" error="0" scale="1" min="0" max="1000" free="1" /> | |
| 75 | + ... | |
| 76 | + <parameter name="Normalization" value="1" error="0" scale="1" min="0" max="1000" free="1" /> | |
| 77 | + </source> | |
| 78 | + </source_library> | |
| 79 | + | |
| 80 | +.. note:: | |
| 81 | + | |
| 82 | + To shorten the display, identical lines were replaced by three dots. | |
| 83 | + | ... | ... |
doc/source/users/tutorials/comptel/models.xml deleted
| 1 | -<?xml version="1.0" standalone="no"?> | |
| 2 | -<source_library title="source library"> | |
| 3 | - <source name="Crab" type="PointSource" tscalc="1"> | |
| 4 | - <spectrum type="PowerLaw"> | |
| 5 | - <parameter name="Prefactor" scale="1e-3" value="1.0" min="-1000.0" max="1000.0" free="1"/> | |
| 6 | - <parameter name="Index" scale="-1" value="2.0" min="-5.0" max="+5.0" free="1"/> | |
| 7 | - <parameter name="PivotEnergy" scale="1.0" value="1.0" min="0.01" max="1000.0" free="0"/> | |
| 8 | - </spectrum> | |
| 9 | - <spatialModel type="PointSource"> | |
| 10 | - <parameter name="RA" scale="1.0" value="83.6331" min="-360" max="360" free="0"/> | |
| 11 | - <parameter name="DEC" scale="1.0" value="22.0145" min="-90" max="90" free="0"/> | |
| 12 | - </spatialModel> | |
| 13 | - </source> | |
| 14 | - <source name="Background(0.75-1.0)MeV" type="DRBFitting" instrument="COM" id="100001"> | |
| 15 | - <node> | |
| 16 | - <parameter name="Phibar" scale="1.0" value="1.0" min="0.0" max="50.0" free="0"/> | |
| 17 | - <parameter name="Normalization" scale="1.0" value="0.0" min="0.0" max="1000.0" free="0"/> | |
| 18 | - </node> | |
| 19 | - <node> | |
| 20 | - <parameter name="Phibar" scale="1.0" value="3.0" min="0.0" max="50.0" free="0"/> | |
| 21 | - <parameter name="Normalization" scale="1.0" value="0.0" min="0.0" max="1000.0" free="0"/> | |
| 22 | - </node> | |
| 23 | - <node> | |
| 24 | - <parameter name="Phibar" scale="1.0" value="5.0" min="0.0" max="50.0" free="0"/> | |
| 25 | - <parameter name="Normalization" scale="1.0" value="0.0" min="0.0" max="1000.0" free="0"/> | |
| 26 | - </node> | |
| 27 | - <node> | |
| 28 | - <parameter name="Phibar" scale="1.0" value="7.0" min="0.0" max="50.0" free="0"/> | |
| 29 | - <parameter name="Normalization" scale="1.0" value="0.0" min="0.0" max="1000.0" free="0"/> | |
| 30 | - </node> | |
| 31 | - <node> | |
| 32 | - <parameter name="Phibar" scale="1.0" value="9.0" min="0.0" max="50.0" free="0"/> | |
| 33 | - <parameter name="Normalization" scale="1.0" value="0.0" min="0.0" max="1000.0" free="0"/> | |
| 34 | - </node> | |
| 35 | - <node> | |
| 36 | - <parameter name="Phibar" scale="1.0" value="11.0" min="0.0" max="50.0" free="0"/> | |
| 37 | - <parameter name="Normalization" scale="1.0" value="0.0" min="0.0" max="1000.0" free="0"/> | |
| 38 | - </node> | |
| 39 | - <node> | |
| 40 | - <parameter name="Phibar" scale="1.0" value="13.0" min="0.0" max="50.0" free="0"/> | |
| 41 | - <parameter name="Normalization" scale="1.0" value="0.0" min="0.0" max="1000.0" free="0"/> | |
| 42 | - </node> | |
| 43 | - <node> | |
| 44 | - <parameter name="Phibar" scale="1.0" value="15.0" min="0.0" max="50.0" free="0"/> | |
| 45 | - <parameter name="Normalization" scale="1.0" value="0.0" min="0.0" max="1000.0" free="0"/> | |
| 46 | - </node> | |
| 47 | - <node> | |
| 48 | - <parameter name="Phibar" scale="1.0" value="17.0" min="0.0" max="50.0" free="0"/> | |
| 49 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 50 | - </node> | |
| 51 | - <node> | |
| 52 | - <parameter name="Phibar" scale="1.0" value="19.0" min="0.0" max="50.0" free="0"/> | |
| 53 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 54 | - </node> | |
| 55 | - <node> | |
| 56 | - <parameter name="Phibar" scale="1.0" value="21.0" min="0.0" max="50.0" free="0"/> | |
| 57 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 58 | - </node> | |
| 59 | - <node> | |
| 60 | - <parameter name="Phibar" scale="1.0" value="23.0" min="0.0" max="50.0" free="0"/> | |
| 61 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 62 | - </node> | |
| 63 | - <node> | |
| 64 | - <parameter name="Phibar" scale="1.0" value="25.0" min="0.0" max="50.0" free="0"/> | |
| 65 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 66 | - </node> | |
| 67 | - <node> | |
| 68 | - <parameter name="Phibar" scale="1.0" value="27.0" min="0.0" max="50.0" free="0"/> | |
| 69 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 70 | - </node> | |
| 71 | - <node> | |
| 72 | - <parameter name="Phibar" scale="1.0" value="29.0" min="0.0" max="50.0" free="0"/> | |
| 73 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 74 | - </node> | |
| 75 | - <node> | |
| 76 | - <parameter name="Phibar" scale="1.0" value="31.0" min="0.0" max="50.0" free="0"/> | |
| 77 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 78 | - </node> | |
| 79 | - <node> | |
| 80 | - <parameter name="Phibar" scale="1.0" value="33.0" min="0.0" max="50.0" free="0"/> | |
| 81 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 82 | - </node> | |
| 83 | - <node> | |
| 84 | - <parameter name="Phibar" scale="1.0" value="35.0" min="0.0" max="50.0" free="0"/> | |
| 85 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 86 | - </node> | |
| 87 | - <node> | |
| 88 | - <parameter name="Phibar" scale="1.0" value="37.0" min="0.0" max="50.0" free="0"/> | |
| 89 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 90 | - </node> | |
| 91 | - <node> | |
| 92 | - <parameter name="Phibar" scale="1.0" value="39.0" min="0.0" max="50.0" free="0"/> | |
| 93 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 94 | - </node> | |
| 95 | - <node> | |
| 96 | - <parameter name="Phibar" scale="1.0" value="41.0" min="0.0" max="50.0" free="0"/> | |
| 97 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 98 | - </node> | |
| 99 | - <node> | |
| 100 | - <parameter name="Phibar" scale="1.0" value="43.0" min="0.0" max="50.0" free="0"/> | |
| 101 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 102 | - </node> | |
| 103 | - <node> | |
| 104 | - <parameter name="Phibar" scale="1.0" value="45.0" min="0.0" max="50.0" free="0"/> | |
| 105 | - <parameter name="Normalization" scale="1.0" value="0.0" min="0.0" max="1000.0" free="0"/> | |
| 106 | - </node> | |
| 107 | - <node> | |
| 108 | - <parameter name="Phibar" scale="1.0" value="47.0" min="0.0" max="50.0" free="0"/> | |
| 109 | - <parameter name="Normalization" scale="1.0" value="0.0" min="0.0" max="1000.0" free="0"/> | |
| 110 | - </node> | |
| 111 | - <node> | |
| 112 | - <parameter name="Phibar" scale="1.0" value="49.0" min="0.0" max="50.0" free="0"/> | |
| 113 | - <parameter name="Normalization" scale="1.0" value="0.0" min="0.0" max="1000.0" free="0"/> | |
| 114 | - </node> | |
| 115 | - </source> | |
| 116 | - <source name="Background(1.0-3.0)MeV" type="DRBFitting" instrument="COM" id="200001"> | |
| 117 | - <node> | |
| 118 | - <parameter name="Phibar" scale="1.0" value="1.0" min="0.0" max="50.0" free="0"/> | |
| 119 | - <parameter name="Normalization" scale="1.0" value="0.0" min="0.0" max="1000.0" free="0"/> | |
| 120 | - </node> | |
| 121 | - <node> | |
| 122 | - <parameter name="Phibar" scale="1.0" value="3.0" min="0.0" max="50.0" free="0"/> | |
| 123 | - <parameter name="Normalization" scale="1.0" value="0.0" min="0.0" max="1000.0" free="0"/> | |
| 124 | - </node> | |
| 125 | - <node> | |
| 126 | - <parameter name="Phibar" scale="1.0" value="5.0" min="0.0" max="50.0" free="0"/> | |
| 127 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 128 | - </node> | |
| 129 | - <node> | |
| 130 | - <parameter name="Phibar" scale="1.0" value="7.0" min="0.0" max="50.0" free="0"/> | |
| 131 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 132 | - </node> | |
| 133 | - <node> | |
| 134 | - <parameter name="Phibar" scale="1.0" value="9.0" min="0.0" max="50.0" free="0"/> | |
| 135 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 136 | - </node> | |
| 137 | - <node> | |
| 138 | - <parameter name="Phibar" scale="1.0" value="11.0" min="0.0" max="50.0" free="0"/> | |
| 139 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 140 | - </node> | |
| 141 | - <node> | |
| 142 | - <parameter name="Phibar" scale="1.0" value="13.0" min="0.0" max="50.0" free="0"/> | |
| 143 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 144 | - </node> | |
| 145 | - <node> | |
| 146 | - <parameter name="Phibar" scale="1.0" value="15.0" min="0.0" max="50.0" free="0"/> | |
| 147 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 148 | - </node> | |
| 149 | - <node> | |
| 150 | - <parameter name="Phibar" scale="1.0" value="17.0" min="0.0" max="50.0" free="0"/> | |
| 151 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 152 | - </node> | |
| 153 | - <node> | |
| 154 | - <parameter name="Phibar" scale="1.0" value="19.0" min="0.0" max="50.0" free="0"/> | |
| 155 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 156 | - </node> | |
| 157 | - <node> | |
| 158 | - <parameter name="Phibar" scale="1.0" value="21.0" min="0.0" max="50.0" free="0"/> | |
| 159 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 160 | - </node> | |
| 161 | - <node> | |
| 162 | - <parameter name="Phibar" scale="1.0" value="23.0" min="0.0" max="50.0" free="0"/> | |
| 163 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 164 | - </node> | |
| 165 | - <node> | |
| 166 | - <parameter name="Phibar" scale="1.0" value="25.0" min="0.0" max="50.0" free="0"/> | |
| 167 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 168 | - </node> | |
| 169 | - <node> | |
| 170 | - <parameter name="Phibar" scale="1.0" value="27.0" min="0.0" max="50.0" free="0"/> | |
| 171 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 172 | - </node> | |
| 173 | - <node> | |
| 174 | - <parameter name="Phibar" scale="1.0" value="29.0" min="0.0" max="50.0" free="0"/> | |
| 175 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 176 | - </node> | |
| 177 | - <node> | |
| 178 | - <parameter name="Phibar" scale="1.0" value="31.0" min="0.0" max="50.0" free="0"/> | |
| 179 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 180 | - </node> | |
| 181 | - <node> | |
| 182 | - <parameter name="Phibar" scale="1.0" value="33.0" min="0.0" max="50.0" free="0"/> | |
| 183 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 184 | - </node> | |
| 185 | - <node> | |
| 186 | - <parameter name="Phibar" scale="1.0" value="35.0" min="0.0" max="50.0" free="0"/> | |
| 187 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 188 | - </node> | |
| 189 | - <node> | |
| 190 | - <parameter name="Phibar" scale="1.0" value="37.0" min="0.0" max="50.0" free="0"/> | |
| 191 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 192 | - </node> | |
| 193 | - <node> | |
| 194 | - <parameter name="Phibar" scale="1.0" value="39.0" min="0.0" max="50.0" free="0"/> | |
| 195 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 196 | - </node> | |
| 197 | - <node> | |
| 198 | - <parameter name="Phibar" scale="1.0" value="41.0" min="0.0" max="50.0" free="0"/> | |
| 199 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 200 | - </node> | |
| 201 | - <node> | |
| 202 | - <parameter name="Phibar" scale="1.0" value="43.0" min="0.0" max="50.0" free="0"/> | |
| 203 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 204 | - </node> | |
| 205 | - <node> | |
| 206 | - <parameter name="Phibar" scale="1.0" value="45.0" min="0.0" max="50.0" free="0"/> | |
| 207 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 208 | - </node> | |
| 209 | - <node> | |
| 210 | - <parameter name="Phibar" scale="1.0" value="47.0" min="0.0" max="50.0" free="0"/> | |
| 211 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 212 | - </node> | |
| 213 | - <node> | |
| 214 | - <parameter name="Phibar" scale="1.0" value="49.0" min="0.0" max="50.0" free="0"/> | |
| 215 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 216 | - </node> | |
| 217 | - </source> | |
| 218 | - <source name="Background(3.0-10.0)MeV" type="DRBFitting" instrument="COM" id="300001"> | |
| 219 | - <node> | |
| 220 | - <parameter name="Phibar" scale="1.0" value="1.0" min="0.0" max="50.0" free="0"/> | |
| 221 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 222 | - </node> | |
| 223 | - <node> | |
| 224 | - <parameter name="Phibar" scale="1.0" value="3.0" min="0.0" max="50.0" free="0"/> | |
| 225 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 226 | - </node> | |
| 227 | - <node> | |
| 228 | - <parameter name="Phibar" scale="1.0" value="5.0" min="0.0" max="50.0" free="0"/> | |
| 229 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 230 | - </node> | |
| 231 | - <node> | |
| 232 | - <parameter name="Phibar" scale="1.0" value="7.0" min="0.0" max="50.0" free="0"/> | |
| 233 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 234 | - </node> | |
| 235 | - <node> | |
| 236 | - <parameter name="Phibar" scale="1.0" value="9.0" min="0.0" max="50.0" free="0"/> | |
| 237 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 238 | - </node> | |
| 239 | - <node> | |
| 240 | - <parameter name="Phibar" scale="1.0" value="11.0" min="0.0" max="50.0" free="0"/> | |
| 241 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 242 | - </node> | |
| 243 | - <node> | |
| 244 | - <parameter name="Phibar" scale="1.0" value="13.0" min="0.0" max="50.0" free="0"/> | |
| 245 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 246 | - </node> | |
| 247 | - <node> | |
| 248 | - <parameter name="Phibar" scale="1.0" value="15.0" min="0.0" max="50.0" free="0"/> | |
| 249 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 250 | - </node> | |
| 251 | - <node> | |
| 252 | - <parameter name="Phibar" scale="1.0" value="17.0" min="0.0" max="50.0" free="0"/> | |
| 253 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 254 | - </node> | |
| 255 | - <node> | |
| 256 | - <parameter name="Phibar" scale="1.0" value="19.0" min="0.0" max="50.0" free="0"/> | |
| 257 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 258 | - </node> | |
| 259 | - <node> | |
| 260 | - <parameter name="Phibar" scale="1.0" value="21.0" min="0.0" max="50.0" free="0"/> | |
| 261 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 262 | - </node> | |
| 263 | - <node> | |
| 264 | - <parameter name="Phibar" scale="1.0" value="23.0" min="0.0" max="50.0" free="0"/> | |
| 265 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 266 | - </node> | |
| 267 | - <node> | |
| 268 | - <parameter name="Phibar" scale="1.0" value="25.0" min="0.0" max="50.0" free="0"/> | |
| 269 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 270 | - </node> | |
| 271 | - <node> | |
| 272 | - <parameter name="Phibar" scale="1.0" value="27.0" min="0.0" max="50.0" free="0"/> | |
| 273 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 274 | - </node> | |
| 275 | - <node> | |
| 276 | - <parameter name="Phibar" scale="1.0" value="29.0" min="0.0" max="50.0" free="0"/> | |
| 277 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 278 | - </node> | |
| 279 | - <node> | |
| 280 | - <parameter name="Phibar" scale="1.0" value="31.0" min="0.0" max="50.0" free="0"/> | |
| 281 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 282 | - </node> | |
| 283 | - <node> | |
| 284 | - <parameter name="Phibar" scale="1.0" value="33.0" min="0.0" max="50.0" free="0"/> | |
| 285 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 286 | - </node> | |
| 287 | - <node> | |
| 288 | - <parameter name="Phibar" scale="1.0" value="35.0" min="0.0" max="50.0" free="0"/> | |
| 289 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 290 | - </node> | |
| 291 | - <node> | |
| 292 | - <parameter name="Phibar" scale="1.0" value="37.0" min="0.0" max="50.0" free="0"/> | |
| 293 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 294 | - </node> | |
| 295 | - <node> | |
| 296 | - <parameter name="Phibar" scale="1.0" value="39.0" min="0.0" max="50.0" free="0"/> | |
| 297 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 298 | - </node> | |
| 299 | - <node> | |
| 300 | - <parameter name="Phibar" scale="1.0" value="41.0" min="0.0" max="50.0" free="0"/> | |
| 301 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 302 | - </node> | |
| 303 | - <node> | |
| 304 | - <parameter name="Phibar" scale="1.0" value="43.0" min="0.0" max="50.0" free="0"/> | |
| 305 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 306 | - </node> | |
| 307 | - <node> | |
| 308 | - <parameter name="Phibar" scale="1.0" value="45.0" min="0.0" max="50.0" free="0"/> | |
| 309 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 310 | - </node> | |
| 311 | - <node> | |
| 312 | - <parameter name="Phibar" scale="1.0" value="47.0" min="0.0" max="50.0" free="0"/> | |
| 313 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 314 | - </node> | |
| 315 | - <node> | |
| 316 | - <parameter name="Phibar" scale="1.0" value="49.0" min="0.0" max="50.0" free="0"/> | |
| 317 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 318 | - </node> | |
| 319 | - </source> | |
| 320 | - <source name="Background(10.0-30.0)MeV" type="DRBFitting" instrument="COM" id="400001"> | |
| 321 | - <node> | |
| 322 | - <parameter name="Phibar" scale="1.0" value="1.0" min="0.0" max="50.0" free="0"/> | |
| 323 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 324 | - </node> | |
| 325 | - <node> | |
| 326 | - <parameter name="Phibar" scale="1.0" value="3.0" min="0.0" max="50.0" free="0"/> | |
| 327 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 328 | - </node> | |
| 329 | - <node> | |
| 330 | - <parameter name="Phibar" scale="1.0" value="5.0" min="0.0" max="50.0" free="0"/> | |
| 331 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 332 | - </node> | |
| 333 | - <node> | |
| 334 | - <parameter name="Phibar" scale="1.0" value="7.0" min="0.0" max="50.0" free="0"/> | |
| 335 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 336 | - </node> | |
| 337 | - <node> | |
| 338 | - <parameter name="Phibar" scale="1.0" value="9.0" min="0.0" max="50.0" free="0"/> | |
| 339 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 340 | - </node> | |
| 341 | - <node> | |
| 342 | - <parameter name="Phibar" scale="1.0" value="11.0" min="0.0" max="50.0" free="0"/> | |
| 343 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 344 | - </node> | |
| 345 | - <node> | |
| 346 | - <parameter name="Phibar" scale="1.0" value="13.0" min="0.0" max="50.0" free="0"/> | |
| 347 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 348 | - </node> | |
| 349 | - <node> | |
| 350 | - <parameter name="Phibar" scale="1.0" value="15.0" min="0.0" max="50.0" free="0"/> | |
| 351 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 352 | - </node> | |
| 353 | - <node> | |
| 354 | - <parameter name="Phibar" scale="1.0" value="17.0" min="0.0" max="50.0" free="0"/> | |
| 355 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 356 | - </node> | |
| 357 | - <node> | |
| 358 | - <parameter name="Phibar" scale="1.0" value="19.0" min="0.0" max="50.0" free="0"/> | |
| 359 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 360 | - </node> | |
| 361 | - <node> | |
| 362 | - <parameter name="Phibar" scale="1.0" value="21.0" min="0.0" max="50.0" free="0"/> | |
| 363 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 364 | - </node> | |
| 365 | - <node> | |
| 366 | - <parameter name="Phibar" scale="1.0" value="23.0" min="0.0" max="50.0" free="0"/> | |
| 367 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 368 | - </node> | |
| 369 | - <node> | |
| 370 | - <parameter name="Phibar" scale="1.0" value="25.0" min="0.0" max="50.0" free="0"/> | |
| 371 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 372 | - </node> | |
| 373 | - <node> | |
| 374 | - <parameter name="Phibar" scale="1.0" value="27.0" min="0.0" max="50.0" free="0"/> | |
| 375 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 376 | - </node> | |
| 377 | - <node> | |
| 378 | - <parameter name="Phibar" scale="1.0" value="29.0" min="0.0" max="50.0" free="0"/> | |
| 379 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 380 | - </node> | |
| 381 | - <node> | |
| 382 | - <parameter name="Phibar" scale="1.0" value="31.0" min="0.0" max="50.0" free="0"/> | |
| 383 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 384 | - </node> | |
| 385 | - <node> | |
| 386 | - <parameter name="Phibar" scale="1.0" value="33.0" min="0.0" max="50.0" free="0"/> | |
| 387 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 388 | - </node> | |
| 389 | - <node> | |
| 390 | - <parameter name="Phibar" scale="1.0" value="35.0" min="0.0" max="50.0" free="0"/> | |
| 391 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 392 | - </node> | |
| 393 | - <node> | |
| 394 | - <parameter name="Phibar" scale="1.0" value="37.0" min="0.0" max="50.0" free="0"/> | |
| 395 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 396 | - </node> | |
| 397 | - <node> | |
| 398 | - <parameter name="Phibar" scale="1.0" value="39.0" min="0.0" max="50.0" free="0"/> | |
| 399 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 400 | - </node> | |
| 401 | - <node> | |
| 402 | - <parameter name="Phibar" scale="1.0" value="41.0" min="0.0" max="50.0" free="0"/> | |
| 403 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 404 | - </node> | |
| 405 | - <node> | |
| 406 | - <parameter name="Phibar" scale="1.0" value="43.0" min="0.0" max="50.0" free="0"/> | |
| 407 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 408 | - </node> | |
| 409 | - <node> | |
| 410 | - <parameter name="Phibar" scale="1.0" value="45.0" min="0.0" max="50.0" free="0"/> | |
| 411 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 412 | - </node> | |
| 413 | - <node> | |
| 414 | - <parameter name="Phibar" scale="1.0" value="47.0" min="0.0" max="50.0" free="0"/> | |
| 415 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 416 | - </node> | |
| 417 | - <node> | |
| 418 | - <parameter name="Phibar" scale="1.0" value="49.0" min="0.0" max="50.0" free="0"/> | |
| 419 | - <parameter name="Normalization" scale="1.0" value="1.0" min="0.0" max="1000.0" free="1"/> | |
| 420 | - </node> | |
| 421 | - </source> | |
| 422 | -</source_library> |
doc/source/users/tutorials/comptel/pulsar.png
0 → 100644
60.2 KB
doc/source/users/tutorials/comptel/pulsar.rst
0 → 100755
| 1 | +.. _comptel_pulsar: | |
| 2 | + | |
| 3 | +Creating pulsar pulse profiles | |
| 4 | +------------------------------ | |
| 5 | + | |
| 6 | + .. admonition:: What you will learn | |
| 7 | + | |
| 8 | + You will learn how you can generate pulse profiles for pulsars. | |
| 9 | + | |
| 10 | + | |
| 11 | +Some of the gamma-ray sources in our Galaxy are pulsars, and eventually you | |
| 12 | +want to study their pulse profiles in the MeV band using COMPTEL data. | |
| 13 | +You do this using the :ref:`compulbin` script that generates a pulse profile | |
| 14 | +FITS file. Below an example of how you can do this for the Crab pulsar. | |
| 15 | + | |
| 16 | +.. code-block:: bash | |
| 17 | + | |
| 18 | + $ compulbin | |
| 19 | + Input observation definition file [obs.xml] | |
| 20 | + Pulsar name [PSR B0531+21] | |
| 21 | + Pulsar ephemerides file [$CTOOLS/share/models/ephem_xte.psrtime] | |
| 22 | + Minimum energy (MeV) (0.05-50.0) [0.75] | |
| 23 | + Maximum energy (MeV) (0.05-50.0) [30.0] | |
| 24 | + Number of phase bins (1-200) [33] | |
| 25 | + Output pulsar phase bins file [pulsar.fits] | |
| 26 | + | |
| 27 | +On output, :ref:`compulbin` creates a pulse profile FITS file that is displayed | |
| 28 | +in the figure below. | |
| 29 | + | |
| 30 | +.. figure:: pulsar.png | |
| 31 | + :width: 400px | |
| 32 | + :align: center | |
| 33 | + | |
| 34 | + *Crab pulsar pulse profile for viewing period 0001* | |
| 35 | + | ... | ... |
doc/source/users/tutorials/comptel/residuals.png
0 → 100644
175 KB
doc/source/users/tutorials/comptel/residuals.rst
0 → 100755
| 1 | +.. _comptel_residuals: | |
| 2 | + | |
| 3 | +Inspecting fit residuals | |
| 4 | +------------------------ | |
| 5 | + | |
| 6 | + .. admonition:: What you will learn | |
| 7 | + | |
| 8 | + You will learn how you can inspect the residuals after model fitting. | |
| 9 | + | |
| 10 | + | |
| 11 | +Following a model fit it is good practice to inspect the fit residuals, i.e. | |
| 12 | +the difference between the observed and the modelled event distributions. You do | |
| 13 | +this using the :ref:`comobsres` script that projects the fit residuals along | |
| 14 | +an event cone onto the sky. The example below show how a residual map is | |
| 15 | +created for the fit of the Crab point source model. | |
| 16 | + | |
| 17 | +.. code-block:: bash | |
| 18 | + | |
| 19 | + $ comobsres | |
| 20 | + Input observation definition file [obs.xml] outobs.xml | |
| 21 | + Input model definition file [models.xml] results.xml | |
| 22 | + Residual map computation algorithm (SUB|SUBDIV|SUBDIVSQRT|SIGNIFICANCE) [SIGNIFICANCE] | |
| 23 | + Coordinate system (CEL - celestial, GAL - galactic) (CEL|GAL) [GAL] | |
| 24 | + Projection method (AIT|AZP|CAR|GLS|MOL|SFL|SIN|STG|TAN) [TAN] | |
| 25 | + Output residual map [resmap.fits] | |
| 26 | + | |
| 27 | +On output :ref:`comobsres` creates a residual map that in the example above | |
| 28 | +is named ``resmap.fits``. The residual map is actually a map cube, containing | |
| 29 | +a residual map for each energy bin. The map cube is displayed in the Figure | |
| 30 | +below. The color scale ranges from -4 to +4 sigma. Some residuals appear to be | |
| 31 | +present in the data, with the largest residuals being generally observed at | |
| 32 | +low energies. | |
| 33 | + | |
| 34 | +.. figure:: residuals.png | |
| 35 | + :width: 600px | |
| 36 | + :align: center | |
| 37 | + | |
| 38 | + *Residual maps for the four energy bins* | ... | ... |
doc/source/users/tutorials/comptel/selection.rst
0 → 100755
| 1 | +.. _comptel_selection: | |
| 2 | + | |
| 3 | +Select data from database | |
| 4 | +------------------------- | |
| 5 | + | |
| 6 | + .. admonition:: What you will learn | |
| 7 | + | |
| 8 | + You will learn how to select COMPTEL data for an analysis with ctools. | |
| 9 | + | |
| 10 | + | |
| 11 | +The first step of a COMPTEL science analysis consists in the selection | |
| 12 | +of the relevant viewing periods. You do this with the :ref:`comobsselect` | |
| 13 | +script. In the following example, all viewing periods with pointing directions | |
| 14 | +within 30 degrees of the Crab and with dates between April and May 1991 | |
| 15 | +are selected. | |
| 16 | + | |
| 17 | +.. code-block:: bash | |
| 18 | + | |
| 19 | + $ comobsselect | |
| 20 | + Pointing selection region shape (CIRCLE|BOX) [CIRCLE] | |
| 21 | + Coordinate system (CEL - celestial, GAL - galactic) (CEL|GAL) [GAL] | |
| 22 | + Galactic longitude of selection centre (deg) (0-360) [184.56] | |
| 23 | + Galactic latitude of selection centre (deg) (-90-90) [-5.79] | |
| 24 | + Radius of selection circle (deg) (0-180) [30] | |
| 25 | + Start time (UTC string, JD, MJD or MET in seconds) [NONE] 1991-05-01T00:00:00 | |
| 26 | + Stop time (UTC string, JD, MJD or MET in seconds) [NONE] 1991-06-01T00:00:00 | |
| 27 | + Output observation definition file [obs.xml] | |
| 28 | + | |
| 29 | +Giving the limits on the start and stop time, only viewing period ``0001`` | |
| 30 | +will be selected by :ref:`comobsselect`. The resulting | |
| 31 | +:ref:`observation definition file <glossary_obsdef>` | |
| 32 | +``obs.xml`` will have the following content: | |
| 33 | + | |
| 34 | +.. code-block:: bash | |
| 35 | + | |
| 36 | + <?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
| 37 | + <observation_list title="observation list"> | |
| 38 | + <observation name="CRAB" id="vp0001_0" instrument="COM"> | |
| 39 | + <parameter name="EVP" file="$COMDATA/phase01/vp0001_0/m28511_evp.fits" /> | |
| 40 | + <parameter name="TIM" file="$COMDATA/dbase/tim/vp0001_0_tim.fits" /> | |
| 41 | + <parameter name="OAD" file="$COMDATA/phase01/vp0001_0/m20037_oad.fits" /> | |
| 42 | + <parameter name="OAD" file="$COMDATA/phase01/vp0001_0/m20039_oad.fits" /> | |
| 43 | + <parameter name="OAD" file="$COMDATA/phase01/vp0001_0/m20041_oad.fits" /> | |
| 44 | + <parameter name="OAD" file="$COMDATA/phase01/vp0001_0/m20045_oad.fits" /> | |
| 45 | + <parameter name="OAD" file="$COMDATA/phase01/vp0001_0/m20048_oad.fits" /> | |
| 46 | + <parameter name="OAD" file="$COMDATA/phase01/vp0001_0/m20050_oad.fits" /> | |
| 47 | + <parameter name="OAD" file="$COMDATA/phase01/vp0001_0/m20054_oad.fits" /> | |
| 48 | + <parameter name="OAD" file="$COMDATA/phase01/vp0001_0/m20058_oad.fits" /> | |
| 49 | + <parameter name="OAD" file="$COMDATA/phase01/vp0001_0/m20064_oad.fits" /> | |
| 50 | + <parameter name="OAD" file="$COMDATA/phase01/vp0001_0/m20066_oad.fits" /> | |
| 51 | + <parameter name="OAD" file="$COMDATA/phase01/vp0001_0/m20068_oad.fits" /> | |
| 52 | + <parameter name="OAD" file="$COMDATA/phase01/vp0001_0/m20071_oad.fits" /> | |
| 53 | + <parameter name="OAD" file="$COMDATA/phase01/vp0001_0/m20073_oad.fits" /> | |
| 54 | + <parameter name="OAD" file="$COMDATA/phase01/vp0001_0/m20078_oad.fits" /> | |
| 55 | + <parameter name="OAD" file="$COMDATA/phase01/vp0001_0/m20081_oad.fits" /> | |
| 56 | + </observation> | |
| 57 | + </observation_list> | |
| 58 | + | |
| 59 | +The file contains a single observation, composed of an event file (``EVP``), | |
| 60 | +a Good Time Interval file (``TIM``) and 15 Orbit Aspect data files (``OAD``). | |
| 61 | + | |
| 62 | +.. note:: | |
| 63 | + | |
| 64 | + If no limit on the observation dates should be applied then specify ``NONE`` | |
| 65 | + as the start or stop time. | ... | ... |
doc/source/users/tutorials/comptel/tsmap.png
0 → 100644
51.3 KB
doc/source/users/tutorials/comptel/tsmap.rst
0 → 100755
| 1 | +.. _comptel_tsmap: | |
| 2 | + | |
| 3 | +Generating a TS map | |
| 4 | +------------------- | |
| 5 | + | |
| 6 | + .. admonition:: What you will learn | |
| 7 | + | |
| 8 | + You will learn how you can generate a Test Statistic map for COMPTEL | |
| 9 | + data. | |
| 10 | + | |
| 11 | + | |
| 12 | +Eventually you may want to investigate if gamma-ray sources are present | |
| 13 | +in a specific data set. You do this using the :ref:`comlixmap` script that | |
| 14 | +generates a maximum likelihood map, also known as Test Statistic map. In the | |
| 15 | +example below, a Test Statistic map with 10x10 pixels is generated around | |
| 16 | +the position of the Crab pulsar and pulsar wind nebula. Note that :ref:`comlixmap` | |
| 17 | +will fit a test source jointly for the four energy bins that are present in | |
| 18 | +the | |
| 19 | +:ref:`observation definition file <glossary_obsdef>` ``obs_binned.xml``. | |
| 20 | + | |
| 21 | + | |
| 22 | +.. code-block:: bash | |
| 23 | + | |
| 24 | + $ comlixmap | |
| 25 | + Input observation definition file [obs.xml] obs_binned.xml | |
| 26 | + Input model definition file [models.xml] | |
| 27 | + Test source name [Crab] | |
| 28 | + Coordinate system (CEL - celestial, GAL - galactic) (CEL|GAL) [GAL] | |
| 29 | + Projection method (AIT|AZP|CAR|GLS|MER|MOL|SFL|SIN|STG|TAN) [TAN] | |
| 30 | + First coordinate of image center in degrees (RA or galactic l) (0-360) [180.24] 184.6 | |
| 31 | + Second coordinate of image center in degrees (DEC or galactic b) (-90-90) [-1.50] -5.8 | |
| 32 | + Image scale (in degrees/pixel) (0.01-10.0) [1.0] | |
| 33 | + Size of the X axis in pixels (1-500) [10] | |
| 34 | + Size of the Y axis in pixels (1-500) [10] | |
| 35 | + Method for background computation (PHINOR|BGDLIXA|BGDLIXE) [BGDLIXE] | |
| 36 | + Output Test Statistic map file [tsmap.fits] | |
| 37 | + | |
| 38 | +.. warning:: | |
| 39 | + | |
| 40 | + The executing of the :ref:`comlixmap` script takes some time since an iterative | |
| 41 | + SRCLIX analysis is performed at each of the map's grid positions. The example | |
| 42 | + above takes between 30 min and 2 hours, depending on operating system and | |
| 43 | + processor speed. | |
| 44 | + | |
| 45 | +On output :ref:`comlixmap` creates a Test Statistic map, which in the example | |
| 46 | +above is named ``tsmap.fits``. The figure below shows the content of the map, | |
| 47 | +which reveals a significant gamma-ray source at the position of the Crab. | |
| 48 | + | |
| 49 | +.. figure:: tsmap.png | |
| 50 | + :width: 400px | |
| 51 | + :align: center | |
| 52 | + | |
| 53 | + *Test statistic map around the Crab for viewing period 0001* | |
| 54 | + | ... | ... |
doc/source/users/tutorials/cta/1dc/index.rst deleted
doc/source/users/tutorials/cta/howto/index.rst deleted
| 1 | -.. _cta_howto: | |
| 2 | - | |
| 3 | -CTA How-tos | |
| 4 | -=========== | |
| 5 | - | |
| 6 | -The following sections teach you how to use ctools to address some typical | |
| 7 | -CTA science analysis. | |
| 8 | - | |
| 9 | -CTA data analysis | |
| 10 | ------------------ | |
| 11 | - | |
| 12 | -.. toctree:: | |
| 13 | - :maxdepth: 1 | |
| 14 | - | |
| 15 | - howto_combine_observations | |
| 16 | - howto_stacked_analysis | |
| 17 | - howto_model_handling_python | |
| 18 | - howto_advanced_python_fitting | |
| 19 | - howto_scs | |
| 20 | - howto_connect_irfs | |
| 21 | - howto_connect_models | |
| 22 | - howto_xspec | |
| 23 | - howto_likelihood_profiles | |
| 24 | - | |
| 25 | - | |
| 26 | -CTA first Data Challenge data analysis | |
| 27 | --------------------------------------- | |
| 28 | - | |
| 29 | -.. toctree:: | |
| 30 | - :maxdepth: 1 | |
| 31 | - | |
| 32 | - howto_prepare_1dc | |
| 33 | - howto_ts | |
| 34 | - howto_tsmap | |
| 35 | - howto_extent | |
| 36 | - howto_ulimit | |
| 37 | - howto_lightcurve | |
| 38 | - howto_phasecurve | |
| 39 | - howto_exclude | |
| 40 | - howto_display | |
| 41 | - howto_vo | |
| 42 | - | |
| 43 | - | |
| 44 | -Analysis of data from other instruments | |
| 45 | ---------------------------------------- | |
| 46 | - | |
| 47 | -.. toctree:: | |
| 48 | - :maxdepth: 1 | |
| 49 | - | |
| 50 | - howto_combine_instruments |
doc/source/users/tutorials/cta/index.rst
| 1 | 1 | .. _tutorials_cta: |
| 2 | 2 | |
| 3 | -Cherenkov Telescope Array | |
| 4 | -========================= | |
| 3 | +CTA | |
| 4 | +=== | |
| 5 | 5 | |
| 6 | 6 | .. admonition:: What you will learn |
| 7 | 7 | |
| ... | ... | @@ -9,9 +9,78 @@ Cherenkov Telescope Array |
| 9 | 9 | `Cherenkov Telescope Array <https://www.cta-observatory.org>`_ |
| 10 | 10 | with ctools. |
| 11 | 11 | |
| 12 | + | |
| 13 | +First steps with ctools | |
| 14 | +----------------------- | |
| 15 | + | |
| 16 | +.. toctree:: | |
| 17 | + :maxdepth: 1 | |
| 18 | + | |
| 19 | + quickstart/simulating | |
| 20 | + quickstart/selecting | |
| 21 | + quickstart/skymap | |
| 22 | + quickstart/binning | |
| 23 | + quickstart/response | |
| 24 | + quickstart/fitting | |
| 25 | + quickstart/residual_map | |
| 26 | + quickstart/residual_spectrum | |
| 27 | + quickstart/butterfly | |
| 28 | + quickstart/spectrum | |
| 29 | + quickstart/unbinned | |
| 30 | + quickstart/energy_dispersion | |
| 31 | + quickstart/onoff | |
| 32 | + quickstart/ctools-from-python | |
| 33 | + | |
| 34 | +First CTA Data Challenge | |
| 35 | +------------------------ | |
| 36 | + | |
| 37 | +.. toctree:: | |
| 38 | + :maxdepth: 1 | |
| 39 | + | |
| 40 | + 1dc/scope | |
| 41 | + 1dc/getting_data | |
| 42 | + 1dc/data_organisation | |
| 43 | + 1dc/first | |
| 44 | + | |
| 45 | +CTA data analysis | |
| 46 | +----------------- | |
| 47 | + | |
| 48 | +.. toctree:: | |
| 49 | + :maxdepth: 1 | |
| 50 | + | |
| 51 | + howto/howto_combine_observations | |
| 52 | + howto/howto_stacked_analysis | |
| 53 | + howto/howto_model_handling_python | |
| 54 | + howto/howto_advanced_python_fitting | |
| 55 | + howto/howto_scs | |
| 56 | + howto/howto_connect_irfs | |
| 57 | + howto/howto_connect_models | |
| 58 | + howto/howto_xspec | |
| 59 | + howto/howto_likelihood_profiles | |
| 60 | + | |
| 61 | + | |
| 62 | +CTA first Data Challenge data analysis | |
| 63 | +-------------------------------------- | |
| 64 | + | |
| 65 | +.. toctree:: | |
| 66 | + :maxdepth: 1 | |
| 67 | + | |
| 68 | + howto/howto_prepare_1dc | |
| 69 | + howto/howto_ts | |
| 70 | + howto/howto_tsmap | |
| 71 | + howto/howto_extent | |
| 72 | + howto/howto_ulimit | |
| 73 | + howto/howto_lightcurve | |
| 74 | + howto/howto_phasecurve | |
| 75 | + howto/howto_exclude | |
| 76 | + howto/howto_display | |
| 77 | + howto/howto_vo | |
| 78 | + | |
| 79 | + | |
| 80 | +Analysis of data from other instruments | |
| 81 | +--------------------------------------- | |
| 82 | + | |
| 12 | 83 | .. toctree:: |
| 13 | 84 | :maxdepth: 1 |
| 14 | 85 | |
| 15 | - quickstart/index | |
| 16 | - 1dc/index | |
| 17 | - howto/index | |
| 86 | + howto/howto_combine_instruments | ... | ... |
doc/source/users/tutorials/cta/quickstart/index.rst deleted
| 1 | -.. _cta_quickstart: | |
| 2 | - | |
| 3 | -First steps with ctools | |
| 4 | ------------------------ | |
| 5 | - | |
| 6 | -This section provides a hands-on introduction of ctools. By means of an | |
| 7 | -example you will learn how to simulate and analyse CTA event data. This | |
| 8 | -section is intended to be read by newcomers. The reading and executing of the | |
| 9 | -examples should take about an hour, so grab some coffee before you start. | |
| 10 | - | |
| 11 | -.. toctree:: | |
| 12 | - :maxdepth: 1 | |
| 13 | - | |
| 14 | - simulating | |
| 15 | - selecting | |
| 16 | - skymap | |
| 17 | - binning | |
| 18 | - response | |
| 19 | - fitting | |
| 20 | - residual_map | |
| 21 | - residual_spectrum | |
| 22 | - butterfly | |
| 23 | - spectrum | |
| 24 | - unbinned | |
| 25 | - energy_dispersion | |
| 26 | - onoff | |
| 27 | - ctools-from-python |
doc/source/users/tutorials/fermi/howto_fermi_butterfly.png renamed to doc/source/users/tutorials/fermi/fermi_butterfly.png
77.1 KB
doc/source/users/tutorials/fermi/howto_fermi_butterfly.rst renamed to doc/source/users/tutorials/fermi/fermi_butterfly.rst
| 1 | -.. _howto_fermi_butterfly: | |
| 1 | +.. _fermi_butterfly: | |
| 2 | 2 | |
| 3 | -Generate a butterfly diagram for a model component | |
| 4 | --------------------------------------------------- | |
| 3 | +Generate a butterfly diagram | |
| 4 | +---------------------------- | |
| 5 | 5 | |
| 6 | 6 | .. admonition:: What you will learn |
| 7 | 7 | |
| ... | ... | @@ -29,7 +29,7 @@ output file from :ref:`ctlike` as input: |
| 29 | 29 | the envelope of the butterfly diagram. The figure below gives a graphical |
| 30 | 30 | representation of the envelope. |
| 31 | 31 | |
| 32 | -.. figure:: howto_fermi_butterfly.png | |
| 32 | +.. figure:: fermi_butterfly.png | |
| 33 | 33 | :width: 600px |
| 34 | 34 | :align: center |
| 35 | 35 | ... | ... |
doc/source/users/tutorials/fermi/howto_fermi_data.jpg renamed to doc/source/users/tutorials/fermi/fermi_data.jpg
272 KB
doc/source/users/tutorials/fermi/howto_fermi_errors.rst renamed to doc/source/users/tutorials/fermi/fermi_errors.rst
| 1 | -.. _howto_fermi_errors: | |
| 1 | +.. _fermi_errors: | |
| 2 | 2 | |
| 3 | -Determine asymmetric model parameter errors for a model component | |
| 4 | ------------------------------------------------------------------ | |
| 3 | +Determine errors for a model parameters | |
| 4 | +--------------------------------------- | |
| 5 | 5 | |
| 6 | 6 | .. admonition:: What you will learn |
| 7 | 7 | ... | ... |
doc/source/users/tutorials/fermi/howto_fermi_fitting.rst renamed to doc/source/users/tutorials/fermi/fermi_fitting.rst
doc/source/users/tutorials/fermi/howto_fermi_prepare.rst renamed to doc/source/users/tutorials/fermi/fermi_prepare.rst
| 1 | -.. _howto_fermi_prepare: | |
| 1 | +.. _fermi_prepare: | |
| 2 | 2 | |
| 3 | 3 | Prepare Fermi-LAT data |
| 4 | 4 | ---------------------- |
| ... | ... | @@ -29,7 +29,7 @@ Start with requesting the data you are interested in from the |
| 29 | 29 | `Fermi-LAT Data server <https://fermi.gsfc.nasa.gov/cgi-bin/ssc/LAT/LATDataQuery.cgi>`_. |
| 30 | 30 | As example the figure below shows a request for data around the Vela pulsar. |
| 31 | 31 | |
| 32 | -.. figure:: howto_fermi_query.jpg | |
| 32 | +.. figure:: fermi_query.jpg | |
| 33 | 33 | :width: 600px |
| 34 | 34 | :align: center |
| 35 | 35 | |
| ... | ... | @@ -38,7 +38,7 @@ As example the figure below shows a request for data around the Vela pulsar. |
| 38 | 38 | After submitting the request you will get information of how to retrieve the |
| 39 | 39 | data: |
| 40 | 40 | |
| 41 | -.. figure:: howto_fermi_data.jpg | |
| 41 | +.. figure:: fermi_data.jpg | |
| 42 | 42 | :width: 600px |
| 43 | 43 | :align: center |
| 44 | 44 | ... | ... |
doc/source/users/tutorials/fermi/howto_fermi_query.jpg renamed to doc/source/users/tutorials/fermi/fermi_query.jpg
255 KB
doc/source/users/tutorials/fermi/howto_fermi_spectrum.png renamed to doc/source/users/tutorials/fermi/fermi_spectrum.png
44.2 KB
doc/source/users/tutorials/fermi/howto_fermi_spectrum.rst renamed to doc/source/users/tutorials/fermi/fermi_spectrum.rst
| 1 | -.. _howto_fermi_spectrum: | |
| 1 | +.. _fermi_spectrum: | |
| 2 | 2 | |
| 3 | -Generate a spectral energy distribution for a source | |
| 4 | ----------------------------------------------------- | |
| 3 | +Generate a spectrum | |
| 4 | +------------------- | |
| 5 | 5 | |
| 6 | 6 | .. admonition:: What you will learn |
| 7 | 7 | |
| ... | ... | @@ -31,7 +31,7 @@ will convert the Vela spectrum in the input model into a node function and fit |
| 31 | 31 | all intensity nodes using :ref:`ctlike`. The resulting node intensities are |
| 32 | 32 | then interpreted as the spectral point, and are displayed graphically below: |
| 33 | 33 | |
| 34 | -.. figure:: howto_fermi_spectrum.png | |
| 34 | +.. figure:: fermi_spectrum.png | |
| 35 | 35 | :width: 600px |
| 36 | 36 | :align: center |
| 37 | 37 | ... | ... |
doc/source/users/tutorials/fermi/howto_fermi_tsmap.png renamed to doc/source/users/tutorials/fermi/fermi_tsmap.png
24 KB
doc/source/users/tutorials/fermi/howto_fermi_tsmap.rst renamed to doc/source/users/tutorials/fermi/fermi_tsmap.rst
| 1 | -.. _howto_fermi_tsmap: | |
| 1 | +.. _fermi_tsmap: | |
| 2 | 2 | |
| 3 | 3 | Generate a Test Statistic map |
| 4 | 4 | ----------------------------- |
| ... | ... | @@ -35,7 +35,7 @@ around the location of the Vela pulsar and saved the result in the FITS file |
| 35 | 35 | at each grid position. The Test Statistics map is displayed using |
| 36 | 36 | `ds9 <http://ds9.si.edu>`_ in the figure below: |
| 37 | 37 | |
| 38 | -.. figure:: howto_fermi_tsmap.png | |
| 38 | +.. figure:: fermi_tsmap.png | |
| 39 | 39 | :width: 400px |
| 40 | 40 | :align: center |
| 41 | 41 | ... | ... |
doc/source/users/tutorials/fermi/howto_fermi_ulimit.rst renamed to doc/source/users/tutorials/fermi/fermi_ulimit.rst
doc/source/users/tutorials/fermi/index.rst
| ... | ... | @@ -29,10 +29,10 @@ tutorial that is based on a simple analysis of the Vela pulsar. |
| 29 | 29 | .. toctree:: |
| 30 | 30 | :maxdepth: 1 |
| 31 | 31 | |
| 32 | - howto_fermi_prepare | |
| 33 | - howto_fermi_fitting | |
| 34 | - howto_fermi_butterfly | |
| 35 | - howto_fermi_spectrum | |
| 36 | - howto_fermi_tsmap | |
| 37 | - howto_fermi_ulimit | |
| 38 | - howto_fermi_errors | |
| 32 | + fermi_prepare | |
| 33 | + fermi_fitting | |
| 34 | + fermi_butterfly | |
| 35 | + fermi_spectrum | |
| 36 | + fermi_tsmap | |
| 37 | + fermi_ulimit | |
| 38 | + fermi_errors | ... | ... |
doc/source/users/tutorials/spi/index.rst
doc/source/users/user_manual/classical.rst
| 1 | 1 | .. _um_classical: |
| 2 | 2 | |
| 3 | -Classical On/Off analysis | |
| 4 | -------------------------- | |
| 3 | +Classical IACT On/Off analysis | |
| 4 | +------------------------------ | |
| 5 | 5 | |
| 6 | 6 | The traditional technique that is widely used by the IACT community for spectral |
| 7 | 7 | analysis consists in selecting the source events from an On region and | ... | ... |
doc/source/users/user_manual/irf.rst
doc/source/users/user_manual/irf_intro.rst
| 1 | 1 | .. _um_irf_intro: |
| 2 | 2 | |
| 3 | -What are instrument response functions? | |
| 4 | ---------------------------------------- | |
| 3 | +What are IRFs? | |
| 4 | +-------------- | |
| 5 | 5 | |
| 6 | -The :ref:`instrument response functions <glossary_irf>` provide a mathematical | |
| 6 | +The :ref:`instrument response functions <glossary_irf>` (IRFs) provide a mathematical | |
| 7 | 7 | description that links the reconstructed photon arrival direction :math:`p'`, |
| 8 | 8 | energy :math:`E'` and trigger time :math:`t'` of an event to the true incident |
| 9 | 9 | direction :math:`p`, energy :math:`E` and time :math:`t` of a photon. The | ... | ... |
doc/source/users/user_manual/models_bgd_comptel.rst
| ... | ... | @@ -137,4 +137,4 @@ model. |
| 137 | 137 | corresponding layers. In the first example above, the first four layers are |
| 138 | 138 | fixed. In the second example, all layers with :math:`\bar{\varphi}` |
| 139 | 139 | values below 16 degrees were fixed, the first fitted normalisation |
| 140 | - is for :math:`\bar{\varphi}=17` degrees. | |
| 140 | + is for :math:`\bar{\varphi}` = 17 degrees. | ... | ... |
doc/source/users/user_manual/observations.rst
| ... | ... | @@ -149,12 +149,14 @@ Stacked data analysis |
| 149 | 149 | |
| 150 | 150 | To speed-up the computations, binned observations can be stacked together, |
| 151 | 151 | requiring the computation of average response functions that properly weight |
| 152 | -the individual instrument response functions for each observation. Stacking | |
| 153 | -of observations is possible for binned counts cubes and On/Off spectra. | |
| 152 | +the individual instrument response functions for each observation. For IACT | |
| 153 | +analysis, stacking of observations is possible for binned counts cubes and | |
| 154 | +On/Off spectra. For COMPTEL data analysis, stacking is performed using the | |
| 155 | +:ref:`comobsadd` script. | |
| 154 | 156 | |
| 155 | 157 | |
| 156 | -Stacked counts cubes | |
| 157 | -~~~~~~~~~~~~~~~~~~~~ | |
| 158 | +Stacked IACT counts cubes | |
| 159 | +~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| 158 | 160 | |
| 159 | 161 | By default, :ref:`ctbin` stacks the events from multiple observations into |
| 160 | 162 | a single counts cube (to produce counts cubes for each individual observation, |
| ... | ... | @@ -217,8 +219,8 @@ The files for a stacked binned observation are specified as follows in an |
| 217 | 219 | (the ``EdispCube`` parameter is optional). |
| 218 | 220 | |
| 219 | 221 | |
| 220 | -Stacked On/Off spectra | |
| 221 | -~~~~~~~~~~~~~~~~~~~~~~ | |
| 222 | +Stacked IACT On/Off spectra | |
| 223 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| 222 | 224 | |
| 223 | 225 | By default, :ref:`csphagen` creates On/Off spectra and response information |
| 224 | 226 | for each individual observation, but executing :ref:`csphagen` with the |
| ... | ... | @@ -271,3 +273,29 @@ On/Off observation has the same format as for a single On/Off observation: |
| 271 | 273 | </observation> |
| 272 | 274 | </observation_list> |
| 273 | 275 | |
| 276 | + | |
| 277 | +Stacked COMPTEL data space | |
| 278 | +~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| 279 | + | |
| 280 | +You can stack binned COMPTEL observations using the :ref:`comobsadd` script. | |
| 281 | +Binned event data are stacked using | |
| 282 | + | |
| 283 | +.. math:: | |
| 284 | + {\tt DRE}(\chi, \psi, \bar{\varphi}|\{E\}) = \sum_i {\tt DRE}_i(\chi, \psi, \bar{\varphi}|\{E\}) | |
| 285 | + | |
| 286 | +the background models are stacked using | |
| 287 | + | |
| 288 | +.. math:: | |
| 289 | + {\tt DRB}(\chi, \psi, \bar{\varphi}|\{E\}) = \sum_i {\tt DRB}_i(\chi, \psi, \bar{\varphi}|\{E\}) | |
| 290 | + | |
| 291 | +the exposures are stacked by determining the maximum of the sum of all exposures using | |
| 292 | + | |
| 293 | +.. math:: | |
| 294 | + {\tt DRX}(\alpha, \delta) = \sum_i \max_{\alpha',\delta'} {\tt DRX}_i(\alpha', \delta') | |
| 295 | + | |
| 296 | +and the geometries are stacked by weighting with the respective exposure time for | |
| 297 | +individual observations using | |
| 298 | + | |
| 299 | +.. math:: | |
| 300 | + {\tt DRG}(\chi, \psi, \bar{\varphi}) = \frac{1}{T} \sum_i T_i \, {\tt DRG}_i(\chi, \psi, \bar{\varphi}) | |
| 301 | + | ... | ... |
modules/comscripts/comlixfit.par
| ... | ... | @@ -33,8 +33,8 @@ fix_spat_for_ts, b, h, no,,, "Fix spatial parameters for TS computation?" |
| 33 | 33 | fix_ext_for_initial, b, h, no,,, "Fix extension parameters for initial fit iteration?" |
| 34 | 34 | bkgmethod, s, a, BGDLIXE,PHINOR|BGDLIXA|BGDLIXE,, "Method for background computation" |
| 35 | 35 | nrunav, i, h, 3,,, "Number of Chi/Psi bins used for running average" |
| 36 | -navgr, i, h, 3,,, "Number of Chi/Psi bins used for averaging" | |
| 37 | -nincl, i, h, 13,,, "Number of Phibar layers to include" | |
| 36 | +navgr, i, h, 5,,, "Number of Chi/Psi bins used for averaging" | |
| 37 | +nincl, i, h, 15,,, "Number of Phibar layers to include" | |
| 38 | 38 | nexcl, i, h, 0,,, "Number of Phibar layers to exclude" |
| 39 | 39 | phi_first, i, h, -1,,, "First Phibar layer for fitting (starting from 0; -1: no selection)" |
| 40 | 40 | phi_last, i, h, -1,,, "Last Phibar layer for fitting (starting from 0;-1: no selection)" | ... | ... |
modules/comscripts/comlixmap.par
| ... | ... | @@ -41,8 +41,8 @@ accept_dec, r, h, 0.0,0.0,10.0, "Maximum accepted log-likelihood decrease" |
| 41 | 41 | fix_spat, b, h, yes,,, "Fix spatial parameters for TS map computation?" |
| 42 | 42 | bkgmethod, s, a, BGDLIXE,PHINOR|BGDLIXA|BGDLIXE,, "Method for background computation" |
| 43 | 43 | nrunav, i, h, 3,,, "Number of Chi/Psi bins used for running average" |
| 44 | -navgr, i, h, 3,,, "Number of Chi/Psi bins used for averaging" | |
| 45 | -nincl, i, h, 13,,, "Number of Phibar layers to include" | |
| 44 | +navgr, i, h, 5,,, "Number of Chi/Psi bins used for averaging" | |
| 45 | +nincl, i, h, 15,,, "Number of Phibar layers to include" | |
| 46 | 46 | nexcl, i, h, 0,,, "Number of Phibar layers to exclude" |
| 47 | 47 | phi_first, i, h, -1,,, "First Phibar layer for fitting (starting from 0; -1: no selection)" |
| 48 | 48 | phi_last, i, h, -1,,, "Last Phibar layer for fitting (starting from 0;-1: no selection)" | ... | ... |
modules/comscripts/comobsback.par
| ... | ... | @@ -27,8 +27,8 @@ outobs, f, a, obs_back.xml,,, "Output observation definition file" |
| 27 | 27 | #================== |
| 28 | 28 | bkgmethod, s, a, BGDLIXE,PHINOR|BGDLIXA|BGDLIXE,, "Method for background computation" |
| 29 | 29 | nrunav, i, h, 3,,, "Number of Chi/Psi bins used for running average" |
| 30 | -navgr, i, h, 3,,, "Number of Chi/Psi bins used for averaging" | |
| 31 | -nincl, i, h, 13,,, "Number of Phibar layers to include" | |
| 30 | +navgr, i, h, 5,,, "Number of Chi/Psi bins used for averaging" | |
| 31 | +nincl, i, h, 15,,, "Number of Phibar layers to include" | |
| 32 | 32 | nexcl, i, h, 0,,, "Number of Phibar layers to exclude" |
| 33 | 33 | phinor, b, h, yes,,, "Normalise Phibar distribution?" |
| 34 | 34 | ... | ... |
modules/comscripts/comobsmodel.par
| ... | ... | @@ -23,7 +23,7 @@ outmodel, f, a, models.xml,,, "Output model definition file" |
| 23 | 23 | # Script parameters |
| 24 | 24 | #================== |
| 25 | 25 | ra, r, a, NONE,,, "Right Ascension of point source (deg)" |
| 26 | -dec, r, a, NONE,,, "Declinaison of point source (deg)" | |
| 26 | +dec, r, a, NONE,,, "Declination of point source (deg)" | |
| 27 | 27 | srcname, s, a, NONE,,, "Name of point source" |
| 28 | 28 | brems, s, a, NONE,NONE|MAP|CUBE,, "Bremsstrahlung component" |
| 29 | 29 | ic, s, a, NONE,NONE|MAP|CUBE,, "Inverse Compton component" | ... | ... |
modules/comscripts/compulbin.par
| ... | ... | @@ -23,7 +23,7 @@ outfile, f, a, pulsar.fits,,, "Output pulsar phase bins file" |
| 23 | 23 | # Script parameters |
| 24 | 24 | #================== |
| 25 | 25 | psrname, s, a, PSR B0531+21,,, "Pulsar name" |
| 26 | -ephemerides, f, a, ephem_crab.psrtime,,, "Pulsar ephemerides file" | |
| 26 | +ephemerides, f, a, $CTOOLS/share/models/ephem_xte.psrtime,,, "Pulsar ephemerides file" | |
| 27 | 27 | emin, r, a, 0.75,0.05,50.0, "Minimum energy (MeV)" |
| 28 | 28 | emax, r, a, 30.0,0.05,50.0, "Maximum energy (MeV)" |
| 29 | 29 | pnumbins, i, a, 33,1,200, "Number of phase bins" | ... | ... |