galpy.orbit.Orbit.fit

Orbit.fit(vxvv, vxvv_err=None, pot=None, radec=False, lb=False, customsky=False, lb_to_customsky=None, pmllpmbb_to_customsky=None, tintJ=10, ntintJ=1000, integrate_method='dopr54_c', **kwargs)

NAME:

fit

PURPOSE:

fit an Orbit to data using the current orbit as the initial condition

INPUT:

vxvv - [:,6] array of positions and velocities along the orbit (if not lb=True or radec=True, these need to be in natural units [/ro,/vo], cannot be Quantities)

vxvv_err= [:,6] array of errors on positions and velocities along the orbit (if None, these are set to 0.01) (if not lb=True or radec=True, these need to be in natural units [/ro,/vo], cannot be Quantities)

pot= Potential to fit the orbit in

Keywords related to the input data:

radec= if True, input vxvv and vxvv are [ra,dec,d,mu_ra, mu_dec,vlos] in [deg,deg,kpc,mas/yr,mas/yr,km/s] (all J2000.0; mu_ra = mu_ra * cos dec); the attributes of the current Orbit are used to convert between these coordinates and Galactocentric coordinates

lb= if True, input vxvv and vxvv are [long,lat,d,mu_ll, mu_bb,vlos] in [deg,deg,kpc,mas/yr,mas/yr,km/s] (mu_ll = mu_ll * cos lat); the attributes of the current Orbit are used to convert between these coordinates and Galactocentric coordinates

customsky= if True, input vxvv and vxvv_err are [custom long,custom lat,d,mu_customll, mu_custombb,vlos] in [deg,deg,kpc,mas/yr,mas/yr,km/s] (mu_ll = mu_ll * cos lat) where custom longitude and custom latitude are a custom set of sky coordinates (e.g., ecliptic) and the proper motions are also expressed in these coordinats; you need to provide the functions lb_to_customsky and pmllpmbb_to_customsky to convert to the custom sky coordinates (these should have the same inputs and outputs as lb_to_radec and pmllpmbb_to_pmrapmdec); the attributes of the current Orbit are used to convert between these coordinates and Galactocentric coordinates

obs=[X,Y,Z,vx,vy,vz] - (optional) position and velocity of observer
(in kpc and km/s; entries can be Quantity) (default=Object-wide default) Cannot be an Orbit instance with the orbit of the reference point, as w/ the ra etc. functions Y is ignored and always assumed to be zero

ro= distance in kpc corresponding to R=1. (default: taken from object; can be Quantity)

vo= velocity in km/s corresponding to v=1. (default: taken from object; can be Quantity)

lb_to_customsky= function that converts l,b,degree=False to the custom sky coordinates (like lb_to_radec); needs to be given when customsky=True

pmllpmbb_to_customsky= function that converts pmll,pmbb,l,b,degree=False to proper motions in the custom sky coordinates (like pmllpmbb_to_pmrapmdec); needs to be given when customsky=True

Keywords related to the orbit integrations:

tintJ= (default: 10) time to integrate orbits for fitting the orbit (can be Quantity)

ntintJ= (default: 1000) number of time-integration points

integrate_method= (default: ‘dopr54_c’) integration method to use

disp= (False) display the optimizer’s convergence message

OUTPUT:

max of log likelihood

HISTORY:

2014-06-17 - Written - Bovy (IAS)