galpy.util.coords.rect_to_cyl_vec

galpy.util.coords.rect_to_cyl_vec(vx, vy, vz, X, Y, Z, cyl=False)[source]

Transform vectors from rectangular to cylindrical coordinates vectors.

Parameters:
  • vx (float or numpy.ndarray) – Velocity in the x-direction.

  • vy (float or numpy.ndarray) – Velocity in the y-direction.

  • vz (float or numpy.ndarray) – Velocity in the z-direction.

  • X (float or numpy.ndarray) – X-coordinate.

  • Y (float or numpy.ndarray) – Y-coordinate.

  • Z (float or numpy.ndarray) – Z-coordinate.

  • cyl (bool, optional) – If True, X, Y, Z are already cylindrical (i.e., [X,Y,Z] == [R,phi,Z]), by default False.

Returns:

Tuple containing vR, vT, vz.

Return type:

tuple

Notes

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