1
0
mirror of https://github.com/aportelli/LatAnalyze.git synced 2025-06-22 08:52:01 +01:00

1 Commits

Author SHA1 Message Date
b796bfbd68 Merge 269d0c338e into 05138baa08 2023-06-20 15:48:04 +01:00

View File

@ -24,7 +24,7 @@ int main(int argc, char *argv[])
{ {
// parse arguments ///////////////////////////////////////////////////////// // parse arguments /////////////////////////////////////////////////////////
OptParser opt; OptParser opt;
bool parsed, doLaplace, doPlot, doHeatmap, doCorr, fold, doScan, noGuess; bool parsed, doLaplace, doPlot, doHeatmap, doCorr, fold, doScan;
string corrFileName, model, outFileName, outFmt, savePlot; string corrFileName, model, outFileName, outFmt, savePlot;
Index ti, tf, shift, nPar, thinning; Index ti, tf, shift, nPar, thinning;
double svdTol; double svdTol;
@ -59,8 +59,6 @@ int main(int argc, char *argv[])
"show the fit plot"); "show the fit plot");
opt.addOption("h", "heatmap" , OptParser::OptType::trigger, true, opt.addOption("h", "heatmap" , OptParser::OptType::trigger, true,
"show the fit correlation heatmap"); "show the fit correlation heatmap");
opt.addOption("", "no-guess" , OptParser::OptType::trigger, true,
"do not try to guess fit parameters");
opt.addOption("", "save-plot", OptParser::OptType::value, true, opt.addOption("", "save-plot", OptParser::OptType::value, true,
"saves the source and .pdf", ""); "saves the source and .pdf", "");
opt.addOption("", "scan", OptParser::OptType::trigger, true, opt.addOption("", "scan", OptParser::OptType::trigger, true,
@ -89,7 +87,6 @@ int main(int argc, char *argv[])
fold = opt.gotOption("fold"); fold = opt.gotOption("fold");
doPlot = opt.gotOption("p"); doPlot = opt.gotOption("p");
doHeatmap = opt.gotOption("h"); doHeatmap = opt.gotOption("h");
noGuess = opt.gotOption("no-guess");
savePlot = opt.optionValue("save-plot"); savePlot = opt.optionValue("save-plot");
doScan = opt.gotOption("scan"); doScan = opt.gotOption("scan");
switch (opt.optionValue<unsigned int>("v")) switch (opt.optionValue<unsigned int>("v"))
@ -170,14 +167,13 @@ int main(int argc, char *argv[])
fitter.setThinning(thinning); fitter.setThinning(thinning);
// set initial values ****************************************************** // set initial values ******************************************************
if ((modelPar.type != CorrelatorType::undefined) and !noGuess) if (modelPar.type != CorrelatorType::undefined)
{ {
init = CorrelatorModels::parameterGuess(corr, modelPar); init = CorrelatorModels::parameterGuess(corr, modelPar);
} }
else else
{ {
init.fill(1.); init.fill(0.1);
init(0) = 0.2;
} }
// set limits for minimisers *********************************************** // set limits for minimisers ***********************************************