From 9de14b14c490c06c58d80901f17efc1a108966aa Mon Sep 17 00:00:00 2001 From: Jürgen Knödlseder Date: Wed, 24 Jan 2018 10:40:18 +0100 Subject: [PATCH] Final revision of reference manual --- doc/source/users/reference_manual/csebins.rst | 2 +- doc/source/users/reference_manual/csfindobs.rst | 4 +++- doc/source/users/reference_manual/csmodelinfo.rst | 4 ++-- doc/source/users/reference_manual/csmodelmerge.rst | 2 +- doc/source/users/reference_manual/csobsdef.rst | 17 ++++++++--------- doc/source/users/reference_manual/csphagen.rst | 65 +++++++++++++++++++++++++++++++++++++++++++++++++---------------- doc/source/users/reference_manual/cstsdist.rst | 2 +- doc/source/users/reference_manual/ctbkgcube.rst | 6 +++--- doc/source/users/reference_manual/ctbutterfly.rst | 4 ++-- doc/source/users/reference_manual/ctcubemask.rst | 6 +++--- doc/source/users/reference_manual/ctedispcube.rst | 4 ++-- doc/source/users/reference_manual/cterror.rst | 2 +- doc/source/users/reference_manual/ctexpcube.rst | 4 ++-- doc/source/users/reference_manual/ctlike.rst | 12 ++++++------ doc/source/users/reference_manual/ctmapcube.rst | 2 +- doc/source/users/reference_manual/ctmodel.rst | 12 ++++++------ doc/source/users/reference_manual/ctobssim.rst | 4 ++-- doc/source/users/reference_manual/ctpsfcube.rst | 4 ++-- doc/source/users/reference_manual/ctskymap.rst | 2 +- doc/source/users/reference_manual/cttsmap.rst | 2 +- doc/source/users/reference_manual/ctulimit.rst | 2 +- doc/source/users/reference_manual/usage.rst | 24 +++++++++++------------- src/Makefile.am | 4 +++- test/test_ctmodel.py | 7 +++++-- 24 files changed, 117 insertions(+), 80 deletions(-) diff --git a/doc/source/users/reference_manual/csebins.rst b/doc/source/users/reference_manual/csebins.rst index 864f3ba..7dd91e2 100644 --- a/doc/source/users/reference_manual/csebins.rst +++ b/doc/source/users/reference_manual/csebins.rst @@ -14,7 +14,7 @@ the variation in the effective area and the background template of the response functions. The script takes either an observation definition XML file or a specific instrument response function on input. -csebins writes an energy boundary extension into a FITS file. +:ref:`csebins` writes an energy boundary extension into a FITS file. General parameters diff --git a/doc/source/users/reference_manual/csfindobs.rst b/doc/source/users/reference_manual/csfindobs.rst index 87972a2..a18c1b7 100644 --- a/doc/source/users/reference_manual/csfindobs.rst +++ b/doc/source/users/reference_manual/csfindobs.rst @@ -17,7 +17,9 @@ to further constrain criteria to select observations. The user can e.g. select all observations within a certain zenith angle range by specifying the hidden parameter expression. For example -``csfindobs expression="ZEN_PNT<50&&ZEN_PNT>40"`` +.. code-block:: bash + + $ csfindobs expression="ZEN_PNT<50&&ZEN_PNT>40" is used to select observations with zenith angle range between 40 and 50 degrees. diff --git a/doc/source/users/reference_manual/csmodelinfo.rst b/doc/source/users/reference_manual/csmodelinfo.rst index 0056c04..b4764a3 100644 --- a/doc/source/users/reference_manual/csmodelinfo.rst +++ b/doc/source/users/reference_manual/csmodelinfo.rst @@ -17,9 +17,9 @@ quite useful for debugging a fit. Finally the tool also list the TS values of each source that was fitted, in order have a quick overview on these quantities on the screen. -In addition the tool is also capable of exporting the input model XML container +In addition the script is also capable of exporting the input model XML container to a region file which is compatible to be read with ds9 or other displying -tools. To create a region file, the hidden parameter "ds9file" needs to be +tools. To create a region file, the hidden parameter ``ds9file`` needs to be specified. There are quite a few further hidden parameters to steer e.g. color, font, etc of the region file output. diff --git a/doc/source/users/reference_manual/csmodelmerge.rst b/doc/source/users/reference_manual/csmodelmerge.rst index 7aa2700..7b98244 100644 --- a/doc/source/users/reference_manual/csmodelmerge.rst +++ b/doc/source/users/reference_manual/csmodelmerge.rst @@ -20,7 +20,7 @@ a list of files that should be merged: Note that the "@" needs to be specified in case of an ASCII file name. It is also important to note that models with the same name cannot be appended. The -tool will throw and exception if the provided file contain models with the same +script will throw and exception if the provided file contain models with the same name. diff --git a/doc/source/users/reference_manual/csobsdef.rst b/doc/source/users/reference_manual/csobsdef.rst index 540c8a8..84a34bd 100644 --- a/doc/source/users/reference_manual/csobsdef.rst +++ b/doc/source/users/reference_manual/csobsdef.rst @@ -9,11 +9,10 @@ Generates an observation definition file. Synopsis -------- -The csobsdef script generates an observation definition file from -a pointing list. The pointing list is a comma-separated value (CSV) -ASCII file with header keywords in the first row followed by a list -of pointings (one pointing per row). The following header keywords -are supported (case sensitive, column order irrelevant): +This script generates an observation definition file from a pointing list. The +pointing list is a comma-separated value (CSV) ASCII file with header keywords +in the first row followed by a list of pointings (one pointing per row). The +following header keywords are supported (case sensitive, column order irrelevant): - name - Observation name string - id - Unique observation identifier string @@ -29,10 +28,10 @@ are supported (case sensitive, column order irrelevant): - caldb - Calibration database - irf - Response function name -Only the pairs (ra,dec) or (lon,lat) are mandatory header keywords. -All other keywords are optional and can be specified when calling -csobsdef as user parameters. The only exception is the "duration" -keyword that will automatically be queried. +Only the pairs (ra,dec) or (lon,lat) are mandatory header keywords. All other +keywords are optional and can be specified when calling :ref:`csobsdef` as user +parameters. The only exception is the ``duration`` keyword that will automatically +be queried. Here some usage examples: diff --git a/doc/source/users/reference_manual/csphagen.rst b/doc/source/users/reference_manual/csphagen.rst index 2fa0895..5621bc4 100644 --- a/doc/source/users/reference_manual/csphagen.rst +++ b/doc/source/users/reference_manual/csphagen.rst @@ -9,18 +9,50 @@ Creates files necessary to perform a region-based spectral On/Off analysis. Synopsis -------- -This script can be used to derive from an observation or a set of observations -the count spectra in a source region and in background regions, as well as the -detector response (effective area, energy redistribution matrix), that can be -used to perform a classical 1D spectral analysis. Regions can be placed -automatically or by hand. The output files are saved in the OGIP format normally -used in X-ray astronomy (PHA, ARF, RMF). -`See here `__. - -The outputs are: - -1) the PHA, ARF, RMF files, either separately for each observation, or stacked - for a set of observations; +This script generates the files that are necessary for a region-based spectral +On/Off analysis from one or several event lists. The output files are saved in +the OGIP format normally used in X-ray astronomy (PHA, ARF, RMF), +`see here for a description of the format `__. + +If the ``bkgmethod`` parameter is ``REFLECTED``, the script will use an On region +shape defined by the ``srcshape`` parameter and generate reflected regions by +placing regions of the same shape that are reflected with respect to the pointing +direction. So far only circular regions are supported, with a center that is +specified by the ``ra`` and ``dec`` parameters if ``coordsys=CEL`` or the ``glon`` +and ``glat`` parameters if ``coordsys=GAL``, and a radius that is specified by the +``rad`` parameter. Reflected regions are only generated for offset angles with +respect to the pointing direction that are smaller than the value specified by +the ``maxoffset`` parameter. If less than ``bkgregmin`` reflected regions can be +found because the offset angle between source and pointing direction is too small, +the observation will be skipped. Regions to be excluded for background +determination can be specified using a mask file that is specified using the +``inexclusion`` parameter. A mask file is a sky map where all pixel values that +differ from zero will be used as exclusion region. + +Alternatively, if ``bkgmethod=CUSTOM`` is specified, the source and background +regions will be specified using the ``srcregfile`` and ``bkgregfile`` parameters, +respectively. Both parameters accept either a ds9 region file or a sky map where +all non-zero pixel values define a region. In case that an observation definition +XML file is specified as input using the ``inobs``, background region files can +be specified separately for each observation using the ``OffRegions`` parameter +in the format + +.. code-block:: xml + + + + ... + + +The :ref:`csphagen` script will produce on output an observation definition XML +file that points to all relevant files. All relevant files will be prefixed with +the string specified by the ``prefix`` parameter. If several observations are +contained in the input observation definition XML file the script can either +generate region based files for each of the observations or stack all +observations into single files (controlled via the ``stack`` parameter). The +script will write out: + +1) the PHA, ARF, RMF files; 2) DS9 regions files listing the source and background regions for each observation; 3) a new observation definition XML file. @@ -39,8 +71,8 @@ General parameters Instrument response function. ``(inexclusion = NONE) [file]`` - Optional FITS file containing a WCS map in the first hdu that defines sky - regions not to be used for background estimation (where map value != 0). + Optional FITS file containing a WCS map in the first extension that defines + sky regions not to be used for background estimation (where map value != 0). ``outobs [string]`` Output observation definition XML file. @@ -72,10 +104,11 @@ General parameters You may use :ref:`csebins` to generate a file with appropriate energy binning. ``(srcshape = CIRCLE) [string]`` - Shape of the source region (``CIRCLE``: circular region around given position). + Shape of the source region. So far only ``CIRCLE`` exists which defines a + circular region around given position. ``coordsys [string]`` - Coordinate system (``CEL``: celestial; ``GAL``: galactic). + Coordinate system (CEL - celestial, GAL - galactic). ``ra [real]`` Right Ascension of source region centre (deg). diff --git a/doc/source/users/reference_manual/cstsdist.rst b/doc/source/users/reference_manual/cstsdist.rst index 8732f46..8262415 100644 --- a/doc/source/users/reference_manual/cstsdist.rst +++ b/doc/source/users/reference_manual/cstsdist.rst @@ -15,7 +15,7 @@ sets. The Test Statistics is defined as twice the log-likelihood difference that is obtained when fitting simulated data with and without a given source model component. -cstsdist will create an ASCII file in comma-separated value (CSV) format, +:red:`cstsdist` will create an ASCII file in comma-separated value (CSV) format, containing one row per TS computation. The first row is a header row providing the column names. The following rows give the TS value, the log-likelihood values of the fit with or without the source, the number of observed and diff --git a/doc/source/users/reference_manual/ctbkgcube.rst b/doc/source/users/reference_manual/ctbkgcube.rst index 0b636e8..e7f0d54 100644 --- a/doc/source/users/reference_manual/ctbkgcube.rst +++ b/doc/source/users/reference_manual/ctbkgcube.rst @@ -16,7 +16,7 @@ The energy binning may be either linear, logarithmic, or custom defined using an input file. The input model is used to predict the expected number of background counts in each background cube bin. -ctbkgcube requires on input the event list or observation definition file +:ref:`ctbkgcube` requires on input the event list or observation definition file that has been used in the generation of the counts cube using :doc:`ctbin`. To assure consistency between an existing counts cube and the @@ -29,12 +29,12 @@ Note that there should at least be 25 bins per energy decade in the background cube to assure that the energy dependence of the background rate is sufficiently well sampled (in particular at low energies). -ctbkgcube generates a background cube FITS file comprising two extensions. +:ref:`ctbkgcube` generates a background cube FITS file comprising two extensions. The primary extension contains a 3-dimensional image that contains the background cube values. The next extension named ``ENERGIES`` contains a binary table that defines the energies of the background cube. -ctbkgcube generates also an output model XML file that can serve as input +:ref:`ctbkgcube` generates also an output model XML file that can serve as input for a maximum likelihood analysis. The output model XML file is a copy of the input model XML file where the input background model has been replaced by a background model of type ``CTACubeBackground``. The ``CTACubeBackground`` diff --git a/doc/source/users/reference_manual/ctbutterfly.rst b/doc/source/users/reference_manual/ctbutterfly.rst index 41e1888..302fe44 100644 --- a/doc/source/users/reference_manual/ctbutterfly.rst +++ b/doc/source/users/reference_manual/ctbutterfly.rst @@ -23,11 +23,11 @@ law models that fall within the error ellipse of the prefactor and index parameters. The error ellipse is derived from the covariance matrix of a maximum likelihood fit. -ctbutterfly assumes that the input model (parameter ``inmodel``) has been +:ref:`ctbutterfly` assumes that the input model (parameter ``inmodel``) has been adjusted using :doc:`ctlike` to the data, but if this is not the case you can request a maximum likelihood fit by setting the hidden parameter ``fit=yes``. -ctbutterfly writes the butterfly diagram into an ASCII file with 4 columns +:ref:`ctbutterfly` writes the butterfly diagram into an ASCII file with 4 columns separated by a whitespace. Each row in the result file corresponds to a specific energy. The meaning of the columns are: diff --git a/doc/source/users/reference_manual/ctcubemask.rst b/doc/source/users/reference_manual/ctcubemask.rst index df4af6b..eec5996 100644 --- a/doc/source/users/reference_manual/ctcubemask.rst +++ b/doc/source/users/reference_manual/ctcubemask.rst @@ -13,7 +13,7 @@ This tool masks out specific regions from a counts cube by setting the corresponding bin values to -1. Bins with negative values will be ignored in a maximum likelihood analysis. A mask is applied spatially and spectrally. -ctcubemask applies a spatial mask that is comprised of a circular selection +:ref:`ctcubemask` applies a spatial mask that is comprised of a circular selection region and a list of circular exclusion regions. The circular selection region is specified by the sky direction of the centre and the radius of the circle. The circular exclusion regions are specified by an ASCII file in ds9 format. @@ -24,10 +24,10 @@ The ASCII file contains one row per exclusion region, given in the format where ``83.63`` and ``21.5`` are the Right Ascension and Declination of the centre and ``0.4`` is the radius (in degrees) of the exclusion circle. -ctcubemask also selects only counts cube energy layers that are fully comprised +:ref:`ctcubemask` also selects only counts cube energy layers that are fully comprised in the energy interval specified by the ``emin`` and ``emax`` parameters. -ctcubemask generates a counts cube FITS file that is a copy of the input +:ref:`ctcubemask` generates a counts cube FITS file that is a copy of the input counts cube and for which all masked bins have been set to -1. diff --git a/doc/source/users/reference_manual/ctedispcube.rst b/doc/source/users/reference_manual/ctedispcube.rst index f23d630..e301e66 100644 --- a/doc/source/users/reference_manual/ctedispcube.rst +++ b/doc/source/users/reference_manual/ctedispcube.rst @@ -16,7 +16,7 @@ which is the ratio between reconstructed and true photon energy. The energy binning of the cube may be either linear, logarithmic, or custom defined using an input file -ctedispcube requires on input the event list or observation definition XML +:ref:`ctedispcube` requires on input the event list or observation definition XML file that has been used in the generation of the counts cube using :doc:`ctbin`. It is not recommended to use the counts cube for the energy dispersion @@ -28,7 +28,7 @@ only little over the field of view of the camera it is recommended to use a rather coarse spatial binning to keep the file size manageable (with a typical value of ``binsz=1.0``). -ctedispcube generates an energy dispersion cube FITS file comprising three +:ref:`ctedispcube` generates an energy dispersion cube FITS file comprising three extensions. The primary extension contains a 4-dimensional image that contains the energy disperison values. The next extension named ``ENERGIES`` contains a binary table that defines the energies of the energy dispersion cube. The diff --git a/doc/source/users/reference_manual/cterror.rst b/doc/source/users/reference_manual/cterror.rst index fadd50e..8474adf 100644 --- a/doc/source/users/reference_manual/cterror.rst +++ b/doc/source/users/reference_manual/cterror.rst @@ -16,7 +16,7 @@ of the likelihood that corresponds to a given confidence level. By default a confidence level of 68% is used, but this level can be adjusted using the hidden ``confidence`` parameter. -cterror generates an output model XML file that contains the values of the +:ref:`cterror` generates an output model XML file that contains the values of the best fitting model parameters. For all free parameters, an ``error`` attribute is added that provides the statistical uncertainty in the parameter estimate as obtained from the likelihood profile. While cterror computes asymmetrical diff --git a/doc/source/users/reference_manual/ctexpcube.rst b/doc/source/users/reference_manual/ctexpcube.rst index 2c2cf8d..6d6b05c 100644 --- a/doc/source/users/reference_manual/ctexpcube.rst +++ b/doc/source/users/reference_manual/ctexpcube.rst @@ -15,7 +15,7 @@ Declination or Galactic latitude, and energy, that gives the exposure as function of true sky direction and energy. The energy binning of the cube may be either linear, logarithmic, or custom defined using an input file. -ctexpcube requires on input the event list or observation definition file +:ref:`ctexpcube` requires on input the event list or observation definition file that has been used in the generation of the counts cube using :doc:`ctbin`. The binning of an exposure cube does not need to correspond to the binning @@ -36,7 +36,7 @@ Note that there should at least be 25 bins per energy decade in the exposure cube to assure that the energy dependence of the exposure is sufficiently well sampled (in particular at low energies). -ctexpcube generates an exposure cube FITS file comprising three extensions. +:ref:`ctexpcube` generates an exposure cube FITS file comprising three extensions. The primary extension contains a 3-dimensional image that contains the exposure values. The next extension named ``ENERGIES`` contains a binary table that defines the energies of the exposure cube. The last extension named ``GTI`` diff --git a/doc/source/users/reference_manual/ctlike.rst b/doc/source/users/reference_manual/ctlike.rst index 8e18e60..756d7c7 100644 --- a/doc/source/users/reference_manual/ctlike.rst +++ b/doc/source/users/reference_manual/ctlike.rst @@ -17,12 +17,12 @@ The tool can mix the analysis of unbinned and binned data, and is also able to perform a joint maximum likelihood analysis of data collected in separate observations or with different instruments. -ctlike will automatically switch between unbinned, binned and joint analysis +:ref:`ctlike` will automatically switch between unbinned, binned and joint analysis on basis of the file provided on input (parameter ``inobs``). Providing an event list will lead to an unbinned analysis while providing a counts cube will lead to a binned analysis. If several observations have been stacked into a single counts cube, an exposure cube, a point spread function cube and -a background cube need also to be provided. ctlike will automatically prompt +a background cube need also to be provided. :ref:`ctlike` will automatically prompt for these parameters in case that a counts cube is given. Answering ``NONE`` will ignore the exposure cube, point spread function cube and background cube and handle the data as a single observation using the specified instrument @@ -33,19 +33,19 @@ can be handled by specifying an observation definition file on input. Each of the observations will be kept separately and associated with its appropriate instrument response functions, as opposed to a stacked analysis where average response functions, computed using :doc:`ctexpcube`, :doc:`ctpsfcube` and :doc:`ctbkgcube`, -are used. If an observation definition file is provided, ctlike will use the +are used. If an observation definition file is provided, :ref:`ctlike` will use the joint likelihood of all the observations for parameter optimisation. -By default, ctlike will use the Poisson statistics for likelihood computation, +By default, :ref:`ctlike` will use the Poisson statistics for likelihood computation, but for binned analysis also Gaussian statistics can be specified (parameter ``stat``). Optionally, a refit can be requested after an initial fit (parameter ``refit``), but normally this is not needed. For all model components that -have the ``tscalc="1"`` attribute set, ctlike will also compute the Test +have the ``tscalc="1"`` attribute set, :ref:`ctlike` will also compute the Test Statistics value that is a measure of the source significance. Optionally, the spatial model parameters can be kept fixed during that computation (parameter ``fix_spat_for_ts``). -ctlike generates an output model XML file that contains the values of the +:ref:`ctlike` generates an output model XML file that contains the values of the best fitting model parameters. For all free parameters, an ``error`` attribute is added that provides the statistical uncertainty in the parameter estimate. If computation of the Test Statistics has been requested for a model component, diff --git a/doc/source/users/reference_manual/ctmapcube.rst b/doc/source/users/reference_manual/ctmapcube.rst index 83ecadc..88132f6 100644 --- a/doc/source/users/reference_manual/ctmapcube.rst +++ b/doc/source/users/reference_manual/ctmapcube.rst @@ -16,7 +16,7 @@ map corresponds to a specific photon energy. The energy binning of the map cube may be either linear, logarithmic, or custom defined using an input file. -ctmapcube generates a map cube FITS file comprising two extensions. The +:ref:`ctmapcube` generates a map cube FITS file comprising two extensions. The primary extension contains a 3-dimensional image containing the map cube values. A second extension named ``ENERGIES`` contains a binary table that defines the energy values of each map in the cube. diff --git a/doc/source/users/reference_manual/ctmodel.rst b/doc/source/users/reference_manual/ctmodel.rst index d95480a..2084a9d 100644 --- a/doc/source/users/reference_manual/ctmodel.rst +++ b/doc/source/users/reference_manual/ctmodel.rst @@ -15,10 +15,10 @@ function of Right Ascension or Galactic longitude, Declination or Galactic latitude, and energy. The energy binning may be either linear, logarithmic, or custom defined using an input file. -ctmodel requires on input either a counts cube, an event list or an observation +:ref:`ctmodel` requires on input either a counts cube, an event list or an observation definition file. -If a counts cube is provided, ctmodel will use the definition of this cube +If a counts cube is provided, :ref:`ctmodel` will use the definition of this cube (such as sky coordinates and projection, number of pixels, pixel scale, energy binning) to compute a model cube. In case that the counts cube combines multiple observations (i.e. for a so-called "stacked cube"), an exposure cube, @@ -26,17 +26,17 @@ a point spread function cube and a background cube have to be provided (otherwise you may just enter ``NONE`` when the names of these files are queried). -If an event list is provided, ctmodel will query for a counts cube to +If an event list is provided, :ref:`ctmodel` will query for a counts cube to extract the model cube definition (parameter ``incube``). If no counts cube -is provided (``incube=NONE``), ctmodel tools will query for cube definition +is provided (``incube=NONE``), :ref:`ctmodel` will query for cube definition parameters. -If an observation definition file is provided, ctmodel will query for a counts +If an observation definition file is provided, :ref:`ctmodel` will query for a counts cube to extract the model cube definition, unless the observation definition file contains a single binned observation (in that case, the counts cube of that observation will be used to extract the model cube definition). -ctmodel generates a model cube FITS file comprising three extensions. The +:ref:`ctmodel` generates a model cube FITS file comprising three extensions. The primary extension contains a 3-dimensional image that contains the model cube values. The next extension named ``EBOUNDS`` contains a binary table that defines the energy boundaries of the background cube. The last extension diff --git a/doc/source/users/reference_manual/ctobssim.rst b/doc/source/users/reference_manual/ctobssim.rst index 2d3f690..3a87d3e 100644 --- a/doc/source/users/reference_manual/ctobssim.rst +++ b/doc/source/users/reference_manual/ctobssim.rst @@ -21,14 +21,14 @@ a numerical random number generator for the simulations with a seed value provided by the hidden ``seed`` parameter. Changing this parameter for subsequent runs will lead to different event samples. -ctobssim performs a safety check on the maximum photon rate for all model +:ref:`ctobssim` performs a safety check on the maximum photon rate for all model components to avoid that the tool locks up and requests huge memory resources, which may happen if a mistake was made in setting up the input model (for example if an error in the flux units is made). The maximum allowed photon rate is controlled by the hidden ``maxrate`` parameter, which by default is set to 1e6. -ctobssim can also generate multiple event lists if an observation definition +:ref:`ctobssim` can also generate multiple event lists if an observation definition file is specified on input using the hidden ``inobs`` parameter. In that case, simulation information will be gathered from the file, and for each observation an event list will be created. diff --git a/doc/source/users/reference_manual/ctpsfcube.rst b/doc/source/users/reference_manual/ctpsfcube.rst index ce6099f..3a87edb 100644 --- a/doc/source/users/reference_manual/ctpsfcube.rst +++ b/doc/source/users/reference_manual/ctpsfcube.rst @@ -16,7 +16,7 @@ and offset angle between true and measured arrival direction of a photon. The energy binning of the cube may be either linear, logarithmic, or custom defined using an input file. -ctpsfcube requires on input the event list or observation definition XML +:ref:`ctpsfcube` requires on input the event list or observation definition XML file that has been used in the generation of the counts cube using :doc:`ctbin`. It is not recommended to use the counts cube for the point spread function @@ -28,7 +28,7 @@ function varies only slowly over the field of view of the camera it is recommended to use a rather coarse spatial binning to keep the file size manageable (with a typical value of ``binsz=1.0``). -ctpsfcube generates a point spread function cube FITS file comprising three +:ref:`ctpsfcube` generates a point spread function cube FITS file comprising three extensions. The primary extension contains a 4-dimensional image that contains the point spread function values. The next extension named ``ENERGIES`` contains a binary table that defines the energies of the point spread function cube. diff --git a/doc/source/users/reference_manual/ctskymap.rst b/doc/source/users/reference_manual/ctskymap.rst index 81f78da..80627f7 100644 --- a/doc/source/users/reference_manual/ctskymap.rst +++ b/doc/source/users/reference_manual/ctskymap.rst @@ -20,7 +20,7 @@ parameter. By default, no background model is subtracted (method ``NONE``). If ``IRF`` is selected, the background template that are shipped with the Instrument Response Functions will be used for background subtraction. -ctskymap generates a FITS file comprising a sky map as primary extension. +:ref:`ctskymap` generates a FITS file comprising a sky map as primary extension. If a background subtraction method was selected, the FITS file will contain the additional extensions ``BACKGROUND`` and ``SIGNIFICANCE`` that contain the background map and a significance map, respectively. For the latter, the diff --git a/doc/source/users/reference_manual/cttsmap.rst b/doc/source/users/reference_manual/cttsmap.rst index 683336c..65652ac 100644 --- a/doc/source/users/reference_manual/cttsmap.rst +++ b/doc/source/users/reference_manual/cttsmap.rst @@ -19,7 +19,7 @@ that excludes the specified source. The square-root of the TS values corresponds roughly to the pre-trial detection significance of the source (in Gaussian sigma). -cttsmap generates a FITS file comprising a sky map of TS values followed by +:ref:`cttsmap` generates a FITS file comprising a sky map of TS values followed by one extension per free parameter that contains sky maps of the fitted parameter values. To save computation time, the errors are not computed by default. Specifying the hidden parameter ``errors=yes`` will switch on the diff --git a/doc/source/users/reference_manual/ctulimit.rst b/doc/source/users/reference_manual/ctulimit.rst index 01d1aa1..1df15c5 100644 --- a/doc/source/users/reference_manual/ctulimit.rst +++ b/doc/source/users/reference_manual/ctulimit.rst @@ -16,7 +16,7 @@ to a decrease of the likelihood that corresponds to a given confidence level. By default a confidence level of 95% is used, but this level can be adjusted using the hidden ``confidence`` parameter. -ctulimit writes the differential upper flux limit at a given reference +:ref:`ctulimit` writes the differential upper flux limit at a given reference energy (specified by the hidden parameter ``eref``) and the integrated upper flux limit (specified by the hidden parameters ``emin`` and ``emax``) into the log file. diff --git a/doc/source/users/reference_manual/usage.rst b/doc/source/users/reference_manual/usage.rst index 80597e0..ee2499e 100644 --- a/doc/source/users/reference_manual/usage.rst +++ b/doc/source/users/reference_manual/usage.rst @@ -1,7 +1,7 @@ .. _sec_usage: -Description of ctools parameters in the :ref:`reference` -======================================================== +ctools parameter interface +========================== For a generic introduction to ctools and user parameters see `here <../user_manual/introduction.html>`__. @@ -9,29 +9,27 @@ For a generic introduction to ctools and user parameters see Automatic parameters -------------------- -``par_name [ = value ] type`` - Where par_name is the name of the parameter, value is the default value, - valid values are valid parameter values, separated by | characters, and - type is the type of the parameter. - The type is enclosed in square brackets. +``par_name [type]`` + Where ``par_name`` is the name of the parameter, ``first valid value`` and + ``second valid value`` are valid parameter values, separated by ``|`` characters, + and ``type`` is the type of the parameter. Hidden parameters ----------------- -``(par_name = value) type`` - Where par_name is the name of the parameter, value is the default value, - and type is the type of the parameter. - The type is enclosed in square brackets. +``(par_name = value) [type]`` + Where ``par_name`` is the name of the parameter, ``value`` is the default value, + and ``type`` is the type of the parameter. Examples -------- ``infile [file]`` - Describes an automatic (queried) file-type parameter with no default value. + Describes an automatic (queried) file-type parameter. -``irf = South_50h [string]`` +``irf [string]`` Describes an automatic (queried) string-type parameter with two value options. diff --git a/src/Makefile.am b/src/Makefile.am index 1dbf1fe..4d96b3f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,7 +1,7 @@ ############################################################################# # Makefile.am for ctools module # # ------------------------------------------------------------------------- # -# Copyright (C) 2016-2017 Juergen Knoedlseder # +# Copyright (C) 2016-2018 Juergen Knoedlseder # # ------------------------------------------------------------------------- # # # # This program is free software: you can redistribute it and/or modify # @@ -101,6 +101,8 @@ help-install: $(INSTALL_DATA) "$$file" $(DESTDIR)$(datadir)/help/"$$helpname" ; \ sed -i.bak -e 's/``//g' -e 's/`//g' -e 's/:ref://g' -e 's/:doc://g' \ -e 's/.. note::/Note/g' -e 's/.. warning::/Warning/g' -e '1d' \ + -e 's/.. code-block:: bash//g' -e 's/.. code-block:: xml//g' \ + -e 's/>__/>/g' -e 's/>_/>/g' \ $(DESTDIR)$(datadir)/help/"$$helpname" ; \ rm -rf $(DESTDIR)$(datadir)/help/"$$helpname".bak ; \ done diff --git a/test/test_ctmodel.py b/test/test_ctmodel.py index d6f303f..8105064 100755 --- a/test/test_ctmodel.py +++ b/test/test_ctmodel.py @@ -72,7 +72,8 @@ class Test(test): ' inmodel="'+self._model+'"'+ \ ' caldb="'+self._caldb+'" irf="'+self._irf+'"'+ \ ' rad=5.0 ra=83.63 dec=22.01 tmin=0.0 tmax=1800'+ \ - ' emin=0.1 emax=100.0 enumbins=10 nxpix=40 nypix=40'+ \ + ' emin=0.1 emax=100.0 enumbins=10 ebinalg="LOG"'+ \ + ' nxpix=40 nypix=40'+ \ ' binsz=0.1 coordsys="CEL" proj="CAR"'+ \ ' xref=83.63 yref=22.01'+ \ ' logfile="ctmodel_cmd1.log" chatter=1' @@ -91,7 +92,8 @@ class Test(test): ' inmodel="model_that_does_not_exist.xml"'+ \ ' caldb="'+self._caldb+'" irf="'+self._irf+'"'+ \ ' rad=5.0 ra=83.63 dec=22.01 tmin=0.0 tmax=1800'+ \ - ' emin=0.1 emax=100.0 enumbins=10 nxpix=40 nypix=40'+ \ + ' emin=0.1 emax=100.0 enumbins=10 ebinalg="LOG"'+ \ + ' nxpix=40 nypix=40'+ \ ' binsz=0.1 coordsys="CEL" proj="CAR"'+ \ ' xref=83.63 yref=22.01'+ \ ' logfile="ctmodel_cmd2.log" debug=yes chatter=1' @@ -142,6 +144,7 @@ class Test(test): model['dec'] = 22.01 model['tmin'] = 0 model['tmax'] = 1800 + model['ebinalg'] = 'LOG' model['emin'] = 0.1 model['emax'] = 100.0 model['enumbins'] = 10 -- libgit2 0.21.4