From da257d9979f701ea7c64c80473b69a7575d903c7 Mon Sep 17 00:00:00 2001 From: Alexander Ziegler Date: Tue, 11 Oct 2016 11:00:01 +0200 Subject: [PATCH] Add new covmat feature to ctlike docu (+ a few tab corrections) --- doc/source/users/reference_manual/ctlike.rst | 17 ++++++++++++----- src/ctlike/ctlike.cpp | 11 +++++------ 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/doc/source/users/reference_manual/ctlike.rst b/doc/source/users/reference_manual/ctlike.rst index 70dfc1f..657b561 100644 --- a/doc/source/users/reference_manual/ctlike.rst +++ b/doc/source/users/reference_manual/ctlike.rst @@ -48,9 +48,13 @@ the spatial model parameters can be kept fixed during that computation ctlike generates an output model XML file that contains the values of the best fitting model parameters. For all free parameters, an ``error`` attribute is added that provides the statistical uncertainty in the parameter estimate. -If computation of the Test Statistics has been requested for a model component, -a ``ts`` attribute providing the Test Statistics value is added. The output -model can be used as an input model for other ctools. +In addition, the entire output of the covariance matrix to a separate FITS file +can be queried (parameter ``covmat``). The parameter order given in the file +corresponds to the arrangement of the covariance matrix entries. If computation +of the Test Statistics has been requested for a model component, a ``ts`` +attribute providing the Test Statistics value is added. The output model can be +used as an input model for other ctools. + General parameters @@ -92,9 +96,12 @@ General parameters ``(fix_spat_for_ts = no) [boolean]`` Fix spatial parameters for TS computation. - - +``(covmat = NONE) [string]`` + Output FITS file to store covariance matrix. + + + Standard parameters ------------------- diff --git a/src/ctlike/ctlike.cpp b/src/ctlike/ctlike.cpp index 06e2cec..7014d1e 100644 --- a/src/ctlike/ctlike.cpp +++ b/src/ctlike/ctlike.cpp @@ -228,20 +228,19 @@ void ctlike::run(void) // Optimize model parameters using LM optimizer optimize_lm(); - // Save covarianve matrix if valid filename is passed + // Save covariance matrix if valid filename is passed if (is_valid_filename(m_covmat)) { - // Write header - log_header1(TERSE, "Saving covariance matrix"); + // Write header + log_header1(TERSE, "Saving covariance matrix"); - // Log filename - log_value(NORMAL, "Covariance matrix file", m_covmat.url()); + // Log filename + log_value(NORMAL, "Covariance matrix file", m_covmat.url()); // Save covarianve matrix m_obs.save_covmat(m_covmat); } - // Store Npred double npred = m_obs.npred(); -- libgit2 0.21.4