write the fit results to an easy-to-read/parse yaml file
This patch adds routines for writing a comprehensive set of fit results (i.e., parameter values, parabolic errors, asymmetric errors, covariances, correlation coefficients, etc.) for an individual `.msr` file to an easy-to-read/parse `.yaml` file. The main motivation for the code addition is to provide users with easy access to the fit's covariance matrix without the need for "extra" manual effort (e.g., parsing the contents of `MINUIT2.OUTPUT` or `MINUIT2.root`). The other fit quantities are also included for completeness. Reading/accessing the output is trivial using, for example, the PyYAML Python library (https://github.com/yaml/pyyaml): ```python import yaml with open("2125_tf_histo.yaml", "r") as fh: results = yaml.load(fh, Loader=yaml.SafeLoader) cov = results["covariance"]["Field_1"]["Sigma_1"] ``` Note: the naming conventions chosen for the blocks in the `.yaml` output closely follow those used by the iminuit Python library (https://github.com/scikit-hep/iminuit).
Loading
Please register or sign in to comment