The attached patch adds the option covariancevariables to set fit. If enabled, this
leads to the generation of user-defined variables which contain the entries of the
covariance matrix. For a fit with the parameters "a" and "b" this leads to the
following four variables: "cov_a_a"="a_err"^2, "cov_a_b" = "cov_b_a", and
Furthermore this patch changes the calculation of the FIT_STDFIT variable in case
errorscaling is switched off and z-errors (sigma_i) are provided. In the help file this
variable is defined as "calculated standard deviation of the fit", but this
is only equal to sqrt(chisq/ndf), if the weights are one. Otherwise this is given
by sqrt(chisq/ndf*<sigma_i^2>), where <sigma_i^2> is the weighted average of the individual variances: <sigma_i^2> = 1/(\sum(1/sigma_i^2)/N). This formula is now implemented.
The chi-square and reduced chi-square values are now provided as user-defined variables
FIT_CHISQ and FIT_REDCHISQ.