galpy.util.coords.vxvyvz_to_vrpmllpmbb(vx, vy, vz, l, b, d, XYZ=False, degree=False)[source]

Transform velocities in the rectangular Galactic coordinate frame to the spherical Galactic coordinate frame (can take vector inputs)

  • vx (float or numpy.ndarray) – Velocity towards the Galactic Center (km/s)

  • vy (float or numpy.ndarray) – Velocity in the direction of Galactic rotation (km/s)

  • vz (float or numpy.ndarray) – Velocity towards the North Galactic Pole (km/s)

  • l (float or numpy.ndarray) – Galactic longitude

  • b (float or numpy.ndarray) – Galactic latitude

  • d (float or numpy.ndarray) – Distance (kpc)

  • XYZ (bool, optional) – If True, then l,b,d is actually X,Y,Z (rectangular Galactic coordinates). Default is False.

  • degree (bool, optional) – If True, l and b are in degrees. Default is False.


[vr,pmll x cos(b),pmbb] in (km/s,mas/yr,mas/yr). For vector inputs [:,3]

Return type:

tuple or numpy.ndarray


  • 2009-10-24 - Written - Bovy (NYU)

  • 2014-06-14 - Re-written w/ numpy functions for speed and w/ decorators for beauty - Bovy (IAS)