# fit_isochrone¶

gala.dynamics.fit_isochrone(orbit, m0=200000000000.0, b0=1.0, minimize_kwargs=None)[source]

Fit the toy Isochrone potential to the sum of the energy residuals relative to the mean energy by minimizing the function

$f(m,b) = \sum_i (\frac{1}{2}v_i^2 + \Phi_{\rm iso}(x_i\,|\,m,b) - <E>)^2$
TODO: This should fail if the Hamiltonian associated with the orbit has

a frame other than StaticFrame

Parameters
orbitOrbit
m0numeric (optional)

Initial mass guess.

b0numeric (optional)

Initial b guess.

minimize_kwargsdict (optional)

Keyword arguments to pass through to scipy.optimize.minimize.

Returns
mfloat

Best-fit scale mass for the Isochrone potential.

bfloat

Best-fit core radius for the Isochrone potential.