galpy.util.coords.sphergal_to_rectgal

galpy.util.coords.sphergal_to_rectgal(l, b, d, vr, pmll, pmbb, degree=False)[source]

Transform phase-space coordinates in spherical Galactic coordinates to rectangular Galactic coordinates (can take vector inputs)

Parameters:
  • l (float or numpy.ndarray) – Galactic longitude

  • b (float or numpy.ndarray) – Galactic latitude

  • d (float or numpy.ndarray) – Distance (kpc)

  • 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)

  • degree (bool, optional) – If True, l and b are in degrees. Default is False.

Returns:

[X,Y,Z,vx,vy,vz] in (kpc,kpc,kpc,km/s,km/s,km/s). For vector inputs [:,6]

Return type:

tuple or numpy.ndarray

Notes

  • 2009-10-25 - Written - Bovy (NYU)