1
0
mirror of https://github.com/aportelli/LatAnalyze.git synced 2024-11-14 09:45:36 +00:00

2pt-fit.cpp now has correct number of arguments for fold function if --fold is called.

This commit is contained in:
Andrew Zhen Ning Yong 2020-07-07 10:07:48 +01:00
parent b6c2efa666
commit 3e3cdf2d69

View File

@ -110,10 +110,6 @@ int main(int argc, char *argv[])
nt = corr[central].rows();
corr = corr.block(0, 0, nt, 1);
corr = CorrelatorUtils::shift(corr, shift);
if (fold)
{
corr = CorrelatorUtils::fold(corr);
}
// make model //////////////////////////////////////////////////////////////
CorrelatorFitter fitter(corr);
@ -140,6 +136,11 @@ int main(int argc, char *argv[])
}
}
if (fold)
{
corr = CorrelatorUtils::fold(corr,modelPar);
}
// fit /////////////////////////////////////////////////////////////////////
DVec init(nPar);
NloptMinimizer globMin(NloptMinimizer::Algorithm::GN_CRS2_LM);