galpy.util.coords.dl_to_rphi_2d

galpy.util.coords.dl_to_rphi_2d(d, l, degree=False, ro=1.0, phio=0.0)[source]

Convert Galactic longitude and distance to Galactocentric radius and azimuth

Parameters:
  • d (float or numpy.ndarray) – Distance.

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

  • degree (bool, optional) – If True, l is in degrees rather than rad, by default False.

  • ro (float, optional) – Galactocentric radius of the observer, by default 1.0.

  • phio (float, optional) – Galactocentric azimuth of the observer, by default 0.0.

Returns:

(R, phi); phi in degree if degree

Return type:

tuple

Notes

  • 2012-01-04 - Written - Bovy (IAS)