galpy.util.coords.rphi_to_dl_2d

galpy.util.coords.rphi_to_dl_2d(R, phi, degree=False, ro=1.0, phio=0.0)[source]

Convert Galactocentric radius and azimuth to distance and Galactic longitude

Parameters:
  • R (float or numpy.ndarray) – Galactocentric radius.

  • phi (float or numpy.ndarray) – Galactocentric azimuth.

  • degree (bool, optional) – If True, phi 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:

(d, l); phi in degree if degree

Return type:

tuple

Notes

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