galpy.util.coords.rectgal_to_sphergal¶
- galpy.util.coords.rectgal_to_sphergal(X, Y, Z, vx, vy, vz, degree=False)[source]¶
Transform phase-space coordinates in rectangular Galactic coordinates to spherical Galactic coordinates (can take vector inputs)
- Parameters:
X (float or numpy.ndarray) – Component towards the Galactic Center (kpc)
Y (float or numpy.ndarray) – Component in the direction of Galactic rotation (kpc)
Z (float or numpy.ndarray) – Component towards the North Galactic Pole (kpc)
vx (float or numpy.ndarray) – Velocity towards the Galactic Center (km/s)
vy (float or numpy.ndarray) – Velocity in the direction of Galactic rotation (km/s)
vz (float or numpy.ndarray) – Velocity towards the North Galactic Pole (km/s)
degree (bool, optional) – If True, return l and b in degrees. Default is False.
- Returns:
[l,b,d,vr,pmll x cos(b),pmbb] in (rad,rad,kpc,km/s,mas/yr,mas/yr). For vector inputs [:,6]
- Return type:
tuple or numpy.ndarray
Notes
2009-10-25 - Written - Bovy (NYU)