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 3 * Version 1.5.0 released
4 4 ========================
5 5  
  6 + Rename ctlike "stat" parameter to "statistic" (#2237)
6 7 Enable handling of On/Off observations in csspec (#2231)
7 8 Add csphagen script (#2208)
8 9 Add RING background method to ctskymap (#2207)
... ...
1 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 6 Introduction
... ... @@ -43,7 +43,7 @@ None
43 43  
44 44 ctlike - Maximum likelihood fitting
45 45 -----------------------------------
46   -None
  46 +Rename "stats" parameter to "statistic" (#2238).
47 47  
48 48  
49 49 cttsmap - Generation of Test Statistic map
... ...
doc/source/admin/release_history/1.5.rst
... ... @@ -44,3 +44,9 @@ New features
44 44 Add :ref:`csmodelsois` script
45 45 * [`1864 <https://cta-redmine.irap.omp.eu/issues/1864>`_] -
46 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 94 ``(outcovmat = NONE) [string]``
95 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 100 ``(refit = no) [boolean]``
101 101 Perform refitting of solution after initial fit.
... ...
src/ctlike/ctlike.cpp
... ... @@ -379,15 +379,7 @@ void ctlike::save(void)
379 379 * @brief Get application parameters
380 380 *
381 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 384 * This method handles both loading of FITS files and of handling XML
393 385 * observation definition files.
... ... @@ -401,7 +393,7 @@ void ctlike::get_parameters(void)
401 393 if (!m_use_xml) {
402 394  
403 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 398 // Set statistic
407 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 31 #
32 32 # Maximisation parameters
33 33 #========================
34   -stat, s, h, "POISSON",,, "Optimization statistics"
  34 +statistic, s, h, "POISSON",,, "Optimization statistics"
35 35 refit, b, h, no,,, "Do refitting?"
36 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 75 </actor>
76 76 <actor name="ctlike" tool="ctlike">
77 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 94 </input>
95 95 <output>
96 96 <parameter name="outmodel" value="wf_crab_results.xml" />
... ...