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:
orbit : Orbit
m0 : numeric (optional)

Initial mass guess.

b0 : numeric (optional)

Initial b guess.

minimize_kwargs : dict (optional)

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

Returns:
m : float

Best-fit scale mass for the Isochrone potential.

b : float

Best-fit core radius for the Isochrone potential.