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]¶
Transform cylindrical Galactocentric coordinates to XYZ coordinates (wrt Sun) for velocities
- Parameters:
vR (float or numpy.ndarray) – Galactocentric radial velocity.
vT (float or numpy.ndarray) – Galactocentric rotational velocity.
vZ (float or numpy.ndarray) – Galactocentric vertical velocity.
phi (float or numpy.ndarray) – Galactocentric azimuth.
vsun (float or numpy.ndarray, optional) – Velocity of the Sun in the GC frame (can also be array of same length as vR; shape [3,N]).
Xsun (float or numpy.ndarray, optional) – Cylindrical distance to the GC (can be array of same length as vR).
Zsun (float or numpy.ndarray, optional) – Sun’s height above the midplane (can be array of same length as vR).
_extra_rot (bool, optional) – If True, perform an extra tiny rotation to align the Galactocentric coordinate frame with astropy’s definition.
numpy.ndarray – Containing (vx,vy,vz)
Notes
2011-02-24 - Written - Bovy (NYU)
2017-10-24 - Allowed vsun/Xsun/Zsun to be arrays - Bovy (NYU)