galpy.util.coords.vxvyvz_to_galcencyl(vx, vy, vz, X, Y, Z, vsun=[0.0, 1.0, 0.0], Xsun=1.0, Zsun=0.0, galcen=False, _extra_rot=True)[source]

Transform velocities in XYZ coordinates (wrt Sun) to cylindrical Galactocentric coordinates for velocities

  • vx (float or numpy.ndarray) – U velocity.

  • vy (float or numpy.ndarray) – V velocity.

  • vz (float or numpy.ndarray) – W velocity.

  • X (float or numpy.ndarray) – X in Galactocentric rectangular coordinates.

  • Y (float or numpy.ndarray) – Y in Galactocentric rectangular coordinates.

  • Z (float or numpy.ndarray) – Z in Galactocentric rectangular coordinates.

  • vsun (float or numpy.ndarray, optional) – Velocity of the Sun in the GC frame (can also be array of same length as vx; shape [3,N]).

  • Xsun (float or numpy.ndarray, optional) – Cylindrical distance to the GC (can be array of same length as vXg).

  • Zsun (float or numpy.ndarray, optional) – Sun’s height above the midplane (can be array of same length as vXg).

  • galcen (bool, optional) – If True, then X,Y,Z are in cylindrical Galactocentric coordinates rather than rectangular coordinates.

  • _extra_rot (bool, optional) – If True, perform an extra tiny rotation to align the Galactocentric coordinate frame with astropy’s definition.


Containing (vR,vT,vz)

Return type:



  • 2010-09-24 - Written - Bovy (NYU)

  • 2023-07-19 - Allowed Xsun/Zsun/vsun to be arrays- Bovy (UofT)