Overview

A summary of the tools and scripts available in ctools is presented in the figure below. The tools are grouped according to functionality, and arranged according to the typical usage in a workflow. According to our naming convention, tools starting with the letters ct are implemented as C++ executables, and tools starting with the letters cs and com are implemented as Python scripts. Generic analysis scripts are shown in black, IACT analysis scripts are shown in blue and COMPTEL analysis scripts are shown in red.

../../_images/overview.jpg

Generic analysis scripts

cscaldb inspects the calibration database that is installed on the user’s computer and informs about the available instrument response functions.

csobsinfo inspects an observation definition file.

csebins generates custom energy binnings for all binning tools.

csmodelinfo inspects any given model definition file, csmodelselect selects sources from a model definition file, csmodelmerge merges several model definition files into a single one. ctmapcube transforms any source model into a map cube and csmodelsois extracts sources of interest from a model definition file and replaces the remaining sources by a map cube.

cttsmap generates a test statistic map.

csspec generates a spectrum and ctbutterfly computes a butterfly diagram for a given gamma-ray source.

ctlike is the workhorse of ctools and performs a maximum likelihood estimation of model parameters. In case that a source is not significantly detected, ctulimit will allow to assess its upper flux limit. cterror computes parameter errors from the likelihood profile, coping also with asymmetric uncertainites.

Finally a number of utilities exist. csinfo checks whether the software is properly installed, cstsmapsplit splits the test statistic computation into multiple jobs and cstsmapmerge merges the resulting maps into a single test statistic map. csworkflow implements a workflow manager for analysis pipelines and cstsdist generates a test statistic distribution.

IACT analysis scripts

csiactdata, csiactobs, csfindobs and csiactcopy support access to IACT data, and in particular the H.E.S.S. data in FITS format, provided that the user has the appropriate access rights.

csobs2caldb and csroot2caldb generate response databases from existing observations or ROOT files. csobsdef generates observation definition files from information provided in an ASCII file in csv format, and ctobssim simulates events for one or several observations based on an input model that describes the gamma-ray sources and the irreducable particle background.

csobsselect performs the selection of a subset of observations based on pointing direction and observing dates.

ctselect selects events from one or several observations based on reconstructed event direction, energy and trigger time.

ctbin, ctexpcube, ctpsfcube and ctedispcube perform the binning of the event data and the computation of the response cubes that are needed for a stacked analysis. ctcubemask enables the masking of individual bins from a binned analysis. csphagen prepares the PHA, ARF and RMF files for an On/Off analysis.

csbkgmodel prepares a standard background model for the analysis of IACT data that was validated on H.E.S.S. data, and ctbkgcube generates a binned background model for the stacked analysis.

ctskymap generates sky maps from the data and cssrcdetect detects sources in the sky map and writes them into a model definition file. csscs spatially separates source components based on their spectra.

cslightcrv generates a light curve and csphasecrv a phase curve for a source. ctphase computes for each event the phase for a periodic source, based on a simple phase model. ctprob computes for each event the probability that it arises from a specific model component. ctfindvar searches for time variable sources using an On/Off method in the time domain.

ctmodel computes the expected model cube for a given model definition file. csresmap generates a residual map and csresspec a residual spectrum to allow assessing the quality of the model fit.

cssens computes the IACT array sensitivity and cspull computes the pull distribution of model parameters for a given source based on simulations. csviscube computes a visibility map of the sky from a given IACT array site.

COMPTEL analysis scripts

comgendb generates a database for COMPTEL data analysis using the data provided by HEASARC.

comobsselect performs the selection of a subset of observations based on pointing direction and observing dates.

Binning of COMPTEL event data and combination of binned data products into a single COMPTEL data space is achieved using comobsbin and comobsadd, respectively.

A model for COMPTEL data analysis is generated using comobsmodel.

comobsback generates a background model for a COMPTEL data analysis.

comobssim simulates binned COMPTEL data.

comlixmap generates a test statistic map using the SRCLIX algorithm for COMPTEL data and comsrcdetect detects sources in a COMPTEL test statistic map.

compulbin generates a pulsar phase curve for COMPTEL data.

comlixfit performs a maximum likelihood fit of COMPTEL data using the iterative SRCLIX algorithm. comobsres derives a residual map of COMPTEL data.