Commit 1d673779121d39769f3cba6f86b976c9e6a58a88

Authored by Jürgen Knödlseder
1 parent 14063948

Rename ctlike "stat" parameter to "statistic" (#2238)

ChangeLog
1 -2017-10-18 1 +2017-10-21
2 2
3 * Version 1.5.0 released 3 * Version 1.5.0 released
4 ======================== 4 ========================
5 5
  6 + Rename ctlike "stat" parameter to "statistic" (#2237)
6 Enable handling of On/Off observations in csspec (#2231) 7 Enable handling of On/Off observations in csspec (#2231)
7 Add csphagen script (#2208) 8 Add csphagen script (#2208)
8 Add RING background method to ctskymap (#2207) 9 Add RING background method to ctskymap (#2207)
1 New Features and Important Changes in ctools 1.5.0 1 New Features and Important Changes in ctools 1.5.0
2 2
3 -18 October 2017 3 +21 October 2017
4 4
5 5
6 Introduction 6 Introduction
@@ -43,7 +43,7 @@ None @@ -43,7 +43,7 @@ None
43 43
44 ctlike - Maximum likelihood fitting 44 ctlike - Maximum likelihood fitting
45 ----------------------------------- 45 -----------------------------------
46 -None 46 +Rename "stats" parameter to "statistic" (#2238).
47 47
48 48
49 cttsmap - Generation of Test Statistic map 49 cttsmap - Generation of Test Statistic map
doc/source/admin/release_history/1.5.rst
@@ -44,3 +44,9 @@ New features @@ -44,3 +44,9 @@ New features
44 Add :ref:`csmodelsois` script 44 Add :ref:`csmodelsois` script
45 * [`1864 <https://cta-redmine.irap.omp.eu/issues/1864>`_] - 45 * [`1864 <https://cta-redmine.irap.omp.eu/issues/1864>`_] -
46 Use t-type parameters for all ``tmin`` and ``tmax`` parameters 46 Use t-type parameters for all ``tmin`` and ``tmax`` parameters
  47 +
  48 +Clean up
  49 +--------
  50 +
  51 +* [`2237 <https://cta-redmine.irap.omp.eu/issues/2237>`_] -
  52 + Rename :ref:`ctlike` ``stat`` parameter to ``statistic``
doc/source/users/reference_manual/ctlike.rst
@@ -94,8 +94,8 @@ General parameters @@ -94,8 +94,8 @@ General parameters
94 ``(outcovmat = NONE) [string]`` 94 ``(outcovmat = NONE) [string]``
95 Output FITS or CSV file to store covariance matrix. 95 Output FITS or CSV file to store covariance matrix.
96 96
97 -``(stat = POISSON) [string]``  
98 - Fitting statistics (POISSON or GAUSSIAN; only affects binned analysis). 97 +``(statistic = POISSON) [string]``
  98 + Fitting statistics (``POISSON`` or ``GAUSSIAN``; only affects binned analysis).
99 99
100 ``(refit = no) [boolean]`` 100 ``(refit = no) [boolean]``
101 Perform refitting of solution after initial fit. 101 Perform refitting of solution after initial fit.
src/ctlike/ctlike.cpp
@@ -379,15 +379,7 @@ void ctlike::save(void) @@ -379,15 +379,7 @@ void ctlike::save(void)
379 * @brief Get application parameters 379 * @brief Get application parameters
380 * 380 *
381 * Get all required task parameters from the parameter file or (if specified) 381 * Get all required task parameters from the parameter file or (if specified)
382 - * by querying the user. Observation dependent parameters will only be read  
383 - * if the observation container is actually empty. Observation dependent  
384 - * parameters are:  
385 - * "stat" (statistic to be used for observation),  
386 - * "caldb" (calibration database),  
387 - * "irf" (instrument response function), and  
388 - * "infile" (input file name).  
389 - * The model will only be loaded if no model components exist in the  
390 - * observation container. 382 + * by querying the user.
391 * 383 *
392 * This method handles both loading of FITS files and of handling XML 384 * This method handles both loading of FITS files and of handling XML
393 * observation definition files. 385 * observation definition files.
@@ -401,7 +393,7 @@ void ctlike::get_parameters(void) @@ -401,7 +393,7 @@ void ctlike::get_parameters(void)
401 if (!m_use_xml) { 393 if (!m_use_xml) {
402 394
403 // Get other task parameters 395 // Get other task parameters
404 - std::string statistic = gammalib::toupper((*this)["stat"].string()); 396 + std::string statistic = gammalib::toupper((*this)["statistic"].string());
405 397
406 // Set statistic 398 // Set statistic
407 (*m_obs[0]).statistic(statistic); 399 (*m_obs[0]).statistic(statistic);
src/ctlike/ctlike.par
@@ -31,7 +31,7 @@ outcovmat, f, h, &quot;NONE&quot;,,, &quot;Output covariance matrix FITS file&quot; @@ -31,7 +31,7 @@ outcovmat, f, h, &quot;NONE&quot;,,, &quot;Output covariance matrix FITS file&quot;
31 # 31 #
32 # Maximisation parameters 32 # Maximisation parameters
33 #======================== 33 #========================
34 -stat, s, h, "POISSON",,, "Optimization statistics" 34 +statistic, s, h, "POISSON",,, "Optimization statistics"
35 refit, b, h, no,,, "Do refitting?" 35 refit, b, h, no,,, "Do refitting?"
36 fix_spat_for_ts, b, h, no,,, "Fix spatial parameters for TS computation?" 36 fix_spat_for_ts, b, h, no,,, "Fix spatial parameters for TS computation?"
37 37
test/data/workflow.xml
@@ -75,22 +75,22 @@ @@ -75,22 +75,22 @@
75 </actor> 75 </actor>
76 <actor name="ctlike" tool="ctlike"> 76 <actor name="ctlike" tool="ctlike">
77 <input> 77 <input>
78 - <parameter name="inobs" value="outobs" actor="ctselect" />  
79 - <parameter name="inmodel" value="inmodel" actor="input" />  
80 - <parameter name="expcube" value="NONE" />  
81 - <parameter name="psfcube" value="NONE" />  
82 - <parameter name="bkgcube" value="NONE" />  
83 - <parameter name="caldb" value="caldb" actor="input" />  
84 - <parameter name="irf" value="irf" actor="input" />  
85 - <parameter name="edisp" value="edisp" actor="input" />  
86 - <parameter name="stat" value="POISSON" />  
87 - <parameter name="edisp" value="no" />  
88 - <parameter name="refit" value="no" />  
89 - <parameter name="chatter" value="chatter" actor="input" />  
90 - <parameter name="clobber" value="clobber" actor="input" />  
91 - <parameter name="debug" value="debug" actor="input" />  
92 - <parameter name="mode" value="mode" actor="input" />  
93 - <parameter name="logfile" value="ctlike.log" /> 78 + <parameter name="inobs" value="outobs" actor="ctselect" />
  79 + <parameter name="inmodel" value="inmodel" actor="input" />
  80 + <parameter name="expcube" value="NONE" />
  81 + <parameter name="psfcube" value="NONE" />
  82 + <parameter name="bkgcube" value="NONE" />
  83 + <parameter name="caldb" value="caldb" actor="input" />
  84 + <parameter name="irf" value="irf" actor="input" />
  85 + <parameter name="edisp" value="edisp" actor="input" />
  86 + <parameter name="statistic" value="POISSON" />
  87 + <parameter name="edisp" value="no" />
  88 + <parameter name="refit" value="no" />
  89 + <parameter name="chatter" value="chatter" actor="input" />
  90 + <parameter name="clobber" value="clobber" actor="input" />
  91 + <parameter name="debug" value="debug" actor="input" />
  92 + <parameter name="mode" value="mode" actor="input" />
  93 + <parameter name="logfile" value="ctlike.log" />
94 </input> 94 </input>
95 <output> 95 <output>
96 <parameter name="outmodel" value="wf_crab_results.xml" /> 96 <parameter name="outmodel" value="wf_crab_results.xml" />