diff --git a/cscripts/csresmap.par b/cscripts/csresmap.par index 0841d94..c98b587 100644 --- a/cscripts/csresmap.par +++ b/cscripts/csresmap.par @@ -19,10 +19,10 @@ inobs, f, a, events.fits,,, "Input event list, counts cube, or observation definition XML file" inmodel, f, a, $CTOOLS/share/models/crab.xml,,, "Input model definition XML file" modcube, f, a, NONE,,, "Input model cube file (generated with ctmodel)" -expcube, f, a, NONE,,, "Input exposure cube file (only needed for stacked analysis)" -psfcube, f, a, NONE,,, "Input PSF cube file (only needed for stacked analysis)" -edispcube, f, a, NONE,,, "Input energy dispersion cube file (only needed for stacked analysis)" -bkgcube, f, a, NONE,,, "Input background cube file (only needed for stacked analysis)" +expcube, f, a, NONE,,, "Input exposure cube file" +psfcube, f, a, NONE,,, "Input PSF cube file" +edispcube, f, a, NONE,,, "Input energy dispersion cube file" +bkgcube, f, a, NONE,,, "Input background cube file" caldb, s, a, prod2,,, "Calibration database" irf, s, a, South_0.5h,,, "Instrument response function" edisp, b, h, no,,, "Apply energy dispersion?" @@ -43,7 +43,7 @@ yref, r, a, 22.01,-90,90, "Second coordinate of image center in degrees (DE nxpix, i, a, 200,,, "Size of the X axis in pixels" nypix, i, a, 200,,, "Size of the Y axis in pixels" binsz, r, a, 0.02,,, "Pixel size (deg/pixel)" -algorithm, s, a, SUBDIV,SUB|SUBDIV|SUBDIVSQRT|SIGNIFICANCE,, "Residual map computation algorithm" +algorithm, s, a, SIGNIFICANCE,SUB|SUBDIV|SUBDIVSQRT|SIGNIFICANCE,, "Residual map computation algorithm" # # Standard parameters diff --git a/cscripts/csspec.par b/cscripts/csspec.par index 49403e4..1f150a3 100644 --- a/cscripts/csspec.par +++ b/cscripts/csspec.par @@ -19,10 +19,10 @@ inobs, f, a, events.fits,,, "Input event list, counts cube, or observation definition XML file" inmodel, f, a, $CTOOLS/share/models/crab.xml,,, "Input model definition XML file" srcname, s, a, Crab,,, "Source name" -expcube, f, a, NONE,,, "Input exposure cube file (only needed for stacked analysis)" -psfcube, f, a, NONE,,, "Input PSF cube file (only needed for stacked analysis)" -edispcube, f, a, NONE,,, "Input energy dispersion cube file (only needed for stacked analysis)" -bkgcube, f, a, NONE,,, "Input background cube file (only needed for stacked analysis)" +expcube, f, a, NONE,,, "Input exposure cube file" +psfcube, f, a, NONE,,, "Input PSF cube file" +edispcube, f, a, NONE,,, "Input energy dispersion cube file" +bkgcube, f, a, NONE,,, "Input background cube file" caldb, s, a, prod2,,, "Calibration database" irf, s, a, South_0.5h,,, "Instrument response function" edisp, b, h, no,,, "Apply energy dispersion?" diff --git a/cscripts/cstsdist.par b/cscripts/cstsdist.par index cfc8014..de339e7 100644 --- a/cscripts/cstsdist.par +++ b/cscripts/cstsdist.par @@ -19,10 +19,10 @@ inobs, f, h, NONE,,, "Input event list, counts cube, or observation definition XML file" inmodel, f, a, $CTOOLS/share/models/crab.xml,,, "Input model definition XML file" srcname, s, a, Crab,,, "Source name" -expcube, f, a, NONE,,, "Input exposure cube file (only needed for stacked analysis)" -psfcube, f, a, NONE,,, "Input PSF cube file (only needed for stacked analysis)" -edispcube, f, a, NONE,,, "Input energy dispersion cube file (only needed for stacked analysis)" -bkgcube, f, a, NONE,,, "Input background cube file (only needed for stacked analysis)" +expcube, f, a, NONE,,, "Input exposure cube file" +psfcube, f, a, NONE,,, "Input PSF cube file" +edispcube, f, a, NONE,,, "Input energy dispersion cube file" +bkgcube, f, a, NONE,,, "Input background cube file" caldb, s, a, prod2,,, "Calibration database" irf, s, a, South_0.5h,,, "Instrument response function" edisp, b, h, no,,, "Apply energy dispersion?" diff --git a/cscripts/cstsmapsplit.par b/cscripts/cstsmapsplit.par index bafeafc..7869298 100644 --- a/cscripts/cstsmapsplit.par +++ b/cscripts/cstsmapsplit.par @@ -19,10 +19,10 @@ inobs, f, a, events.fits,,, "Input event list, counts cube or observation definition XML file" inmodel, f, a, $CTOOLS/share/models/crab.xml,,, "Input model definition XML file" srcname, s, a, Crab,,, "Test source name" -expcube, f, a, NONE,,, "Input exposure cube file (only needed for stacked analysis)" -psfcube, f, a, NONE,,, "Input PSF cube file (only needed for stacked analysis)" -edispcube, f, a, NONE,,, "Input energy dispersion cube file (only needed for stacked analysis)" -bkgcube, f, a, NONE,,, "Input background cube file (only needed for stacked analysis)" +expcube, f, a, NONE,,, "Input exposure cube file" +psfcube, f, a, NONE,,, "Input PSF cube file" +edispcube, f, a, NONE,,, "Input energy dispersion cube file" +bkgcube, f, a, NONE,,, "Input background cube file" caldb, s, a, prod2,,, "Calibration database" irf, s, a, South_0.5h,,, "Instrument response function" edisp, b, h, no,,, "Apply energy dispersion?" diff --git a/doc/source/users/reference_manual/csresmap.rst b/doc/source/users/reference_manual/csresmap.rst index 5321ed6..6b03ab2 100644 --- a/doc/source/users/reference_manual/csresmap.rst +++ b/doc/source/users/reference_manual/csresmap.rst @@ -36,13 +36,16 @@ General parameters Input model cube file (generated with ctmodel). ``expcube [file]`` - Input exposure cube file (only needed for stacked analysis). + Input exposure cube file. ``psfcube [file]`` - Input PSF cube file (only needed for stacked analysis). + Input PSF cube file. + +``edispcube [file]`` + Input energy dispersion cube file. ``bkgcube [file]`` - Input background cube file (only needed for stacked analysis). + Input background cube file. ``inmodel [file]`` Input model XML file. @@ -61,48 +64,48 @@ General parameters ``(ebinalg = LOG) [string]`` Algorithm for defining energy bins. - + ``emin [real]`` Lower energy value for first energy bin (in TeV). - + ``emax [real]`` Upper energy value for last energy bin (in TeV). - + ``(enumbins = 20) [integer]`` Number of model cube energy bins. - + ``ebinfile [file]`` Name of the file containing the energy bin definition. - + ``coordsys [string]`` Coordinate system (CEL - celestial, GAL - galactic). - + ``proj [string]`` Projection method. ``xref [real]`` Right Ascension / Galactic longitude of cube centre (J2000, in degrees). - + ``yref [real]`` Declination / Galactic latitude of cube centre (J2000, in degrees). - + ``nxpix [integer]`` Number of cube bins in Right Ascension or Galactic longitude. - + ``nypix [integer]`` Number of cube bins in Declination or Galactic latitude. - + ``binsz [real]`` Cube bin size (in degrees/pixel). - -``(algorithm = SUBDIV) [string]`` + +``algorithm [string]`` Algorithm used to generate the residual map: ``SUB``: :math:`DATA - MODEL` - ``SUBDIV``: :math:`\frac{DATA - MODEL}{MODEL}` + ``SUBDIV``: :math:`(DATA - MODEL) / MODEL` - ``SUBDIVSQRT``: :math:`\frac{DATA - MODEL}{\sqrt{MODEL}}` + ``SUBDIVSQRT``: :math:`(DATA - MODEL) / \sqrt{MODEL}` ``SIGNIFICANCE``: :math:`{\rm sign}(DATA-MODEL) \times \sqrt{ 2 \times ( DATA \times \ln \left(\frac{DATA}{MODEL} \right) + MODEL - DATA ) }` @@ -116,21 +119,21 @@ Standard parameters ``(chatter = 2) [integer]`` Verbosity of the executable: ``chatter = 0``: no information will be logged - + ``chatter = 1``: only errors will be logged - + ``chatter = 2``: errors and actions will be logged - + ``chatter = 3``: report about the task execution - + ``chatter = 4``: detailed report about the task execution - + ``(clobber = yes) [boolean]`` Specifies whether an existing residual map file should be overwritten. - + ``(debug = no) [boolean]`` Enables debug mode. In debug mode the executable will dump any log file output to the console. - + ``(mode = ql) [string]`` Mode of automatic parameters (default is "ql", i.e. "query and learn"). diff --git a/doc/source/users/reference_manual/csspec.rst b/doc/source/users/reference_manual/csspec.rst index 6d95f6a..2f47c6b 100644 --- a/doc/source/users/reference_manual/csspec.rst +++ b/doc/source/users/reference_manual/csspec.rst @@ -54,21 +54,17 @@ General parameters ``inmodel [file]`` Input model XML file. -``srcname [string]`` - Name of the source in the source model XML file which should be used - for sensitivity computation. - -``outfile [file]`` - Name of the source spectrum output file. - ``expcube [file]`` - Exposure cube file (only needed for stacked analysis). + Input exposure cube file. ``psfcube [file]`` - PSF cube file (only needed for stacked analysis). + Input PSF cube file. + +``edispcube [file]`` + Input energy dispersion cube file. ``bkgcube [file]`` - Background cube file (only needed for stacked analysis). + Input background cube file. ``caldb [string]`` Calibration database. @@ -79,6 +75,13 @@ General parameters ``(edisp = no) [boolean]`` Apply energy dispersion to response computation? +``srcname [string]`` + Name of the source in the source model XML file which should be used + for sensitivity computation. + +``outfile [file]`` + Output source spectrum file. + ``emin [real]`` Lower energy limit of events (in TeV). diff --git a/doc/source/users/reference_manual/cstsdist.rst b/doc/source/users/reference_manual/cstsdist.rst index 1461ec0..24767b8 100644 --- a/doc/source/users/reference_manual/cstsdist.rst +++ b/doc/source/users/reference_manual/cstsdist.rst @@ -43,16 +43,19 @@ General parameters for Test Statistics computation. ``outfile [file]`` - ASCII file containing the TS distribution values. + Output ASCII file containing the TS distribution values. ``expcube [file]`` - Exposure cube file (only needed for stacked analysis). + Input exposure cube file. ``psfcube [file]`` - PSF cube file (only needed for stacked analysis). + Input PSF cube file. + +``edispcube [file]`` + Input energy dispersion cube file. ``bkgcube [file]`` - Background cube file (only needed for stacked analysis). + Input background cube file. ``caldb [string]`` Calibration database. diff --git a/doc/source/users/reference_manual/cstsmapsplit.rst b/doc/source/users/reference_manual/cstsmapsplit.rst index b58c342..023e1d6 100644 --- a/doc/source/users/reference_manual/cstsmapsplit.rst +++ b/doc/source/users/reference_manual/cstsmapsplit.rst @@ -30,13 +30,16 @@ General parameters Name of source model for which the TS map should be computed. ``expcube [file]`` - Input exposure cube file (only needed for stacked analysis). + Input exposure cube file. ``psfcube [file]`` - Input PSF cube file (only needed for stacked analysis). + Input PSF cube file. + +``edispcube [file]`` + Input energy dispersion cube file. ``bkgcube [file]`` - Input background cube file (only needed for stacked analysis). + Input background cube file. ``caldb [string]`` Calibration database. diff --git a/doc/source/users/reference_manual/ctbutterfly.rst b/doc/source/users/reference_manual/ctbutterfly.rst index 25db8cd..a3dc3e7 100644 --- a/doc/source/users/reference_manual/ctbutterfly.rst +++ b/doc/source/users/reference_manual/ctbutterfly.rst @@ -53,13 +53,16 @@ General parameters Name of source model for which the butterfly diagram should be computed. ``expcube [file]`` - Input exposure cube file (only needed for stacked analysis). + Input exposure cube file. ``psfcube [file]`` - Input PSF cube file (only needed for stacked analysis). + Input PSF cube file. + +``edispcube [file]`` + Input energy dispersion cube file. ``bkgcube [file]`` - Input background cube file (only needed for stacked analysis). + Input background cube file. ``caldb [string]`` Calibration database. @@ -79,7 +82,7 @@ General parameters ``(method = "GAUSSIAN") [string]`` Computation method. - + ``(confidence = 0.68) [real]`` Confidence level for error computation. @@ -88,16 +91,16 @@ General parameters ``(ebinalg = "LOG") [string]`` Butterfly energy binning algorithm. - + ``emin [real]`` Minimum energy of butterfly (in TeV). - + ``emax [real]`` Maximum energy of butterfly (in TeV). - + ``(enumbins = 100) [string]`` Number of energy bins of butterfly. - + ``(ebinfile = "NONE") [string]`` File for energy binning algorithm. diff --git a/doc/source/users/reference_manual/cterror.rst b/doc/source/users/reference_manual/cterror.rst index a654bc5..2551282 100644 --- a/doc/source/users/reference_manual/cterror.rst +++ b/doc/source/users/reference_manual/cterror.rst @@ -38,13 +38,16 @@ General parameters Name of source model for which the parameter errors should be computed. ``expcube [file]`` - Input exposure cube file (only needed for stacked analysis). + Input exposure cube file. ``psfcube [file]`` - Input PSF cube file (only needed for stacked analysis). + Input PSF cube file. + +``edispcube [file]`` + Input energy dispersion cube file. ``bkgcube [file]`` - Input background cube file (only needed for stacked analysis). + Input background cube file. ``caldb [string]`` Calibration database. diff --git a/doc/source/users/reference_manual/ctmodel.rst b/doc/source/users/reference_manual/ctmodel.rst index 4f698a5..5a786d3 100644 --- a/doc/source/users/reference_manual/ctmodel.rst +++ b/doc/source/users/reference_manual/ctmodel.rst @@ -57,13 +57,16 @@ General parameters Input counts cube file to extract model cube definition. ``expcube [file]`` - Input exposure cube file (only needed for stacked analysis). + Input exposure cube file. ``psfcube [file]`` - Input PSF cube file (only needed for stacked analysis). + Input PSF cube file. + +``edispcube [file]`` + Input energy dispersion cube file. ``bkgcube [file]`` - Input background cube file (only needed for stacked analysis). + Input background cube file. ``caldb [string]`` Calibration database. diff --git a/doc/source/users/reference_manual/cttsmap.rst b/doc/source/users/reference_manual/cttsmap.rst index 6af414d..d0d9858 100644 --- a/doc/source/users/reference_manual/cttsmap.rst +++ b/doc/source/users/reference_manual/cttsmap.rst @@ -40,13 +40,16 @@ General parameters Name of source model for which the TS map should be computed. ``expcube [file]`` - Input exposure cube file (only needed for stacked analysis). + Input exposure cube file. ``psfcube [file]`` - Input PSF cube file (only needed for stacked analysis). + Input PSF cube file. + +``edispcube [file]`` + Input energy dispersion cube file. ``bkgcube [file]`` - Input background cube file (only needed for stacked analysis). + Input background cube file. ``caldb [string]`` Calibration database. diff --git a/doc/source/users/reference_manual/ctulimit.rst b/doc/source/users/reference_manual/ctulimit.rst index 2be65c6..2caab0c 100644 --- a/doc/source/users/reference_manual/ctulimit.rst +++ b/doc/source/users/reference_manual/ctulimit.rst @@ -36,13 +36,16 @@ General parameters Name of source model for which the upper flux limit should be computed. ``expcube [file]`` - Input exposure cube file (only needed for stacked analysis). + Input exposure cube file. ``psfcube [file]`` - Input PSF cube file (only needed for stacked analysis). + Input PSF cube file. + +``edispcube [file]`` + Input energy dispersion cube file. ``bkgcube [file]`` - Input background cube file (only needed for stacked analysis). + Input background cube file. ``caldb [string]`` Calibration database. diff --git a/doc/source/users/tutorials/quickstart/binning.rst b/doc/source/users/tutorials/quickstart/binning.rst index ade56f5..252c03b 100644 --- a/doc/source/users/tutorials/quickstart/binning.rst +++ b/doc/source/users/tutorials/quickstart/binning.rst @@ -1,12 +1,12 @@ -.. _sec_binning_cta: +.. _start_binning: -Binning CTA data ----------------- +Binning event data +------------------ .. admonition:: What you will learn You will learn how to use the :ref:`ctbin` tool to **bin the selected - CTA event data into a counts cube**. + event data into a counts cube**. A counts cube is a 3-dimensional data cube that is spanned by Right Ascension (or Galactic longitude), Declination (or Galactic latitude), diff --git a/doc/source/users/tutorials/quickstart/butterfly.jpg b/doc/source/users/tutorials/quickstart/butterfly.jpg new file mode 100644 index 0000000..35fff54 --- /dev/null +++ b/doc/source/users/tutorials/quickstart/butterfly.jpg diff --git a/doc/source/users/tutorials/quickstart/butterfly.rst b/doc/source/users/tutorials/quickstart/butterfly.rst new file mode 100644 index 0000000..51b1ad0 --- /dev/null +++ b/doc/source/users/tutorials/quickstart/butterfly.rst @@ -0,0 +1,75 @@ +.. _start_butterfly: + +Generating a butterfly diagram of the source spectrum +----------------------------------------------------- + + .. admonition:: What you will learn + + You will learn how to use the :ref:`ctbutterfly` tool to **generate a + butterfly diagram for the source spectrum**. + +The :ref:`ctlike` tool returns the statistic uncertainties for all fitted +parameters of the spectral model, but you may be interested in the manifold +of spectral models that are statistically compatible with the data. For this +purpose you should generate a butterfly diagram. You do this using the +:ref:`ctbutterfly` tool as follows: + +.. code-block:: bash + + $ ctbutterfly + Input event list, counts cube or observation definition XML file [events.fits] cntcube.fits + Input exposure cube file [NONE] expcube.fits + Input PSF cube file [NONE] psfcube.fits + Input background cube file [NONE] bkgcube.fits + Source of interest [Crab] + Input model definition XML file [$CTOOLS/share/models/crab.xml] crab_results.xml + Lower energy limit (TeV) [0.1] + Upper energy limit (TeV) [100.0] + Output ASCII file [butterfly.txt] + +The :ref:`ctbutterfly` tool creates an ASCII file ``butterfly.txt`` that +contains for each energy in MeV (column 1) the best fitted intensity +(column 2), the minimum intensity (column 3) and the maximum intensity +(column 4) that is compatible with the data, all in units of +:math:`{\rm photons} \, {\rm cm}^{-2} \, {\rm s}^{-1} \, {\rm MeV}^{-1}`. +The number of energies is given by the hidden ``enumbins`` parameter which by +default is set to 100. Below an excerpt of the first lines of the +``butterfly.txt`` file: + +.. code-block:: none + + 103514.216667934 7.65729960995773e-15 7.45677281959723e-15 7.85782640031824e-15 + 110917.48152624 6.46256412586182e-15 6.2982352355303e-15 6.62689301619334e-15 + 118850.222743702 5.45423807455102e-15 5.3195999976704e-15 5.58887615143164e-15 + 127350.308101666 4.6032367949486e-15 4.49293900723421e-15 4.71353458266298e-15 + 136458.313658893 3.88501358040058e-15 3.7946590323386e-15 3.97536812846257e-15 + ... + +A graphical display of the results is shown below: + +.. figure:: butterfly.jpg + :width: 600px + :align: center + + *Butterfly diagram of the Crab nebula* + +.. + + .. note:: + + The ctools package does not contain any tools or scripts for graphical + display of results since results are generally written into standard FITS + files that are readily displayed by existing astronomical tools. + + Nevertheless, for your convenience several scripts for graphical display + are included in the ctools package that rely on the + `matplotlib `_ + Python module. You can find these scripts in the + ``$CTOOLS/share/examples/python`` folder. + + Read the section :ref:`1dc_howto_display` to learn more about the + available scripts. The plot above was generated using: + + .. code-block:: bash + + $ $CTOOLS/share/examples/python/show_butterfly.py butterfly.txt diff --git a/doc/source/users/tutorials/quickstart/energy_dispersion.rst b/doc/source/users/tutorials/quickstart/energy_dispersion.rst index c024da8..73e2560 100644 --- a/doc/source/users/tutorials/quickstart/energy_dispersion.rst +++ b/doc/source/users/tutorials/quickstart/energy_dispersion.rst @@ -1,4 +1,4 @@ -.. _sec_edisp_cta: +.. _start_edisp: Taking the energy dispersion into account ----------------------------------------- @@ -15,7 +15,7 @@ Taking the energy dispersion into account .. warning:: Energy dispersion is fully implemented in ctools but is computationally intensive. So be aware that the **tools and scripts will take a substantial - amount of computing time**. + amount of computing time if energy dispersion is considered**. You may not have recognised, but the examples you have exercised so far have neglected the impact of the energy dispersion on the analysis. In reality, @@ -39,7 +39,7 @@ To simulate events taking the energy dispersion into account you run the Calibration database [prod2] Instrument response function [South_0.5h] Input model definition XML file [$CTOOLS/share/models/crab.xml] - Output event data file or observation definition XML file [events.fits] + Output event data file or observation definition XML file [events.fits] events_edisp.fits You then select events from the simulated data as before using the :ref:`ctselect` tool: @@ -47,7 +47,7 @@ You then select events from the simulated data as before using the .. code-block:: bash $ ctselect - Input event list or observation definition XML file [events.fits] + Input event list or observation definition XML file [events.fits] events_edisp.fits RA for ROI centre (degrees) (0-360) [83.63] Dec for ROI centre (degrees) (-90-90) [22.01] Radius of ROI (degrees) (0-180) [3.0] @@ -55,7 +55,7 @@ You then select events from the simulated data as before using the Stop time (UTC string, JD, MJD or MET in seconds) [NONE] 2020-01-01T00:40:00 Lower energy limit (TeV) [0.1] Upper energy limit (TeV) [100.0] - Output event list or observation definition XML file [selected_events.fits] + Output event list or observation definition XML file [selected_events.fits] selected_events_edisp.fits Then you bin as before the selected events into a counts cube using the :ref:`ctbin` tool: @@ -63,7 +63,7 @@ Then you bin as before the selected events into a counts cube using the .. code-block:: bash $ ctbin - Input event list or observation definition XML file [events.fits] selected_events.fits + Input event list or observation definition XML file [selected_events.fits] selected_events_edisp.fits First coordinate of image center in degrees (RA or galactic l) (0-360) [83.63] Second coordinate of image center in degrees (DEC or galactic b) (-90-90) [22.01] Projection method (AIT|AZP|CAR|GLS|MER|MOL|SFL|SIN|STG|TAN) [CAR] @@ -75,7 +75,7 @@ Then you bin as before the selected events into a counts cube using the Start value for first energy bin in TeV [0.1] Stop value for last energy bin in TeV [100.0] Number of energy bins (1-200) [20] - Output counts cube file [cntcube.fits] + Output counts cube file [cntcube.fits] cntcube_edisp.fits As next step you need to compute the :ref:`energy dispersion cube ` @@ -84,7 +84,7 @@ using the :ref:`ctexpcube` tool. You run the tool as follows: .. code-block:: bash $ ctedispcube - Input event list or observation definition XML file [NONE] selected_events.fits + Input event list or observation definition XML file [NONE] selected_events_edisp.fits Calibration database [prod2] Instrument response function [South_0.5h] Input counts cube file to extract energy dispersion cube definition [NONE] @@ -108,13 +108,13 @@ energy dispersion cube: .. code-block:: bash $ ctlike edisp=yes - Input event list, counts cube or observation definition XML file [selected_events.fits] cntcube.fits + Input event list, counts cube or observation definition XML file [selected_events.fits] cntcube_edisp.fits Input exposure cube file [expcube.fits] Input PSF cube file [psfcube.fits] Input energy dispersion cube file [NONE] edispcube.fits Input background cube file [bkgcube.fits] Input model definition XML file [$CTOOLS/share/models/crab.xml] models.xml - Output model definition XML file [crab_results.xml] + Output model definition XML file [crab_results.xml] crab_results_edisp.xml You can also perform an unbinned maximum likelihood analysis taking the energy dispersion into account. In that case the energy dispersion information will be @@ -125,8 +125,8 @@ and no energy dispersion cube is required: .. code-block:: bash $ ctlike edisp=yes - Input event list, counts cube or observation definition XML file [cntcube.fits] selected_events.fits + Input event list, counts cube or observation definition XML file [cntcube_edisp.fits] selected_events_edisp.fits Calibration database [prod2] Instrument response function [South_0.5h] Input model definition XML file [models.xml] $CTOOLS/share/models/crab.xml - Output model definition XML file [crab_results.xml] + Output model definition XML file [crab_results_edisp.xml] diff --git a/doc/source/users/tutorials/quickstart/fitting.rst b/doc/source/users/tutorials/quickstart/fitting.rst index 2932544..af296af 100644 --- a/doc/source/users/tutorials/quickstart/fitting.rst +++ b/doc/source/users/tutorials/quickstart/fitting.rst @@ -1,7 +1,7 @@ -.. _sec_fitting_cta: +.. _start_fitting: -Fitting CTA data ----------------- +Fitting binned data +------------------- .. admonition:: What you will learn @@ -28,8 +28,8 @@ have been binned into a counts cube and the fit computes the log-likelihood function by summing over all 200 x 200 x 20 bins of the counts cube. There is an alternative method, the so called *unbinned* mode, where the events are not binned into a counts cube and the log-likelihood is computed directly by -summing over all events. We will explore the *unbinned* mode later (see -:ref:`here `). +summing over all events. +:ref:`We will explore the unbinned mode later `. The :ref:`ctlike` tool produced a :ref:`model definition XML output file ` diff --git a/doc/source/users/tutorials/quickstart/index.rst b/doc/source/users/tutorials/quickstart/index.rst index b8bf907..c04f1aa 100644 --- a/doc/source/users/tutorials/quickstart/index.rst +++ b/doc/source/users/tutorials/quickstart/index.rst @@ -1,10 +1,12 @@ -.. _quickstart: +.. _start: First steps with ctools ----------------------- -This section provides a step-by-step description of a simple CTA data simulation -and analysis example using the ctools. +This section provides a hands-on introduction of ctools. By means of an +example you will learn how to simulate and analyse CTA event data. This +section is intended to be read by newcomers. The reading and executing of the +examples should take about an hour, so grab some coffee before you start. .. toctree:: :maxdepth: 1 @@ -15,5 +17,9 @@ and analysis example using the ctools. binning response fitting + residuals + butterfly + spectrum unbinned energy_dispersion + python diff --git a/doc/source/users/tutorials/quickstart/python.rst b/doc/source/users/tutorials/quickstart/python.rst new file mode 100644 index 0000000..b3b168f --- /dev/null +++ b/doc/source/users/tutorials/quickstart/python.rst @@ -0,0 +1,240 @@ +.. _start_python: + +Using ctools from Python +------------------------ + + .. admonition:: What you will learn + + You will learn how to **use the ctools and cscripts from Python** instead + of typing the commands in the console. + +ctools provides two Python modules that allow using all tools and scripts as +Python classes. To use ctools from Python you have to import the ``ctools`` +and ``cscripts`` modules into Python. You should also import the ``gammalib`` +module, as ctools without GammaLib is generally not very useful. + + .. warning:: + + Always import ``gammalib`` before you import ``ctools`` and ``cscripts``. + +To simulate the event data from Python you have to type the following (recall +:ref:`how to simulate event data from the command line ` for +comparison) : + +.. code-block:: python + + >>> import gammalib + >>> import ctools + >>> import cscripts + >>> sim = ctools.ctobssim() + >>> sim['inmodel'] = '${CTOOLS}/share/models/crab.xml' + >>> sim['outevents'] = 'events.fits' + >>> sim['caldb'] = 'prod2' + >>> sim['irf'] = 'South_0.5h' + >>> sim['ra'] = 83.63 + >>> sim['dec'] = 22.01 + >>> sim['rad'] = 5.0 + >>> sim['tmin'] = '2020-01-01T00:00:00' + >>> sim['tmax'] = '2020-01-01T01:00:00' + >>> sim['emin'] = 0.03 + >>> sim['emax'] = 200.0 + >>> sim.execute() + +The first line after the ``import`` statements generates an instance of the +:ref:`ctobssim` tool as a Python class. User parameters are then set using the +``[ ]`` operator. After setting all parameters the ``execute()`` method is called to +execute the :ref:`ctobssim` tool. On output the ``events.fits`` FITS file is +created. Until now everything is identical to running the tool from the command +line. + + .. note:: + + See the :ref:`reference` for a list of parameters and their types for + all tools and scripts. You can also inspect all parameters of a specific + tool by calling the tool follwed by ``--help`` from the command line, e.g. + + .. code-block:: bash + + $ ctobssim --help + +Instead of executing the tool you may also *run* the tool using + +.. code-block:: python + + >>> sim.run() + +The main difference to the ``execute()`` method is that the ``run()`` method +will not write the simulated event file to disk. Why is this useful? Well, +after having typed ``sim.run()`` the :ref:`ctobssim` class still exists as an +object in memory, including all the simulated events. The :ref:`ctobssim` +class has an ``obs()`` method that returns an observation container that holds +the simulated CTA observation with its associated events. To visualise this +container, type: + +.. code-block:: python + + >>> print(sim.obs()) + === GObservations === + Number of observations ....: 1 + Number of models ..........: 2 + Number of observed events .: 202766 + Number of predicted events : 0 + +There is one CTA observation in the container and to visualise that observation +type: + +.. code-block:: python + + >>> print(sim.obs()[0]) + === GCTAObservation === + Name ......................: + Identifier ................: + Instrument ................: CTA + Event file ................: events.fits + Event type ................: EventList + Statistics ................: Poisson + Ontime ....................: 3599.99999976158 s + Livetime ..................: 3527.99999976635 s + Deadtime correction .......: 0.98 + User energy range .........: undefined + === GCTAPointing === + Pointing direction ........: (RA,Dec)=(83.63,22.01) + === GCTAResponseIrf === + Caldb mission .............: cta + Caldb instrument ..........: prod2 + Response name .............: South_0.5h + Energy dispersion .........: Not used + Save energy range .........: undefined + === GCTAEventList === + Number of events ..........: 202766 (disposed in "events.fits") + Time interval .............: 58849.0008007407 - 58849.0424674074 days + Energy interval ...........: 0.03 - 200 TeV + Region of interest ........: RA=83.63, DEC=22.01 [0,0] Radius=5 deg + +The observation contains a CTA event list that is implement by the GammaLib +class ``GCTAEventList``. You can access the event list using the ``events()`` +method. To visualise the individual events you can iterate over the events +using a for loop. This will show the simulated celestial coordinates (RA, DEC), +the coordinate in the camera system [DETX, DETY], the energies and the +terrestrial times (TT) of all events. To do this, type: + +.. code-block:: python + + >>> events = sim.obs()[0].events() + >>> for event in events: + ... print(event) + ... + Dir=RA=83.6182556152344, DEC=22.2843074798584 [0.00478756989312195,-0.000189682185722814] Energy=63.157357275486 GeV Time=315532804.699509 s (TT) + Dir=RA=83.8212127685547, DEC=21.9629154205322 [-0.000819836781619686,0.0030950360932479] Energy=53.25997620821 GeV Time=315532805.889628 s (TT) + Dir=RA=83.6474838256836, DEC=22.0208301544189 [0.000189049359871014,0.000282857291220907] Energy=69.6808248758316 GeV Time=315532806.050809 s (TT) + ... + +You can now benefit from the fact that you have some simulated events in +memory to fit a model to these events using the :ref:`ctlike` class. +You will do this in unbinned mode. Here is what you have to type: + +.. code-block:: python + + >>> like = ctools.ctlike(sim.obs()) + >>> like.run() + +This is pretty compact. Where are the user parameters? +:ref:`ctlike` doesn't in fact need any parameters as all the relevant +information is already contained in the observation container produced by the +:ref:`ctobssim` class. +And you may have recognised that you constructed the :ref:`ctlike` +instance by using the :ref:`ctobssim` observation container as constructor +argument. + + .. note:: + + An observation container, implemented by the ``GObservations`` class + of GammaLib, is the fundamental brick of any ctools analysis. Many tools + and scripts handle observation containers, and accept them upon + construction and return them after running the tool via the ``obs()`` + method. + + Passing observation containers between ctools classes is a very + convenient and powerful way of building in-memory analysis pipelines. + However, this implies that you need some computing ressources when + dealing with large observation containers (for example if you want to + analyse a few 100 hours of data at once). Also, if the script crashes + the information is lost. + +To check how the fit went you can inspect the optimiser used by +:ref:`ctlike` by typing: + +.. code-block:: python + + >>> print(like.opt()) + === GOptimizerLM === + Optimized function value ..: 757618.425 + Absolute precision ........: 0.005 + Acceptable value decrease .: 2 + Optimization status .......: converged + Number of parameters ......: 10 + Number of free parameters .: 4 + Number of iterations ......: 2 + Lambda ....................: 1e-05 + +You see that the fit converged after 2 iterations. Out of 10 parameters in the +model 4 have been fitted (the others were kept fixed). To inspect the fit +results you can print the model container that can be access using the +``models()`` method of the observation container: + +.. code-block:: python + + >>> print(like.obs().models()) + === GModels === + Number of models ..........: 2 + Number of parameters ......: 10 + === GModelSky === + Name ......................: Crab + Instruments ...............: all + Instrument scale factors ..: unity + Observation identifiers ...: all + Model type ................: PointSource + Model components ..........: "PointSource" * "PowerLaw" * "Constant" + Number of parameters ......: 6 + Number of spatial par's ...: 2 + RA .......................: 83.6331 [-360,360] deg (fixed,scale=1) + DEC ......................: 22.0145 [-90,90] deg (fixed,scale=1) + Number of spectral par's ..: 3 + Prefactor ................: 5.73901839854211e-16 +/- 5.75150678022232e-18 [1e-23,1e-13] ph/cm2/s/MeV (free,scale=1e-16,gradient) + Index ....................: -2.46442704108736 +/- 0.00738985717701118 [-0,-5] (free,scale=-1,gradient) + PivotEnergy ..............: 300000 [10000,1000000000] MeV (fixed,scale=1000000,gradient) + Number of temporal par's ..: 1 + Normalization ............: 1 (relative value) (fixed,scale=1,gradient) + === GCTAModelIrfBackground === + Name ......................: CTABackgroundModel + Instruments ...............: CTA + Instrument scale factors ..: unity + Observation identifiers ...: all + Model type ................: "PowerLaw" * "Constant" + Number of parameters ......: 4 + Number of spectral par's ..: 3 + Prefactor ................: 0.995734795709415 +/- 0.00725726198557001 [0.001,1000] ph/cm2/s/MeV (free,scale=1,gradient) + Index ....................: -0.00198344390952578 +/- 0.00257263793207067 [-5,5] (free,scale=1,gradient) + PivotEnergy ..............: 1000000 [10000,1000000000] MeV (fixed,scale=1000000,gradient) + Number of temporal par's ..: 1 + Normalization ............: 1 (relative value) (fixed,scale=1,gradient) + +Suppose you want to repeat the fit by optimising also the position of the +point source. This is easy from Python. Type the following: + +.. code-block:: python + + >>> like.obs().models()['Crab']['RA'].free() + >>> like.obs().models()['Crab']['DEC'].free() + >>> like.run() + >>> print(like.obs().models()) + ... + RA .......................: 83.6334964430607 +/- 0.000614768905318078 [-360,360] deg (free,scale=1) + DEC ......................: 22.0149467750683 +/- 0.000559548446961086 [-90,90] deg (free,scale=1) + + +The ``like.obs().models()`` method provides the model container, using the +``['Crab']`` operator you access the Crab model in that container and using +the ``['RA']`` and ``['DEC']`` operators you access the relevant model +parameters. The ``free()`` method frees a parameter, the opposite would be a +call to the ``fix()`` method. diff --git a/doc/source/users/tutorials/quickstart/residuals.jpg b/doc/source/users/tutorials/quickstart/residuals.jpg new file mode 100644 index 0000000..21c81ce --- /dev/null +++ b/doc/source/users/tutorials/quickstart/residuals.jpg diff --git a/doc/source/users/tutorials/quickstart/residuals.rst b/doc/source/users/tutorials/quickstart/residuals.rst new file mode 100644 index 0000000..99b61c3 --- /dev/null +++ b/doc/source/users/tutorials/quickstart/residuals.rst @@ -0,0 +1,62 @@ +.. _start_residuals: + +Inspecting the fit residuals +---------------------------- + + .. admonition:: What you will learn + + You will learn how to use the :ref:`csresmap` script to **inspect the + fit residuals**. + +After having done a maximum likelihood fit it is good practice to inspect the +fit residuals. You do this with the :ref:`csresmap` script that creates a +residual sky map of the events from which the fitted model components were +subtracted. You run the :ref:`csresmap` script as follows: + +.. code-block:: bash + + $ csresmap + Input event list, counts cube, or observation definition XML file [events.fits] cntcube.fits + Input model cube file (generated with ctmodel) [NONE] + Input exposure cube file [NONE] expcube.fits + Input PSF cube file [NONE] psfcube.fits + Input background cube file [NONE] bkgcube.fits + Input model definition XML file [$CTOOLS/share/models/crab.xml] crab_results.xml + Residual map computation algorithm (SUB|SUBDIV|SUBDIVSQRT|SIGNIFICANCE) [SIGNIFICANCE] + Output residual map file [resmap.fits] + +.. + + .. note:: + + :ref:`csresmap` is a Python script while the other tools that you have + used so far are C++ binary executables. From the User perspective, Python + scripts and C++ binary executables behave the same way, but to distinguish + both all Python scripts names start with ``cs`` while all C++ binary + executables names start with ``ct``. + +The :ref:`csresmap` script produces the FITS file ``resmap.fits`` that contains +the residual counts map. The image is displayed below using +`ds9 `_ with a linear color scale and with a small Gaussian +kernel smoothing applied. Obviously, there are no significant residuals, which +indicates that the model fit was satisfactory. + +.. figure:: residuals.jpg + :width: 400px + :align: center + + *Residual sky map of the selected events with all model components subtracted* + +.. + + .. note:: + + :ref:`csresmap` implements different algorithms for the computation of the + residuals. These are: + + * ``SUB``: :math:`DATA - MODEL` + * ``SUBDIV``: :math:`(DATA - MODEL) / MODEL` + * ``SUBDIVSQRT``: :math:`(DATA - MODEL) / \sqrt{MODEL}` + * ``SIGNIFICANCE``: :math:`{\rm sign}(DATA-MODEL) \times \sqrt{ 2 \times ( DATA \times \ln \left(\frac{DATA}{MODEL} \right) + MODEL - DATA ) }` + + By default the ``SIGNIFICANCE`` algorithm is used. diff --git a/doc/source/users/tutorials/quickstart/response.rst b/doc/source/users/tutorials/quickstart/response.rst index f7eda4e..2e95025 100644 --- a/doc/source/users/tutorials/quickstart/response.rst +++ b/doc/source/users/tutorials/quickstart/response.rst @@ -1,7 +1,7 @@ -.. _sec_stacked_reponse: +.. _start_binned_reponse: -Pre-computing the response --------------------------- +Pre-computing the binned response +--------------------------------- .. admonition:: What you will learn diff --git a/doc/source/users/tutorials/quickstart/selecting.rst b/doc/source/users/tutorials/quickstart/selecting.rst index 78de090..40f5c24 100644 --- a/doc/source/users/tutorials/quickstart/selecting.rst +++ b/doc/source/users/tutorials/quickstart/selecting.rst @@ -1,14 +1,14 @@ -.. _sec_selecting_cta: +.. _start_selecting: -Selecting CTA data ------------------- +Selecting event data +-------------------- .. admonition:: What you will learn You will learn how to use the :ref:`ctselect` tool to **select relevant - events from the simulated CTA event data**. + events from the simulated event data**. -As next step you may want to select some events from the simulated CTA data. +As next step you may want to select some events from the simulated event data. You may want to restrict the events to a region of interest (ROI) of 3 degrees around the Crab nebula, you may want to extract a 30 minutes time slice from the data, and you may want to limit the energy range of the events @@ -28,7 +28,7 @@ You do this event selection using the :ref:`ctselect` tool as follows: Upper energy limit (TeV) [100.0] Output event list or observation definition XML file [selected_events.fits] -This created a new CTA event list FITS file ``selected_events.fits`` +This created a new event list FITS file ``selected_events.fits`` that contains the selected data. Below an excerpt of the ``ctselect.log`` log file that illustrates the event selection: diff --git a/doc/source/users/tutorials/quickstart/simulating.rst b/doc/source/users/tutorials/quickstart/simulating.rst index 26e9805..caab571 100644 --- a/doc/source/users/tutorials/quickstart/simulating.rst +++ b/doc/source/users/tutorials/quickstart/simulating.rst @@ -1,12 +1,12 @@ -.. _sec_simulating_cta: +.. _start_simulating: -Simulating CTA data -------------------- +Simulating event data +--------------------- .. admonition:: What you will learn You will learn how to use the :ref:`ctobssim` tool from the command - line to **simulate CTA event data**. + line to **simulate event data**. :ref:`ctobssim` draws random events using a model of the celestial gamma-ray intensity distribution that was convolved with the @@ -39,7 +39,7 @@ characteristics of the simulation: Each line represents a query for one parameter value. The line starts with a short description of the parameter, followed by -the default value proposed by ctobssim in squared brackets ``[ ]``. +the default value proposed by :ref:`ctobssim` in squared brackets ``[ ]``. **If no parameter value is entered the default value will be used**. Otherwise, the specified value will overwrite the default value. @@ -181,13 +181,22 @@ To use for example a seed value of 41 you should type: $ ctobssim seed=41 -:ref:`ctobssim` will write 2 files in the working directory: ``events.fits`` +.. + + .. note:: + + Hidden parameters are parameters that are not queried by a tool since + in general their values is not expected to change frequently. To change + hidden parameters they have to be given as arguments on the command line. + Multiple hidden parameters need to be separated by a white space. + +:ref:`ctobssim` will write two files in the working directory: ``events.fits`` and ``ctobssim.log``. The first file contains the simulated events in FITS format and can be inspected using ``fv`` or ``ds9``. The FITS file will contain three extensions: an empty primary image, a binary table named ``EVENTS`` that holds the events (one row per event), and a binary table named ``GTI`` holding the Good Time Intervals (for the moment a single row -with 2 columns providing the start and the stop time of the simulated time +with two columns providing the start and the stop time of the simulated time interval). The second file produced by :ref:`ctobssim` is a human readable log file that @@ -271,6 +280,6 @@ the hidden ``debug`` parameter to yes: ``debug`` and you can use these parameters to control the log file output. In addition, all tools have the hidden parameter ``clobber`` that allows to overwrite existing files (set to ``yes`` by default) - and ``mode`` that defines the mode of automatic tool parameters (set to - ``ql`` by default). + and ``mode`` that defines the mode of automatic parameters (set to + ``ql`` for *query and learn* by default). diff --git a/doc/source/users/tutorials/quickstart/skymap.rst b/doc/source/users/tutorials/quickstart/skymap.rst index 1262c0b..0323ced 100644 --- a/doc/source/users/tutorials/quickstart/skymap.rst +++ b/doc/source/users/tutorials/quickstart/skymap.rst @@ -1,4 +1,4 @@ -.. _sec_skymap: +.. _start_skymap: Generating a sky map -------------------- @@ -6,7 +6,7 @@ Generating a sky map .. admonition:: What you will learn You will learn how to use the :ref:`ctskymap` tool to **generate a sky - map from the selected CTA event data**. + map from the selected event data**. Now let's have a look into the selected data by generating a sky map. You do this with the :ref:`ctskymap` tool as follows: @@ -68,6 +68,8 @@ example: Lower energy limit (TeV) [0.1] Upper energy limit (TeV) [100.0] Background subtraction method (NONE|IRF) [NONE] IRF + Calibration database [prod2] + Instrument response function [South_0.5h] Output skymap file [skymap.fits] skymap_subtracted.fits The resulting sky map, displayed using diff --git a/doc/source/users/tutorials/quickstart/spectrum.jpg b/doc/source/users/tutorials/quickstart/spectrum.jpg new file mode 100644 index 0000000..d674c33 --- /dev/null +++ b/doc/source/users/tutorials/quickstart/spectrum.jpg diff --git a/doc/source/users/tutorials/quickstart/spectrum.rst b/doc/source/users/tutorials/quickstart/spectrum.rst new file mode 100644 index 0000000..c22cde7 --- /dev/null +++ b/doc/source/users/tutorials/quickstart/spectrum.rst @@ -0,0 +1,60 @@ +.. _start_spectrum: + +Deriving a source spectrum +-------------------------- + + .. admonition:: What you will learn + + You will learn how to use the :ref:`csspec` script to **derive the spectral + energy distribution (SED) of a gamma-ray source**. + +You may also be interested in the determination of the spectral energy +distribution (SED) of the Crab nebula that is independent of an assumed +spectral shape. This can be achieved by the :ref:`csspec` script. + +The :ref:`csspec` script divides the energy range into a number of indepedent +energy bins and performs in each of the energy bins a maximum likelihood fit +of the source model. Since the spectral shape is generally poorly constrained +within a narrow energy bin, all spectral parameters except of the scaling +factor of the source model will be fixed for the fitting. The fit results will +be converted into a flux value per energy bin. The script also determines +upper flux limits as well as the Test Statistic value of the source in each +of the bins. + +Below an example how of you can determine the SED of the Crab for 10 energy +bins between 100 GeV and 100 TeV: + +.. code-block:: bash + + $ csspec + Input event list, counts cube, or observation definition XML file [events.fits] cntcube.fits + Input exposure cube file [NONE] expcube.fits + Input PSF cube file [NONE] psfcube.fits + Input background cube file [NONE] bkgcube.fits + Input model definition XML file [$CTOOLS/share/models/crab.xml] models.xml + Source name [Crab] + Binning algorithm (LIN|LOG|FILE) [LOG] + Lower energy limit (TeV) [0.1] + Upper energy limit (TeV) [100.0] + Number of energy bins (0=unbinned) [20] 10 + Output spectrum file [spectrum.fits] + +The :ref:`csspec` script creates the FITS file ``spectrum.fits`` that contains +the results of the SED fitting. A graphical display of the fit results is +shown below. + +.. figure:: spectrum.jpg + :width: 600px + :align: center + + *Spectral energy distribution of the Crab nebula* + +.. + + .. note:: + + The figure was created by typing: + + .. code-block:: bash + + $ $CTOOLS/share/examples/python/show_spectrum.py spectrum.fits diff --git a/doc/source/users/tutorials/quickstart/unbinned.rst b/doc/source/users/tutorials/quickstart/unbinned.rst index 5654047..258dcd3 100644 --- a/doc/source/users/tutorials/quickstart/unbinned.rst +++ b/doc/source/users/tutorials/quickstart/unbinned.rst @@ -1,4 +1,4 @@ -.. _sec_unbinned_cta: +.. _start_unbinned: Doing an unbinned analysis -------------------------- @@ -53,7 +53,7 @@ hence there is no loss of information due to histogramming. Below you see the corresponding output from the ``ctlike.log`` file. The fitted parameters are essentially identical to the ones found in binned mode. The slight difference with respect to the binned analysis may be explained -by the different event sample that has been used for the analysis: while +by the different event sample that were used for the analysis: while binned likelihood works on rectangular counts cubes, unbinned likelihood works on circular event selection regions. It is thus not possible to select exactly the same events for both analyses. @@ -115,3 +115,12 @@ the same events for both analyses. 2017-08-08T20:56:28: PivotEnergy ..............: 1000000 [10000,1000000000] MeV (fixed,scale=1000000,gradient) 2017-08-08T20:56:28: Number of temporal par's ..: 1 2017-08-08T20:56:28: Normalization ............: 1 (relative value) (fixed,scale=1,gradient) + +.. + + .. note:: + + Many tools or scripts can also be used in unbinned mode, including + :ref:`csresmap`, :ref:`ctbutterfly` and :ref:`csspec` that were used + earlier. It is sufficient to replace the input counts cube by an event + list to activate unbinned mode for these tools. diff --git a/doc/source/users/user_manual/index.rst b/doc/source/users/user_manual/index.rst index 993b830..5da96fe 100644 --- a/doc/source/users/user_manual/index.rst +++ b/doc/source/users/user_manual/index.rst @@ -10,4 +10,3 @@ User Manual response models plotting - python diff --git a/doc/source/users/user_manual/python.rst b/doc/source/users/user_manual/python.rst index c530fc9..fe56e51 100644 --- a/doc/source/users/user_manual/python.rst +++ b/doc/source/users/user_manual/python.rst @@ -22,7 +22,7 @@ To illustrate how to use ctools from Python, below is a working example of an event list simulation using the :ref:`ctobssim` class. An instance ``sim`` of the :ref:`ctobssim` class is generated and user parameters are set for this instance using the ``[ ]`` operator. -See the :ref:`reference` for a list of parameters and their types). +See the :ref:`reference` for a list of parameters and their types. The ``execute()`` method executes the :ref:`ctobssim` class in the same way as if it were executed from the command line. diff --git a/src/ctbutterfly/ctbutterfly.par b/src/ctbutterfly/ctbutterfly.par index 5c3f228..93f411a 100644 --- a/src/ctbutterfly/ctbutterfly.par +++ b/src/ctbutterfly/ctbutterfly.par @@ -19,10 +19,10 @@ inobs, f, a, "events.fits",,,"Input event list, counts cube or observation definition XML file" inmodel, f, a, "$CTOOLS/share/models/crab.xml",,, "Input model definition XML file" srcname, s, a, "Crab",,,"Source of interest" -expcube, f, a, "NONE",,, "Input exposure cube file (only needed for stacked analysis)" -psfcube, f, a, "NONE",,, "Input PSF cube file (only needed for stacked analysis)" -edispcube, f, a, "NONE",,, "Input energy dispersion cube file (only needed for stacked analysis)" -bkgcube, f, a, "NONE",,, "Input background cube file (only needed for stacked analysis)" +expcube, f, a, "NONE",,, "Input exposure cube file" +psfcube, f, a, "NONE",,, "Input PSF cube file" +edispcube, f, a, "NONE",,, "Input energy dispersion cube file" +bkgcube, f, a, "NONE",,, "Input background cube file" caldb, s, a, "prod2",,, "Calibration database" irf, s, a, "South_0.5h",,, "Instrument response function" edisp, b, h, no,,, "Apply energy dispersion?" @@ -40,8 +40,8 @@ matrix, f, h, "NONE",,, "Input covariance Matrix FITS file" # Energy binning parameters #========================== ebinalg, s, h, "LOG", FILE|LIN|LOG,,"Algorithm for defining energy bins" -emin, r, a, 0.1,,,"Start value for first energy bin in TeV" -emax, r, a, 100.0,,,"Stop value for last energy bin in TeV" +emin, r, a, 0.1,,,"Lower energy limit (TeV)" +emax, r, a, 100.0,,,"Upper energy limit (TeV)" enumbins, i, h, 100,,,"Number of energy bins" ebinfile, f, h, "NONE",,,"Name of the file containing the energy bin definition" diff --git a/src/cterror/cterror.par b/src/cterror/cterror.par index a84adb0..8f210c6 100644 --- a/src/cterror/cterror.par +++ b/src/cterror/cterror.par @@ -20,10 +20,10 @@ inobs, f, a, "events.fits",,, "Input event list, counts cube or observation definition XML file" inmodel, f, a, "$CTOOLS/share/models/crab.xml",,, "Input model definiton XML file" srcname, s, a, "Crab",,, "Source of interest" -expcube, f, a, "NONE",,, "Input exposure cube file (only needed for stacked analysis)" -psfcube, f, a, "NONE",,, "Input PSF cube file (only needed for stacked analysis)" -edispcube,f, a, "NONE",,, "Input energy dispersion cube file (only needed for stacked analysis)" -bkgcube, f, a, "NONE",,, "Input background cube file (only needed for stacked analysis)" +expcube, f, a, "NONE",,, "Input exposure cube file" +psfcube, f, a, "NONE",,, "Input PSF cube file" +edispcube,f, a, "NONE",,, "Input energy dispersion cube file" +bkgcube, f, a, "NONE",,, "Input background cube file" caldb, s, a, "prod2",,, "Calibration database" irf, s, a, "South_0.5h",,, "Instrument response function" edisp, b, h, no,,, "Apply energy dispersion?" diff --git a/src/ctmodel/ctmodel.par b/src/ctmodel/ctmodel.par index 77492a4..d96c436 100644 --- a/src/ctmodel/ctmodel.par +++ b/src/ctmodel/ctmodel.par @@ -19,10 +19,10 @@ inobs, f, a, "NONE",,, "Input event list, counts cube or observation definition XML file" incube, f, a, "NONE",,, "Input counts cube file to extract model cube definition" inmodel, f, a, "$CTOOLS/share/models/crab.xml",,, "Input model definition XML file" -expcube, f, a, "NONE",,, "Input exposure cube file (only needed for stacked analysis)" -psfcube, f, a, "NONE",,, "Input PSF cube file (only needed for stacked analysis)" -edispcube,f, a, "NONE",,, "Input energy dispersion cube file (only needed for stacked analysis)" -bkgcube, f, a, "NONE",,, "Input background cube file (only needed for stacked analysis)" +expcube, f, a, "NONE",,, "Input exposure cube file" +psfcube, f, a, "NONE",,, "Input PSF cube file" +edispcube,f, a, "NONE",,, "Input energy dispersion cube file" +bkgcube, f, a, "NONE",,, "Input background cube file" caldb, s, a, "prod2",,, "Calibration database" irf, s, a, "South_0.5h",,, "Instrument response function" edisp, b, h, no,,, "Apply energy dispersion?" diff --git a/src/cttsmap/cttsmap.par b/src/cttsmap/cttsmap.par index de9d3ad..ec7a0aa 100644 --- a/src/cttsmap/cttsmap.par +++ b/src/cttsmap/cttsmap.par @@ -19,10 +19,10 @@ inobs, f, a, "events.fits",,, "Input event list, counts cube or observation definition XML file" inmodel, f, a, "$CTOOLS/share/models/crab.xml",,, "Input model definition XML file" srcname, s, a, "Crab",,, "Test source name" -expcube, f, a, "NONE",,, "Input exposure cube file (only needed for stacked analysis)" -psfcube, f, a, "NONE",,, "Input PSF cube file (only needed for stacked analysis)" -edispcube, f, a, "NONE",,, "Input energy dispersion cube file (only needed for stacked analysis)" -bkgcube, f, a, "NONE",,, "Input background cube file (only needed for stacked analysis)" +expcube, f, a, "NONE",,, "Input exposure cube file" +psfcube, f, a, "NONE",,, "Input PSF cube file" +edispcube, f, a, "NONE",,, "Input energy dispersion cube file" +bkgcube, f, a, "NONE",,, "Input background cube file" caldb, s, a, "prod2",,, "Calibration database" irf, s, a, "South_0.5h",,, "Instrument response function" edisp, b, h, no,,, "Apply energy dispersion?" diff --git a/src/ctulimit/ctulimit.par b/src/ctulimit/ctulimit.par index de0c785..7fa4a0c 100644 --- a/src/ctulimit/ctulimit.par +++ b/src/ctulimit/ctulimit.par @@ -19,10 +19,10 @@ inobs, f, a, "events.fits",,, "Input event list, counts cube or observation definition XML file" inmodel, f, a, "$CTOOLS/share/models/crab.xml",,, "Input model definition XML file" srcname, s, a, "Crab",,, "Source of interest" -expcube, f, a, "NONE",,, "Input exposure cube file (only needed for stacked analysis)" -psfcube, f, a, "NONE",,, "Input PSF cube file (only needed for stacked analysis)" -edispcube,f, a, "NONE",,, "Input energy dispersion cube file (only needed for stacked analysis)" -bkgcube, f, a, "NONE",,, "Input background cube file (only needed for stacked analysis)" +expcube, f, a, "NONE",,, "Input exposure cube file" +psfcube, f, a, "NONE",,, "Input PSF cube file" +edispcube,f, a, "NONE",,, "Input energy dispersion cube file" +bkgcube, f, a, "NONE",,, "Input background cube file" caldb, s, a, "prod2",,, "Calibration database" irf, s, a, "South_0.5h",,, "Instrument response function" edisp, b, h, no,,, "Apply energy dispersion?"