galpy.df.streamdf.find_closest_trackpoint

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

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

Parameters:
  • R (float) – Phase-space coordinates of the given point

  • vR (float) – Phase-space coordinates of the given point

  • vT (float) – Phase-space coordinates of the given point

  • z (float) – Phase-space coordinates of the given point

  • vz (float) – Phase-space coordinates of the given point

  • phi (float) – Phase-space coordinates of the given point

  • interp (bool, optional) – If True, return the index of the interpolated track

  • xy (bool, optional) – 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 (bool, optional) – If True, also use velocities to find the closest point

Returns:

Index into the track of the closest track point

Return type:

int

Notes

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