Commit 6f76f0b77bf71b1180b6078aef8cf22bc97c8db4

Authored by Jürgen Knödlseder
1 parent 3a359953

Rename "refit" parameter to "fit" in ctbutterfly.

"fit" is more appropriate for the tool as the tool itself is not refitting (it's a "refit" of a ctlike result).
src/ctbutterfly/ctbutterfly.cpp
@@ -241,8 +241,8 @@ void ctbutterfly::run(void) @@ -241,8 +241,8 @@ void ctbutterfly::run(void)
241 log << m_obs << std::endl; 241 log << m_obs << std::endl;
242 } 242 }
243 243
244 - // If refit is selected then do maximum likelihood fit  
245 - if (m_refit) { 244 + // If fit is selected then do maximum likelihood fit
  245 + if (m_fit) {
246 246
247 // Write header 247 // Write header
248 if (logTerse()) { 248 if (logTerse()) {
@@ -267,14 +267,14 @@ void ctbutterfly::run(void) @@ -267,14 +267,14 @@ void ctbutterfly::run(void)
267 log << m_covariance << std::endl; 267 log << m_covariance << std::endl;
268 } 268 }
269 269
270 - } // endif: refit selected 270 + } // endif: fit selected
271 271
272 // Get model instance for further computations 272 // Get model instance for further computations
273 GModels models = m_obs.models(); 273 GModels models = m_obs.models();
274 274
275 - // If no refit is selected and no covariance matrix has been specified 275 + // If no fit is selected and no covariance matrix has been specified
276 // then compute now the covariance matrix 276 // then compute now the covariance matrix
277 - if (!m_refit && m_covariance.size() == 0) { 277 + if (!m_fit && m_covariance.size() == 0) {
278 278
279 // Write header 279 // Write header
280 if (logTerse()) { 280 if (logTerse()) {
@@ -542,7 +542,7 @@ void ctbutterfly::init_members(void) @@ -542,7 +542,7 @@ void ctbutterfly::init_members(void)
542 m_confidence = 0.68; 542 m_confidence = 0.68;
543 m_max_iter = 50; 543 m_max_iter = 50;
544 m_apply_edisp = false; 544 m_apply_edisp = false;
545 - m_refit = false; 545 + m_fit = false;
546 m_ebounds.clear(); 546 m_ebounds.clear();
547 m_outfile.clear(); 547 m_outfile.clear();
548 548
@@ -576,7 +576,7 @@ void ctbutterfly::copy_members(const ctbutterfly&amp; app) @@ -576,7 +576,7 @@ void ctbutterfly::copy_members(const ctbutterfly&amp; app)
576 m_confidence = app.m_confidence; 576 m_confidence = app.m_confidence;
577 m_max_iter = app.m_max_iter; 577 m_max_iter = app.m_max_iter;
578 m_apply_edisp = app.m_apply_edisp; 578 m_apply_edisp = app.m_apply_edisp;
579 - m_refit = app.m_refit; 579 + m_fit = app.m_fit;
580 m_ebounds = app.m_ebounds; 580 m_ebounds = app.m_ebounds;
581 m_outfile = app.m_outfile; 581 m_outfile = app.m_outfile;
582 582
@@ -668,7 +668,7 @@ void ctbutterfly::get_parameters(void) @@ -668,7 +668,7 @@ void ctbutterfly::get_parameters(void)
668 668
669 // Read other parameters 669 // Read other parameters
670 m_confidence = (*this)["confidence"].real(); 670 m_confidence = (*this)["confidence"].real();
671 - m_refit = (*this)["refit"].boolean(); 671 + m_fit = (*this)["fit"].boolean();
672 672
673 // Optionally read ahead parameters so that they get correctly 673 // Optionally read ahead parameters so that they get correctly
674 // dumped into the log file 674 // dumped into the log file
src/ctbutterfly/ctbutterfly.hpp
@@ -93,7 +93,7 @@ protected: @@ -93,7 +93,7 @@ protected:
93 double m_confidence; //!< Confidence level 93 double m_confidence; //!< Confidence level
94 int m_max_iter; //!< Maximum number of iterations 94 int m_max_iter; //!< Maximum number of iterations
95 bool m_apply_edisp; //!< Apply energy dispersion? 95 bool m_apply_edisp; //!< Apply energy dispersion?
96 - bool m_refit; //!< Do refit? 96 + bool m_fit; //!< Do fit?
97 GEbounds m_ebounds; //!< Energy binning definition 97 GEbounds m_ebounds; //!< Energy binning definition
98 std::string m_outfile; //!< Output ascii file 98 std::string m_outfile; //!< Output ascii file
99 99
src/ctbutterfly/ctbutterfly.par
@@ -27,7 +27,11 @@ caldb, s, a, &quot;prod2&quot;,,, &quot;Calibration database&quot; @@ -27,7 +27,11 @@ caldb, s, a, &quot;prod2&quot;,,, &quot;Calibration database&quot;
27 irf, s, a, "South_50h",,, "Instrument response function" 27 irf, s, a, "South_50h",,, "Instrument response function"
28 edisp, b, h, no,,, "Apply energy dispersion?" 28 edisp, b, h, no,,, "Apply energy dispersion?"
29 outfile, f, a, "butterfly.txt",,, "Output ASCII file" 29 outfile, f, a, "butterfly.txt",,, "Output ASCII file"
30 -refit, b, h, no,,, "Do refitting?" 30 +
  31 +#
  32 +# Butterfly parameters
  33 +#=====================
  34 +fit, b, h, no,,, "Perform maximum likelihood fitting?"
31 confidence, r, h, 0.68,0.0,1.0, "Confidence level" 35 confidence, r, h, 0.68,0.0,1.0, "Confidence level"
32 matrix, f, h, "NONE",,, "Input covariance Matrix FITS file" 36 matrix, f, h, "NONE",,, "Input covariance Matrix FITS file"
33 37