mirror of
https://github.com/aportelli/LatAnalyze.git
synced 2024-11-10 08:55:37 +00:00
Compare commits
2 Commits
b796bfbd68
...
fecc5690f3
Author | SHA1 | Date | |
---|---|---|---|
|
fecc5690f3 | ||
c73b609ac5 |
@ -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;
|
bool parsed, doLaplace, doPlot, doHeatmap, doCorr, fold, doScan, noGuess;
|
||||||
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,6 +59,8 @@ 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,
|
||||||
@ -87,6 +89,7 @@ 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"))
|
||||||
@ -167,13 +170,14 @@ int main(int argc, char *argv[])
|
|||||||
fitter.setThinning(thinning);
|
fitter.setThinning(thinning);
|
||||||
|
|
||||||
// set initial values ******************************************************
|
// set initial values ******************************************************
|
||||||
if (modelPar.type != CorrelatorType::undefined)
|
if ((modelPar.type != CorrelatorType::undefined) and !noGuess)
|
||||||
{
|
{
|
||||||
init = CorrelatorModels::parameterGuess(corr, modelPar);
|
init = CorrelatorModels::parameterGuess(corr, modelPar);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
init.fill(0.1);
|
init.fill(1.);
|
||||||
|
init(0) = 0.2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// set limits for minimisers ***********************************************
|
// set limits for minimisers ***********************************************
|
||||||
|
Loading…
Reference in New Issue
Block a user