galpy.util.coords.galcencyl_to_vxvyvz¶
- galpy.util.coords.galcencyl_to_vxvyvz(vR, vT, vZ, phi, vsun=[0.0, 1.0, 0.0], Xsun=1.0, Zsun=0.0, _extra_rot=True)[source]¶
NAME:
galcencyl_to_vxvyvz
PURPOSE:
transform cylindrical Galactocentric coordinates to XYZ (wrt Sun) coordinates for velocities
INPUT:
vR - Galactocentric radial velocity
vT - Galactocentric rotational velocity
vZ - Galactocentric vertical velocity
phi - Galactocentric azimuth
vsun - velocity of the sun in the GC frame ndarray[3] (can be array of same length as vRg; shape [3,N])
Xsun - cylindrical distance to the GC (can be array of same length as vRg)
Zsun - Sun’s height above the midplane (can be array of same length as vRg)
_extra_rot= (True) if True, perform an extra tiny rotation to align the Galactocentric coordinate frame with astropy’s definition
OUTPUT:
vx,vy,vz
HISTORY:
2011-02-24 - Written - Bovy (NYU)
2017-10-24 - Allowed vsun/Xsun/Zsun to be arrays - Bovy (NYU)