galpy.df.streamdf.find_closest_trackpoint

streamdf.find_closest_trackpoint(R, vR, vT, z, vz, phi, interp=True, xy=False, usev=False)

NAME:

find_closest_trackpoint

PURPOSE:

find the closest point on the stream track to a given point

INPUT:

R,vR,vT,z,vz,phi - phase-space coordinates of the given point

interp= (True), if True, return the index of the interpolated track

xy= (False) if True, input is X,Y,Z,vX,vY,vZ in Galactocentric rectangular coordinates; if xy, some coordinates may be missing (given as None) and they will not be used

usev= (False) if True, also use velocities to find the closest point

OUTPUT:

index into the track of the closest track point

HISTORY:

2013-12-04 - Written - Bovy (IAS)