Commit 2b45651f authored by Laurent Belcour's avatar Laurent Belcour

Correction on the Jacobian of the SG distribution. I need to incorporate

the normalization factor.
parent 45b89e1e
...@@ -200,7 +200,7 @@ vec spherical_gaussian_function::parametersJacobian(const vec& x) const ...@@ -200,7 +200,7 @@ vec spherical_gaussian_function::parametersJacobian(const vec& x) const
double cart[6]; double cart[6];
params::convert(&spherical[0], params::SPHERICAL_TL_PL_TV_PV, params::CARTESIAN, &cart[0]); params::convert(&spherical[0], params::SPHERICAL_TL_PL_TV_PV, params::CARTESIAN, &cart[0]);
double dot2 = cart[0]*cart[3] + cart[1]*cart[4] + cart[2]*cart[5]; double dot2 = cart[0]*cart[3] + cart[1]*cart[4] + cart[2]*cart[5];
jac[i*nbParameters()] = _ks[i] * _n[i] * exp(_n[i] * (dot - 1)) * _a * dot2; jac[i*nbParameters() + nbParameters()-1] = _ks[i] * _n[i] * exp(_n[i] * (dot - 1)) * _a * dot2;
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment