galpy.util.coords.vrpmllpmbb_to_vxvyvz¶
- galpy.util.coords.vrpmllpmbb_to_vxvyvz(vr, pmll, pmbb, l, b, d, XYZ=False, degree=False)[source]¶
Transform velocities in the spherical Galactic coordinate frame to the rectangular Galactic coordinate frame (can take vector inputs)
- Parameters:
vr (float or numpy.ndarray) – Line-of-sight velocity (km/s)
pmll (float or numpy.ndarray) – Proper motion in the Galactic longitude direction (mu_l * cos(b)) (mas/yr)
pmbb (float or numpy.ndarray) – Proper motion in the Galactic latitude (mas/yr)
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.
- Returns:
[vx,vy,vz] in (km/s,km/s,km/s). For vector inputs [:,3]
- Return type:
tuple or numpy.ndarray
Notes
2009-10-24 - Written - Bovy (NYU)
2014-06-14 - Re-written w/ numpy functions for speed and w/ decorators for beauty - Bovy (IAS)