Commit 6f76f0b77bf71b1180b6078aef8cf22bc97c8db4
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).
Showing
3 changed files
with
14 additions
and
10 deletions
src/ctbutterfly/ctbutterfly.cpp
| ... | ... | @@ -241,8 +241,8 @@ void ctbutterfly::run(void) |
| 241 | 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 | 247 | // Write header |
| 248 | 248 | if (logTerse()) { |
| ... | ... | @@ -267,14 +267,14 @@ void ctbutterfly::run(void) |
| 267 | 267 | log << m_covariance << std::endl; |
| 268 | 268 | } |
| 269 | 269 | |
| 270 | - } // endif: refit selected | |
| 270 | + } // endif: fit selected | |
| 271 | 271 | |
| 272 | 272 | // Get model instance for further computations |
| 273 | 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 | 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 | 279 | // Write header |
| 280 | 280 | if (logTerse()) { |
| ... | ... | @@ -542,7 +542,7 @@ void ctbutterfly::init_members(void) |
| 542 | 542 | m_confidence = 0.68; |
| 543 | 543 | m_max_iter = 50; |
| 544 | 544 | m_apply_edisp = false; |
| 545 | - m_refit = false; | |
| 545 | + m_fit = false; | |
| 546 | 546 | m_ebounds.clear(); |
| 547 | 547 | m_outfile.clear(); |
| 548 | 548 | |
| ... | ... | @@ -576,7 +576,7 @@ void ctbutterfly::copy_members(const ctbutterfly& app) |
| 576 | 576 | m_confidence = app.m_confidence; |
| 577 | 577 | m_max_iter = app.m_max_iter; |
| 578 | 578 | m_apply_edisp = app.m_apply_edisp; |
| 579 | - m_refit = app.m_refit; | |
| 579 | + m_fit = app.m_fit; | |
| 580 | 580 | m_ebounds = app.m_ebounds; |
| 581 | 581 | m_outfile = app.m_outfile; |
| 582 | 582 | |
| ... | ... | @@ -668,7 +668,7 @@ void ctbutterfly::get_parameters(void) |
| 668 | 668 | |
| 669 | 669 | // Read other parameters |
| 670 | 670 | m_confidence = (*this)["confidence"].real(); |
| 671 | - m_refit = (*this)["refit"].boolean(); | |
| 671 | + m_fit = (*this)["fit"].boolean(); | |
| 672 | 672 | |
| 673 | 673 | // Optionally read ahead parameters so that they get correctly |
| 674 | 674 | // dumped into the log file | ... | ... |
src/ctbutterfly/ctbutterfly.hpp
| ... | ... | @@ -93,7 +93,7 @@ protected: |
| 93 | 93 | double m_confidence; //!< Confidence level |
| 94 | 94 | int m_max_iter; //!< Maximum number of iterations |
| 95 | 95 | bool m_apply_edisp; //!< Apply energy dispersion? |
| 96 | - bool m_refit; //!< Do refit? | |
| 96 | + bool m_fit; //!< Do fit? | |
| 97 | 97 | GEbounds m_ebounds; //!< Energy binning definition |
| 98 | 98 | std::string m_outfile; //!< Output ascii file |
| 99 | 99 | ... | ... |
src/ctbutterfly/ctbutterfly.par
| ... | ... | @@ -27,7 +27,11 @@ caldb, s, a, "prod2",,, "Calibration database" |
| 27 | 27 | irf, s, a, "South_50h",,, "Instrument response function" |
| 28 | 28 | edisp, b, h, no,,, "Apply energy dispersion?" |
| 29 | 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 | 35 | confidence, r, h, 0.68,0.0,1.0, "Confidence level" |
| 32 | 36 | matrix, f, h, "NONE",,, "Input covariance Matrix FITS file" |
| 33 | 37 | ... | ... |