The initial parameters for fitting the effnVAC function were very far
off the optimal ones, which leads to test failures.
Fixes an index error in the printing of the data and the fitted function,
which is useful for debugging.
Fixes #1789.
Change-Id: I3d45a3352fac735bce750bb2d9205590065b9fc2
}
for (j = 0; (j < nfitpnts); j++)
{
- real ttt = x0 ? x0[i] : dt*j;
+ real ttt = x0 ? x0[j] : dt*j;
fprintf(fp, "%10.5e %10.5e %10.5e\n",
x[j], y[j], lmcurves[eFitFn](ttt, fitparms));
}
}
TEST_F (ExpfitTest, EffnVAC) {
- double param[] = {30, 0.0};
+ double param[] = {0.6, 0.1};
test(effnVAC, param, 0.05, 0);
}