added the option to write the content of the MINUIT2.OUTPUT ascii file as yaml. This extends the previous commit from Ryan M.L. McFadden.

This commit is contained in:
2024-06-18 11:16:15 +02:00
parent 05c8625dc1
commit a6a3d26cd2
25 changed files with 251 additions and 122 deletions

View File

@@ -128,6 +128,7 @@ void musrfit_syntax()
std::cout << std::endl << " (ii) if present under $HOME/.musrfit/";
std::cout << std::endl << " (iii) if present under $MUSRFITPATH/";
std::cout << std::endl << " (iv) if present under $ROOTSYS/";
std::cout << std::endl << " -y, --yaml: write fit results (MINUIT2.OUTPUT) into a yaml-file. Output <msr-file>.yaml";
std::cout << std::endl << " --dump <type> is writing a data file with the fit data and the theory";
std::cout << std::endl << " <type> can be 'ascii', 'root'";
std::cout << std::endl << " --timeout <timeout_tag>: overwrites to predefined timeout of " << timeout << " (sec).";
@@ -447,6 +448,7 @@ int main(int argc, char *argv[])
int status;
bool keep_mn2_output = false;
bool chisq_only = false;
bool yaml_out = false;
bool title_from_data_file = false;
bool timeout_enabled = true;
bool reset_startup_file = false;
@@ -533,6 +535,8 @@ int main(int argc, char *argv[])
startup_options.estimateN0 = true;
} else if (!strcmp(argv[i], "-p") || !strcmp(argv[i], "--per-run-block-chisq")) {
startup_options.writeExpectedChisq = true;
} else if (!strcmp(argv[i], "-y") || !strcmp(argv[i], "--yaml")) {
yaml_out = true;
} else if (!strcmp(argv[i], "-n") || !strcmp(argv[i], "--no-of-cores-avail")) {
#ifdef HAVE_GOMP
std::cout << std::endl;
@@ -725,7 +729,7 @@ int main(int argc, char *argv[])
// do fitting
std::unique_ptr<PFitter> fitter;
if (success) {
fitter = std::make_unique<PFitter>(msrHandler.get(), runListCollection.get(), chisq_only);
fitter = std::make_unique<PFitter>(msrHandler.get(), runListCollection.get(), chisq_only, yaml_out);
if (fitter->IsValid()) {
fitter->DoFit();
if (!fitter->IsScanOnly())