Commit d0835fc8f4edd7c075cab13f305cdcd3e7d552fb

Authored by Jürgen Knödlseder
1 parent 2767f430

Add "statistic" parameter to ctbutterfly, cterror, cttsmap, and ctulimit (#2237)

@@ -24,41 +24,49 @@ Support model @@ -24,41 +24,49 @@ Support model
24 None 24 None
25 25
26 26
27 -ctobssim - CTA observation simulation  
28 --------------------------------------  
29 -Use t-type parameters for "tmin" and "tmax" to all specifying times in various  
30 -formats (#1864). 27 +ctbin - CTA event binning
  28 +-------------------------
  29 +None
31 30
32 31
33 -ctselect - CTA event selection  
34 -------------------------------  
35 -Use t-type parameters for "tmin" and "tmax" to all specifying times in various  
36 -formats (#1864). 32 +ctbkgcube - CTA background cube generation
  33 +------------------------------------------
  34 +None
37 35
38 36
39 -ctbin - CTA event binning  
40 -------------------------- 37 +ctbutterfly - Generate butterfly diagrams
  38 +-----------------------------------------
  39 +Add "statistic" parameter to allow setting of optimizer statistic (#2237).
  40 +
  41 +
  42 +ctcubemask - CTA cube filtering
  43 +-------------------------------
41 None 44 None
42 45
43 46
44 -ctlike - Maximum likelihood fitting  
45 ------------------------------------  
46 -Rename "stats" parameter to "statistic" (#2238). 47 +ctedispcube - CTA energy dispersion cube generation
  48 +---------------------------------------------------
  49 +None
47 50
48 51
49 -cttsmap - Generation of Test Statistic map  
50 ------------------------------------------- 52 +cterror - Likelihood profile error computation
  53 +----------------------------------------------
  54 +Add "statistic" parameter to allow setting of optimizer statistic (#2237).
  55 +
  56 +
  57 +ctexpcube - CTA exposure cube generation
  58 +----------------------------------------
51 None 59 None
52 60
53 61
54 -ctskymap - CTA sky mapping  
55 ---------------------------  
56 -Header keywords informing about the dates and times covered by the observations  
57 -used to generate the skymap, as well as the event energy range, are now appended  
58 -as header keywords to the FITS file (#2194). 62 +ctlike - Maximum likelihood fitting
  63 +-----------------------------------
  64 +Rename "stats" parameter to "statistic" (#2237).
59 65
60 -Add the RING background method, which is a classical analysis methods for IACT  
61 -data analysis, for background subtraction (#2207). 66 +
  67 +ctmapcube - CTA map cube generation
  68 +-----------------------------------
  69 +None
62 70
63 71
64 ctmodel - CTA counts cube modelling 72 ctmodel - CTA counts cube modelling
@@ -72,8 +80,19 @@ parallelization of the tool has also been optimised so that diffuse models are @@ -72,8 +80,19 @@ parallelization of the tool has also been optimised so that diffuse models are
72 not loaded over and over again (#2189). 80 not loaded over and over again (#2189).
73 81
74 82
75 -ctexpcube - CTA exposure cube generation  
76 ----------------------------------------- 83 +ctobssim - CTA observation simulation
  84 +-------------------------------------
  85 +Use t-type parameters for "tmin" and "tmax" to all specifying times in various
  86 +formats (#1864).
  87 +
  88 +
  89 +ctphase - Event phase computation
  90 +---------------------------------
  91 +None
  92 +
  93 +
  94 +ctprob - Event probability computation
  95 +--------------------------------------
77 None 96 None
78 97
79 98
@@ -82,62 +101,143 @@ ctpsfcube - CTA point spread function cube generation @@ -82,62 +101,143 @@ ctpsfcube - CTA point spread function cube generation
82 None 101 None
83 102
84 103
85 -ctedispcube - CTA energy dispersion cube generation  
86 ----------------------------------------------------  
87 -None 104 +ctselect - CTA event selection
  105 +------------------------------
  106 +Use t-type parameters for "tmin" and "tmax" to all specifying times in various
  107 +formats (#1864).
88 108
89 109
90 -ctbkgcube - CTA background cube generation 110 +ctskymap - CTA sky mapping
  111 +--------------------------
  112 +Header keywords informing about the dates and times covered by the observations
  113 +used to generate the skymap, as well as the event energy range, are now appended
  114 +as header keywords to the FITS file (#2194).
  115 +
  116 +Add the RING background method, which is a classical analysis methods for IACT
  117 +data analysis, for background subtraction (#2207).
  118 +
  119 +
  120 +cttsmap - Generation of Test Statistic map
91 ------------------------------------------ 121 ------------------------------------------
  122 +Add "statistic" parameter to allow setting of optimizer statistic (#2237).
  123 +
  124 +
  125 +ctulimit - Compute upper limit
  126 +------------------------------
  127 +Add "statistic" parameter to allow setting of optimizer statistic (#2237).
  128 +
  129 +
  130 +cscaldb - Inspect calibration database
  131 +--------------------------------------
92 None 132 None
93 133
94 134
95 -ctmapcube - CTA map cube generation  
96 ------------------------------------ 135 +csebins - Generate energy boundaries
  136 +------------------------------------
97 None 137 None
98 138
99 139
100 -ctcubemask - CTA cube filtering  
101 -------------------------------- 140 +csfindobs - Find IACT observations
  141 +----------------------------------
102 None 142 None
103 143
104 144
105 -ctbutterfly - Generate butterfly diagrams  
106 ------------------------------------------ 145 +csiactcopy - Copy IACT observations
  146 +-----------------------------------
107 None 147 None
108 148
109 149
110 -ctulimit - Compute upper limit  
111 ------------------------------- 150 +csiactdata - Inspect IACT data store
  151 +------------------------------------
112 None 152 None
113 153
114 154
115 -cterror - Likelihood profile error computation  
116 ----------------------------------------------- 155 +csiactobs - Inspect IACT observation definition XML file
  156 +--------------------------------------------------------
117 None 157 None
118 158
119 159
120 -ctprob - Event probability computation 160 +cslightcrv - Generate light curve
  161 +---------------------------------
  162 +Use t-type parameters for "tmin" and "tmax" to all specifying times in various
  163 +formats (#1864).
  164 +
  165 +
  166 +csmodelinfo - Return model information
121 -------------------------------------- 167 --------------------------------------
122 None 168 None
123 169
124 170
125 -ctphase - Event phase computation  
126 ---------------------------------- 171 +csmodelmerge - Merge models
  172 +---------------------------
127 None 173 None
128 174
129 175
130 -cscripts  
131 --------- 176 +csmodelselect - Select models
  177 +-----------------------------
  178 +None
  179 +
  180 +
  181 +csmodelsois - Puts selected sources in diffuse model cube
  182 +---------------------------------------------------------
132 Add csmodelsois script that replaces selected models in a model container by 183 Add csmodelsois script that replaces selected models in a model container by
133 a diffuse map cube (#2180). 184 a diffuse map cube (#2180).
134 185
135 -Use t-type parameters for "tmin" and "tmax" to all specifying times in various  
136 -formats (#1864).  
137 186
  187 +csobs2caldb - Generate calibration database entry for an IACT observation
  188 +-------------------------------------------------------------------------
  189 +None
  190 +
  191 +
  192 +csobsdef - Generate observation definition XML file
  193 +---------------------------------------------------
  194 +None
  195 +
  196 +
  197 +csobsinfo - Return observation definition information
  198 +-----------------------------------------------------
  199 +None
  200 +
  201 +
  202 +csobsselect - Select observations
  203 +---------------------------------
  204 +None
  205 +
  206 +
  207 +csphagen - Generate On/Off observations
  208 +---------------------------------------
138 The script csphagen was added to allow the generation of PHA, ARF and RMF datasets 209 The script csphagen was added to allow the generation of PHA, ARF and RMF datasets
139 for classical On/Off IACT analysis (#2208). 210 for classical On/Off IACT analysis (#2208).
140 211
  212 +
  213 +csphasecrv - Generate phase curve
  214 +---------------------------------
  215 +None
  216 +
  217 +
  218 +cspull - Generate pull distributions
  219 +------------------------------------
  220 +Use t-type parameters for "tmin" and "tmax" to all specifying times in various
  221 +formats (#1864).
  222 +
  223 +
  224 +csresmap - Generate residual map
  225 +--------------------------------
  226 +None
  227 +
  228 +
  229 +csroot2caldb - Generates calibration database from ROOT file
  230 +------------------------------------------------------------
  231 +None
  232 +
  233 +
  234 +cssens - Computes sensitivity curve
  235 +-----------------------------------
  236 +None
  237 +
  238 +
  239 +csspec - Generates Spectral Energy Distribution
  240 +-----------------------------------------------
141 The csspec script now can also handle On/Off spectra for SED generation (#2231). 241 The csspec script now can also handle On/Off spectra for SED generation (#2231).
142 242
143 The csspec script now can also handle non-CTA data. For that purpose a "method" 243 The csspec script now can also handle non-CTA data. For that purpose a "method"
@@ -148,6 +248,58 @@ will use "SLICE" for observations containing only CTA data and "NODES" for obser @@ -148,6 +248,58 @@ will use "SLICE" for observations containing only CTA data and "NODES" for obser
148 containing other data (#1927). 248 containing other data (#1927).
149 249
150 250
  251 +cssrcdetect - Detects sources in sky map
  252 +----------------------------------------
  253 +None
  254 +
  255 +
  256 +cstsdist - Computes Test Statistic distribution
  257 +-----------------------------------------------
  258 +Use t-type parameters for "tmin" and "tmax" to all specifying times in various
  259 +formats (#1864).
  260 +
  261 +
  262 +cstsmapmerge - Merge Test Statistic maps
  263 +----------------------------------------
  264 +None
  265 +
  266 +
  267 +cstsmapsplit - Prepare split Test Statistic computation
  268 +-------------------------------------------------------
  269 +None
  270 +
  271 +
  272 +csviscube - Generate visibility cube
  273 +------------------------------------
  274 +Use t-type parameters for "tmin" and "tmax" to all specifying times in various
  275 +formats (#1864).
  276 +
  277 +
  278 +csworkflow - Execute workflow
  279 +-----------------------------
  280 +None
  281 +
  282 +
  283 +calutils - Calibration utilities
  284 +--------------------------------
  285 +None
  286 +
  287 +
  288 +ioutils - Input/Output utilities
  289 +--------------------------------
  290 +None
  291 +
  292 +
  293 +modutils - Model utilities
  294 +--------------------------
  295 +None
  296 +
  297 +
  298 +obsutils - Observation utilities
  299 +--------------------------------
  300 +None
  301 +
  302 +
151 Examples 303 Examples
152 -------- 304 --------
153 None 305 None
configure.ac
@@ -32,8 +32,8 @@ AC_INIT([ctools], [1.5.0.dev1], [jurgen.knodlseder@irap.omp.eu], [ctools]) @@ -32,8 +32,8 @@ AC_INIT([ctools], [1.5.0.dev1], [jurgen.knodlseder@irap.omp.eu], [ctools])
32 AC_CONFIG_SRCDIR([src/ctselect/ctselect.cpp]) 32 AC_CONFIG_SRCDIR([src/ctselect/ctselect.cpp])
33 AC_CONFIG_MACRO_DIR([m4]) 33 AC_CONFIG_MACRO_DIR([m4])
34 #AM_INIT_AUTOMAKE([gnu no-dependencies foreign]) 34 #AM_INIT_AUTOMAKE([gnu no-dependencies foreign])
35 -AM_INIT_AUTOMAKE([gnu -Wno-portability foreign])  
36 -#AM_INIT_AUTOMAKE([gnu -Wno-portability foreign serial-tests]) 35 +#AM_INIT_AUTOMAKE([gnu -Wno-portability foreign])
  36 +AM_INIT_AUTOMAKE([gnu -Wno-portability foreign serial-tests])
37 AC_CONFIG_HEADER([config.h]) 37 AC_CONFIG_HEADER([config.h])
38 38
39 39
cscripts/csiactobs.py
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # ========================================================================== 2 # ==========================================================================
3 -# Generates an IACT observation definition XML file. 3 +# Generates an IACT observation definition XML file
4 # 4 #
5 # Copyright (C) 2015-2017 Michael Mayer 5 # Copyright (C) 2015-2017 Michael Mayer
6 # 6 #
cscripts/csobs2caldb.py
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # ========================================================================== 2 # ==========================================================================
3 -# Creates a calibration database entry for an IACT observation. 3 +# Creates a calibration database entry for an IACT observation
4 # 4 #
5 # Copyright (C) 2015-2017 Michael Mayer 5 # Copyright (C) 2015-2017 Michael Mayer
6 # 6 #
cscripts/cstsmapsplit.par
@@ -27,6 +27,7 @@ caldb, s, a, prod2,,, "Calibration database" @@ -27,6 +27,7 @@ caldb, s, a, prod2,,, "Calibration database"
27 irf, s, a, South_0.5h,,, "Instrument response function" 27 irf, s, a, South_0.5h,,, "Instrument response function"
28 edisp, b, h, no,,, "Apply energy dispersion?" 28 edisp, b, h, no,,, "Apply energy dispersion?"
29 errors, b, h, no,,, "Compute/store parameter errors?" 29 errors, b, h, no,,, "Compute/store parameter errors?"
  30 +statistic, s, h, CSTAT,CSTAT|WSTAT|CHI2,, "Optimization statistic"
30 outmap, f, a, tsmap.fits,,, "Output Test Statistic map file" 31 outmap, f, a, tsmap.fits,,, "Output Test Statistic map file"
31 bins_per_job, i, a, 5,,, "Number of TS map bins per task" 32 bins_per_job, i, a, 5,,, "Number of TS map bins per task"
32 compute_null, b, a, yes,,,"Compute null hypothesis first?" 33 compute_null, b, a, yes,,,"Compute null hypothesis first?"
doc/source/users/reference_manual/cstsmapsplit.rst
@@ -50,6 +50,14 @@ General parameters @@ -50,6 +50,14 @@ General parameters
50 ``(edisp = no) [boolean]`` 50 ``(edisp = no) [boolean]``
51 Applies energy dispersion to response computation. 51 Applies energy dispersion to response computation.
52 52
  53 +``(errors = no) [boolean]``
  54 + Compute and store parameter errors?
  55 +
  56 +``(statistic = CSTAT) <CSTAT|WSTAT|CHI2> [string]``
  57 + Optimization statistic. ``CSTAT`` applies to all types of observations,
  58 + ``WSTAT``applies only to On/Off observations, and ``CHI2`` applies only
  59 + to binned or stacked observations.
  60 +
53 ``outmap [file]`` 61 ``outmap [file]``
54 Output Test Statistic map file. 62 Output Test Statistic map file.
55 63
doc/source/users/reference_manual/ctbutterfly.rst
@@ -86,6 +86,11 @@ General parameters @@ -86,6 +86,11 @@ General parameters
86 ``(confidence = 0.68) [real]`` 86 ``(confidence = 0.68) [real]``
87 Confidence level for error computation. 87 Confidence level for error computation.
88 88
  89 +``(statistic = CSTAT) <CSTAT|WSTAT|CHI2> [string]``
  90 + Optimization statistic. ``CSTAT`` applies to all types of observations,
  91 + ``WSTAT``applies only to On/Off observations, and ``CHI2`` applies only
  92 + to binned or stacked observations.
  93 +
89 ``(matrix = "NONE") [file]`` 94 ``(matrix = "NONE") [file]``
90 Input covariance matrix file (not used) 95 Input covariance matrix file (not used)
91 96
doc/source/users/reference_manual/cterror.rst
@@ -30,13 +30,13 @@ General parameters @@ -30,13 +30,13 @@ General parameters
30 30
31 ``inobs [file]`` 31 ``inobs [file]``
32 Input event list, counts cube or observation definition XML file. 32 Input event list, counts cube or observation definition XML file.
33 - 33 +
34 ``inmodel [file]`` 34 ``inmodel [file]``
35 Input model XML file. 35 Input model XML file.
36 - 36 +
37 ``srcname [string]`` 37 ``srcname [string]``
38 Name of source model for which the parameter errors should be computed. 38 Name of source model for which the parameter errors should be computed.
39 - 39 +
40 ``expcube [file]`` 40 ``expcube [file]``
41 Input exposure cube file. 41 Input exposure cube file.
42 42
@@ -51,22 +51,27 @@ General parameters @@ -51,22 +51,27 @@ General parameters
51 51
52 ``caldb [string]`` 52 ``caldb [string]``
53 Calibration database. 53 Calibration database.
54 - 54 +
55 ``irf [string]`` 55 ``irf [string]``
56 Instrumental response function. 56 Instrumental response function.
57 - 57 +
58 ``(edisp = no) [boolean]`` 58 ``(edisp = no) [boolean]``
59 Applies energy dispersion to response computation. 59 Applies energy dispersion to response computation.
60 - 60 +
61 ``outmodel [file]`` 61 ``outmodel [file]``
62 Output model XML file with updated error information. 62 Output model XML file with updated error information.
63 - 63 +
64 ``(confidence = 0.68) [real]`` 64 ``(confidence = 0.68) [real]``
65 Confidence level for error computation. 65 Confidence level for error computation.
66 - 66 +
67 ``(tol = 1e-3) [real]`` 67 ``(tol = 1e-3) [real]``
68 Computation tolerance. 68 Computation tolerance.
69 - 69 +
  70 +``(statistic = CSTAT) <CSTAT|WSTAT|CHI2> [string]``
  71 + Optimization statistic. ``CSTAT`` applies to all types of observations,
  72 + ``WSTAT``applies only to On/Off observations, and ``CHI2`` applies only
  73 + to binned or stacked observations.
  74 +
70 ``(max_iter = 50) [integer]`` 75 ``(max_iter = 50) [integer]``
71 Maximum number of iterations before stopping the likelihood 76 Maximum number of iterations before stopping the likelihood
72 profil computations. 77 profil computations.
doc/source/users/reference_manual/cttsmap.rst
@@ -62,34 +62,39 @@ General parameters @@ -62,34 +62,39 @@ General parameters
62 62
63 ``outmap [file]`` 63 ``outmap [file]``
64 Output Test Statistic map file. 64 Output Test Statistic map file.
65 - 65 +
66 ``(errors = no) [boolean]`` 66 ``(errors = no) [boolean]``
67 Compute and store parameter errors? 67 Compute and store parameter errors?
68 - 68 +
  69 +``(statistic = CSTAT) <CSTAT|WSTAT|CHI2> [string]``
  70 + Optimization statistic. ``CSTAT`` applies to all types of observations,
  71 + ``WSTAT``applies only to On/Off observations, and ``CHI2`` applies only
  72 + to binned or stacked observations.
  73 +
69 ``(usepnt = no) [boolean]`` 74 ``(usepnt = no) [boolean]``
70 Use CTA pointing direction for map centre instead of xref/yref parameters? 75 Use CTA pointing direction for map centre instead of xref/yref parameters?
71 - 76 +
72 ``nxpix [integer]`` 77 ``nxpix [integer]``
73 Number of map pixels in Right Ascension or Galactic longitude. 78 Number of map pixels in Right Ascension or Galactic longitude.
74 - 79 +
75 ``nypix [integer]`` 80 ``nypix [integer]``
76 Number of map pixels in Declination or Galactic latitude. 81 Number of map pixels in Declination or Galactic latitude.
77 - 82 +
78 ``binsz [real]`` 83 ``binsz [real]``
79 Map pixel size (in degrees/pixel). 84 Map pixel size (in degrees/pixel).
80 - 85 +
81 ``coordsys <CEL|GAL> [string]`` 86 ``coordsys <CEL|GAL> [string]``
82 Coordinate system (CEL - celestial, GAL - galactic). 87 Coordinate system (CEL - celestial, GAL - galactic).
83 - 88 +
84 ``proj <AIT|AZP|CAR|GLS|MER|MOL|SFL|SIN|STG|TAN> [string]`` 89 ``proj <AIT|AZP|CAR|GLS|MER|MOL|SFL|SIN|STG|TAN> [string]``
85 Projection method. 90 Projection method.
86 91
87 ``xref [real]`` 92 ``xref [real]``
88 Right Ascension / Galactic longitude of map centre (J2000, in degrees). 93 Right Ascension / Galactic longitude of map centre (J2000, in degrees).
89 - 94 +
90 ``yref [real]`` 95 ``yref [real]``
91 Declination / Galactic latitude of map centre (J2000, in degrees). 96 Declination / Galactic latitude of map centre (J2000, in degrees).
92 - 97 +
93 ``(binmin = -1) [integer]`` 98 ``(binmin = -1) [integer]``
94 First bin to compute. 99 First bin to compute.
95 100
@@ -98,7 +103,7 @@ General parameters @@ -98,7 +103,7 @@ General parameters
98 103
99 ``(logLO = -1) [real]`` 104 ``(logLO = -1) [real]``
100 LogLikelihood value of null hypothesis. 105 LogLikelihood value of null hypothesis.
101 - 106 +
102 107
103 Standard parameters 108 Standard parameters
104 ------------------- 109 -------------------
doc/source/users/reference_manual/ctulimit.rst
@@ -22,19 +22,18 @@ upper flux limit (specified by the hidden parameters ``emin`` and ``emax``) @@ -22,19 +22,18 @@ upper flux limit (specified by the hidden parameters ``emin`` and ``emax``)
22 into the log file. 22 into the log file.
23 23
24 24
25 -  
26 General parameters 25 General parameters
27 ------------------ 26 ------------------
28 27
29 ``inobs [file]`` 28 ``inobs [file]``
30 Input event list, counts cube or observation definition XML file. 29 Input event list, counts cube or observation definition XML file.
31 - 30 +
32 ``inmodel [file]`` 31 ``inmodel [file]``
33 Input model XML file. 32 Input model XML file.
34 - 33 +
35 ``srcname [string]`` 34 ``srcname [string]``
36 Name of source model for which the upper flux limit should be computed. 35 Name of source model for which the upper flux limit should be computed.
37 - 36 +
38 ``expcube [file]`` 37 ``expcube [file]``
39 Input exposure cube file. 38 Input exposure cube file.
40 39
@@ -49,36 +48,41 @@ General parameters @@ -49,36 +48,41 @@ General parameters
49 48
50 ``caldb [string]`` 49 ``caldb [string]``
51 Calibration database. 50 Calibration database.
52 - 51 +
53 ``irf [string]`` 52 ``irf [string]``
54 Instrumental response function. 53 Instrumental response function.
55 - 54 +
56 ``(edisp = no) [boolean]`` 55 ``(edisp = no) [boolean]``
57 Applies energy dispersion to response computation. 56 Applies energy dispersion to response computation.
58 - 57 +
59 ``(confidence = 0.95) [real]`` 58 ``(confidence = 0.95) [real]``
60 Confidence level of upper limit. 59 Confidence level of upper limit.
61 - 60 +
62 ``(sigma_min = 0.0) [real]`` 61 ``(sigma_min = 0.0) [real]``
63 Minimum boundary to start searching for upper limit value. 62 Minimum boundary to start searching for upper limit value.
64 Number of standard deviations above best fit value 63 Number of standard deviations above best fit value
65 - 64 +
66 ``(sigma_max = 10.0) [real]`` 65 ``(sigma_max = 10.0) [real]``
67 Maximum boundary to start searching for upper limit value. 66 Maximum boundary to start searching for upper limit value.
68 Number of standard deviations above best fit value 67 Number of standard deviations above best fit value
69 - 68 +
70 ``(eref = 1.0) [real])`` 69 ``(eref = 1.0) [real])``
71 Reference energy for differential limit (in TeV). 70 Reference energy for differential limit (in TeV).
72 - 71 +
73 ``(emin = 1.0) [real])`` 72 ``(emin = 1.0) [real])``
74 Minimum energy for integral flux limit (in TeV). 73 Minimum energy for integral flux limit (in TeV).
75 - 74 +
76 ``(emax = 100) [real]`` 75 ``(emax = 100) [real]``
77 Maximum energy for integral flux limit (in TeV). 76 Maximum energy for integral flux limit (in TeV).
78 - 77 +
79 ``(tol = 1e-5) [real]`` 78 ``(tol = 1e-5) [real]``
80 Computation tolerance. 79 Computation tolerance.
81 - 80 +
  81 +``(statistic = CSTAT) <CSTAT|WSTAT|CHI2> [string]``
  82 + Optimization statistic. ``CSTAT`` applies to all types of observations,
  83 + ``WSTAT``applies only to On/Off observations, and ``CHI2`` applies only
  84 + to binned or stacked observations.
  85 +
82 ``(max_iter = 50) [integer]`` 86 ``(max_iter = 50) [integer]``
83 Maximum number of iterations before stopping the upper 87 Maximum number of iterations before stopping the upper
84 limit computations. 88 limit computations.
@@ -103,7 +107,8 @@ Standard parameters @@ -103,7 +107,8 @@ Standard parameters
103 Specifies whether an existing output file should be overwritten. 107 Specifies whether an existing output file should be overwritten.
104 108
105 ``(debug = no) [boolean]`` 109 ``(debug = no) [boolean]``
106 - Enables debug mode. In debug mode the executable will dump any log file output to the console. 110 + Enables debug mode. In debug mode the executable will dump any log file
  111 + output to the console.
107 112
108 ``(mode = ql) [string]`` 113 ``(mode = ql) [string]``
109 Mode of automatic parameters (default is "ql", i.e. "query and learn"). 114 Mode of automatic parameters (default is "ql", i.e. "query and learn").
src/ctbutterfly/ctbutterfly.cpp
@@ -451,17 +451,16 @@ void ctbutterfly::free_members(void) @@ -451,17 +451,16 @@ void ctbutterfly::free_members(void)
451 * @exception GException::feature_not_implemented 451 * @exception GException::feature_not_implemented
452 * Loading of covariance matrix is not yet implemented. 452 * Loading of covariance matrix is not yet implemented.
453 * 453 *
454 - * Get all task parameters from parameter file or (if required) by querying  
455 - * the user. Most parameters are only required if no observation exists so  
456 - * far in the observation container. In this case, a single CTA observation  
457 - * will be added to the container, using the definition provided in the  
458 - * parameter file. 454 + * Get all task parameters from parameter file.
459 ***************************************************************************/ 455 ***************************************************************************/
460 void ctbutterfly::get_parameters(void) 456 void ctbutterfly::get_parameters(void)
461 { 457 {
462 // Setup observations from "inobs" parameter 458 // Setup observations from "inobs" parameter
463 setup_observations(m_obs); 459 setup_observations(m_obs);
464 460
  461 + // Set observation statistic
  462 + set_obs_statistic(gammalib::toupper((*this)["statistic"].string()));
  463 +
465 // Setup models from "inmodel" parameter 464 // Setup models from "inmodel" parameter
466 setup_models(m_obs, (*this)["srcname"].string()); 465 setup_models(m_obs, (*this)["srcname"].string());
467 466
@@ -475,8 +474,8 @@ void ctbutterfly::get_parameters(void) @@ -475,8 +474,8 @@ void ctbutterfly::get_parameters(void)
475 std::string matrixfilename = (*this)["matrix"].filename(); 474 std::string matrixfilename = (*this)["matrix"].filename();
476 if (matrixfilename != "NONE") { 475 if (matrixfilename != "NONE") {
477 std::string msg = "Loading of matrix from file not implemented yet. " 476 std::string msg = "Loading of matrix from file not implemented yet. "
478 - "Use filename = \"NONE\" to induce a recomputation of "  
479 - "the matrix internally."; 477 + "Use filename = \"NONE\" to induce a recomputation "
  478 + "of the matrix internally.";
480 throw GException::feature_not_implemented(G_GET_PARAMETERS, msg); 479 throw GException::feature_not_implemented(G_GET_PARAMETERS, msg);
481 // m_covariance.load(matrixfilename); 480 // m_covariance.load(matrixfilename);
482 } 481 }
src/ctbutterfly/ctbutterfly.par
@@ -34,6 +34,7 @@ method, s, h, GAUSSIAN, GAUSSIAN|ENVELOPE,,&quot;Butterfly computation method&quot; @@ -34,6 +34,7 @@ method, s, h, GAUSSIAN, GAUSSIAN|ENVELOPE,,&quot;Butterfly computation method&quot;
34 #===================== 34 #=====================
35 fit, b, h, no,,, "Perform maximum likelihood fitting?" 35 fit, b, h, no,,, "Perform maximum likelihood fitting?"
36 confidence, r, h, 0.68,0.0,1.0, "Confidence level" 36 confidence, r, h, 0.68,0.0,1.0, "Confidence level"
  37 +statistic, s, h, CSTAT,CSTAT|WSTAT|CHI2,, "Optimization statistic"
37 matrix, f, h, "NONE",,, "Input covariance Matrix FITS file" 38 matrix, f, h, "NONE",,, "Input covariance Matrix FITS file"
38 39
39 # 40 #
src/cterror/cterror.cpp
1 /*************************************************************************** 1 /***************************************************************************
2 * cterror - Parameter error calculation tool * 2 * cterror - Parameter error calculation tool *
3 * ----------------------------------------------------------------------- * 3 * ----------------------------------------------------------------------- *
4 - * copyright (C) 2015-2016 by Florent Forest * 4 + * copyright (C) 2015-2017 by Florent Forest *
5 * ----------------------------------------------------------------------- * 5 * ----------------------------------------------------------------------- *
6 * * 6 * *
7 * This program is free software: you can redistribute it and/or modify * 7 * This program is free software: you can redistribute it and/or modify *
@@ -443,14 +443,16 @@ void cterror::free_members(void) @@ -443,14 +443,16 @@ void cterror::free_members(void)
443 /***********************************************************************//** 443 /***********************************************************************//**
444 * @brief Get application parameters 444 * @brief Get application parameters
445 * 445 *
446 - * Get all task parameters from parameter file or (if required) by querying  
447 - * the user. 446 + * Get all task parameters from parameter file.
448 ***************************************************************************/ 447 ***************************************************************************/
449 void cterror::get_parameters(void) 448 void cterror::get_parameters(void)
450 { 449 {
451 // Setup observations from "inobs" parameter 450 // Setup observations from "inobs" parameter
452 setup_observations(m_obs); 451 setup_observations(m_obs);
453 - 452 +
  453 + // Set observation statistic
  454 + set_obs_statistic(gammalib::toupper((*this)["statistic"].string()));
  455 +
454 // Setup models from "inmodel" parameter 456 // Setup models from "inmodel" parameter
455 setup_models(m_obs, (*this)["srcname"].string()); 457 setup_models(m_obs, (*this)["srcname"].string());
456 458
src/cterror/cterror.par
@@ -34,6 +34,7 @@ outmodel, f, a, &quot;results.xml&quot;,,, &quot;Output model definiton XML file&quot; @@ -34,6 +34,7 @@ outmodel, f, a, &quot;results.xml&quot;,,, &quot;Output model definiton XML file&quot;
34 #============================= 34 #=============================
35 confidence, r, h, 0.68,0.0,1.0, "Confidence level" 35 confidence, r, h, 0.68,0.0,1.0, "Confidence level"
36 tol, r, h, 1e-3,,, "Computation tolerance" 36 tol, r, h, 1e-3,,, "Computation tolerance"
  37 +statistic, s, h, CSTAT,CSTAT|WSTAT|CHI2,, "Optimization statistic"
37 max_iter, i, h, 50,1,1000, "Maximum number of iterations" 38 max_iter, i, h, 50,1,1000, "Maximum number of iterations"
38 39
39 # 40 #
src/cttsmap/cttsmap.cpp
1 /*************************************************************************** 1 /***************************************************************************
2 * cttsmap - TS map calculation tool * 2 * cttsmap - TS map calculation tool *
3 * ----------------------------------------------------------------------- * 3 * ----------------------------------------------------------------------- *
4 - * copyright (C) 2014-2016 by Michael Mayer * 4 + * copyright (C) 2014-2017 by Michael Mayer *
5 * ----------------------------------------------------------------------- * 5 * ----------------------------------------------------------------------- *
6 * * 6 * *
7 * This program is free software: you can redistribute it and/or modify * 7 * This program is free software: you can redistribute it and/or modify *
@@ -525,17 +525,16 @@ void cttsmap::free_members(void) @@ -525,17 +525,16 @@ void cttsmap::free_members(void)
525 * @exception GException::invalid_value 525 * @exception GException::invalid_value
526 * Test source has no RA/DEC parameters. 526 * Test source has no RA/DEC parameters.
527 * 527 *
528 - * Get all task parameters from parameter file or (if required) by querying  
529 - * the user. Most parameters are only required if no observation exists so  
530 - * far in the observation container. In this case, a single CTA observation  
531 - * will be added to the container, using the definition provided in the  
532 - * parameter file. 528 + * Get all task parameters from parameter file.
533 ***************************************************************************/ 529 ***************************************************************************/
534 void cttsmap::get_parameters(void) 530 void cttsmap::get_parameters(void)
535 { 531 {
536 // Setup observations from "inobs" parameter 532 // Setup observations from "inobs" parameter
537 setup_observations(m_obs); 533 setup_observations(m_obs);
538 534
  535 + // Set observation statistic
  536 + set_obs_statistic(gammalib::toupper((*this)["statistic"].string()));
  537 +
539 // Setup models from "inmodel" parameter 538 // Setup models from "inmodel" parameter
540 setup_models(m_obs, (*this)["srcname"].string()); 539 setup_models(m_obs, (*this)["srcname"].string());
541 540
src/cttsmap/cttsmap.par
@@ -32,6 +32,7 @@ outmap, f, a, &quot;tsmap.fits&quot;,,, &quot;Output Test Statistic map file&quot; @@ -32,6 +32,7 @@ outmap, f, a, &quot;tsmap.fits&quot;,,, &quot;Output Test Statistic map file&quot;
32 # TS map computation parameters 32 # TS map computation parameters
33 #============================== 33 #==============================
34 errors, b, h, no,,, "Compute and store parameter errors?" 34 errors, b, h, no,,, "Compute and store parameter errors?"
  35 +statistic, s, h, CSTAT,CSTAT|WSTAT|CHI2,, "Optimization statistic"
35 36
36 # 37 #
37 # Spatial binning parameters 38 # Spatial binning parameters
src/ctulimit/ctulimit.cpp
@@ -449,14 +449,16 @@ void ctulimit::free_members(void) @@ -449,14 +449,16 @@ void ctulimit::free_members(void)
449 /***********************************************************************//** 449 /***********************************************************************//**
450 * @brief Get application parameters 450 * @brief Get application parameters
451 * 451 *
452 - * Get all task parameters from parameter file or (if required) by querying  
453 - * the user. 452 + * Get all task parameters from parameter file.
454 ***************************************************************************/ 453 ***************************************************************************/
455 void ctulimit::get_parameters(void) 454 void ctulimit::get_parameters(void)
456 { 455 {
457 // Setup observations from "inobs" parameter 456 // Setup observations from "inobs" parameter
458 setup_observations(m_obs); 457 setup_observations(m_obs);
459 - 458 +
  459 + // Set observation statistic
  460 + set_obs_statistic(gammalib::toupper((*this)["statistic"].string()));
  461 +
460 // Setup models from "inmodel" parameter 462 // Setup models from "inmodel" parameter
461 setup_models(m_obs, (*this)["srcname"].string()); 463 setup_models(m_obs, (*this)["srcname"].string());
462 464
src/ctulimit/ctulimit.par
@@ -37,6 +37,7 @@ eref, r, h, 1.0,,, &quot;Reference energy for differential limit (TeV)&quot; @@ -37,6 +37,7 @@ eref, r, h, 1.0,,, &quot;Reference energy for differential limit (TeV)&quot;
37 emin, r, h, 1.0,,, "Minimum energy for integral flux limit (TeV)" 37 emin, r, h, 1.0,,, "Minimum energy for integral flux limit (TeV)"
38 emax, r, h, 100.0,,, "Maximum energy for integral flux limit (TeV)" 38 emax, r, h, 100.0,,, "Maximum energy for integral flux limit (TeV)"
39 tol, r, h, 1e-5,,, "Computation tolerance" 39 tol, r, h, 1e-5,,, "Computation tolerance"
  40 +statistic, s, h, CSTAT,CSTAT|WSTAT|CHI2,, "Optimization statistic"
40 max_iter, i, h, 50,1,1000, "Maximum number of iterations" 41 max_iter, i, h, 50,1,1000, "Maximum number of iterations"
41 42
42 # 43 #