galpy.util.coords.vxvyvz_to_galcenrect

galpy.util.coords.vxvyvz_to_galcenrect(vx, vy, vz, vsun=[0.0, 1.0, 0.0], Xsun=1.0, Zsun=0.0, _extra_rot=True)[source]

NAME:

vxvyvz_to_galcenrect

PURPOSE:

transform velocities in XYZ coordinates (wrt Sun) to rectangular Galactocentric coordinates for velocities

INPUT:

vx - U

vy - V

vz - W

vsun - velocity of the sun in the GC frame ndarray[3]

Xsun - cylindrical distance to the GC

Zsun - Sun’s height above the midplane

_extra_rot= (True) if True, perform an extra tiny rotation to align the Galactocentric coordinate frame with astropy’s definition

OUTPUT:

[:,3]= vXg, vYg, vZg

HISTORY:

2010-09-24 - Written - Bovy (NYU)

2016-05-12 - Edited to properly take into account the Sun’s vertical position; dropped Ysun keyword - Bovy (UofT)

2018-04-18 - Tweaked to be consistent with astropy’s Galactocentric frame - Bovy (UofT)