A.2. Positions in the Milky Way¶
To describe the dynamics of the Milky Way, we require various coordinate frames. The basic coordinate frame that astronomical measurements are reported in is the equatorial system, which is a spherical coordinate system centered on the Earth with a longitudinal angle called right ascension (RA) and a latitudinal angle called declination (Dec). The radial direction is the distance from Earth, but note that for the purpose of Galactic astronomy the difference between distances measured from the Sun and the Earth is negligible.
A more convenient coordinate system for studying the Milky Way is that of Galactic coordinates. This is simply a rotation of the equatorial system, such that the resulting system is aligned with the Milky Way. Specifically, Galactic coordinates are still centered on the Earth and the radial direction remains distance. The latitudinal angle (\(b\)) is such that an angle of zero is the (approximate position of the) Galactic mid-plane as seen
from Earth and the longitudinal angle (\(l\)) is such that an angle of zero at latitude zero points towards the (approximate position of the) Galactic center. Note that we do not follow the convention for spherical coordinates agreed to above here, because \(b=0\) at the mid-plane rather than the pole (welcome to astronomy!). We won’t go into detail of how to transform from equatorial coordinates to Galactic coordinates; take a look at the Appendix of Bovy 2011 (available online
at https://github.com/jobovy/stellarkinematics/blob/main/stellarkinematics.pdf), for a detailed discussion of the definition of the equatorial and Galactic coordinate systems and how to transform coordinates between them. In practice, if you are given coordinates in the equatorial coordinate system, you can transform them to Galactic coordinates using the astropy
Python package.
For example, to transform (RA,Dec) = \((120^\circ,30^\circ)\) to Galactic coordinates \((l,b)\), we setup a SkyCoord
object for the given (RA,Dec) and ask for this position in Galactic coordinates (the SkyCoord
class does the transformation internally):
[6]:
import astropy.units as u
import astropy.coordinates as apycoords
ra= 120.*u.deg
dec= 30.*u.deg
c= apycoords.SkyCoord(ra=ra,dec=dec,frame='icrs')
print(c.galactic)
<SkyCoord (Galactic): (l, b) in deg
(191.27460843, 27.07427141)>
There have been various definitions of equatorial coordinates over the last few decades, but unless you are told otherwise, coordinates that you are handed are probably in the ICRS
frame. RA and Dec can be specified in a large variety of ways (no, not just in degrees as would be handy, but in things like “hours, minutes, seconds” and such); astropy
can deal with most of these.
SkyCoord
also works for array, so this works for example:
[7]:
ra= 120.*u.deg*numpy.ones(3)
dec= 30.*u.deg*numpy.ones(3)
c= apycoords.SkyCoord(ra=ra,dec=dec,frame='icrs')
print(c.galactic)
<SkyCoord (Galactic): (l, b) in deg
[(191.27460843, 27.07427141), (191.27460843, 27.07427141),
(191.27460843, 27.07427141)]>
The Cartesian frame associated with Galactic coordinates has coordinates \((X,Y,Z)\) and velocities traditionally given as \((U,V,W)\). The coordinates are simply computed as \begin{align} X & = D\,\cos l\,\cos b\,;\quad Y = D\,\sin l\,\cos b\,;\quad Z = D\,\sin b\,, \end{align} where \(D\) is the distance. Because \(l = 0\) corresponds to the Galactic center, \(X\) is positive going towards the Galactic center and negative going away from it. Confusingly, \((X,Y,Z)\) is a left-handed coordinate system; \(Y\) is positive in the direction of Galactic rotation (which is perpendicular to the Sun–Galactic center line). \(Z\) is positive towards the North Galactic Pole (NGP) of the spherical Galactic coordinate system. We discuss velocities further below.
astropy
can also compute these Cartesian coordinates. To do this, you also need to specify the distance in the SkyCoord
instantiation and then ask for the output in Cartesian Galactic coordinates:
[8]:
ra= 120.*u.deg
dec= 30.*u.deg
distance= 1.2*u.kpc
c= apycoords.SkyCoord(ra=ra,dec=dec,distance=distance,frame='icrs')
print("(X,Y,Z) in (kpc,kpc,kpc)")
print("\t",c.galactic.cartesian)
(X,Y,Z) in (kpc,kpc,kpc)
(-1.04788016, -0.20890423, 0.54617413) kpc
Galactic coordinates are useful only when we study the structure (in position, velocity, or chemistry) of the solar neighborhood. When we investigate the Milky Way on a global scale, we use Galactocentric coordinates that have the Galactic center as their zero point. Specifically, we will define Galactocentric coordinates as the left-handed coordinate system that has the Galactic center at its center, with \(x\) increasing in the disk mid-plane towards the location of the Sun, \(y\) increasing in the disk mid-plane perpendicular to \(x\) in the direction of Galactic rotation at the Sun’s position, and \(z\) increasing towards the direction of the North Galactic Pole. To convert from Galactic coordinates to these Galactocentric coordinates, we need to know the Sun’s position with respect to the Galactic center and with respect to the Galactic mid-plane. Neither of these quantities are perfectly known at the present time and they are uncertain enough (especially the distance to the center) that the uncertainty affects our interpretation of Galactic dynamics. The Sun is located about \(z_\odot = 20.8\pm0.3\,\mathrm{pc}\) above the Galactic mid-plane (Bennett & Bovy 2019) and about \(R_0 = 8.25\) kpc from the Galactic center (GRAVITY Collaboration et al. 2021; Leung et al. 2023). Note that because the Sun is not located in the Galactic mid-plane, the \(b=0\) plane does not exactly line up with the Galactic mid-plane and a slight rotation (through an angle that is approximate equal to \(z_\odot/R_0\)) is necessary to go between the two coordinate systems.
Again, we can use astropy
’s coordinate-transformation utilities to convert positions to the Galactocentric coordinate frame. One subtlety is that astropy
uses a right-handed coordinate system instead of the left-handed one, where the Sun is located at negative \(x\) and \(x\) increases away from the Sun. This means that the \(x\) coordinate is flipped with respect to the left-handed frame. For the default \((R_0,z_\odot)\) in astropy
, we can then transform to the right-handed Galactocentric frame as (using the same example as we have been using throughout this section):
[9]:
ra= 120.*u.deg
dec= 30.*u.deg
distance= 1.2*u.kpc
c= apycoords.SkyCoord(ra=ra,dec=dec,distance=distance,frame='icrs')
gc = c.transform_to(apycoords.Galactocentric)
print("(x,y,z) in (kpc,kpc,kpc) in right-handed frame")
print("\t",gc.cartesian)
(x,y,z) in (kpc,kpc,kpc) in right-handed frame
(-9.16845235, -0.20890406, 0.5696541) kpc
and the position in the left-handed Galactocentric frame is the same, except that the sign of \(x\) is flipped (and is therefore \(x=9.34605497\) kpc in this example. To get the cylindrical Galactocentric coordinates, we set the representation_type
to be cylindrical:
[10]:
ra= 120.*u.deg
dec= 30.*u.deg
distance= 1.2*u.kpc
c= apycoords.SkyCoord(ra=ra,dec=dec,distance=distance,frame='icrs')
gc_frame= apycoords.Galactocentric(galcen_distance=8.25*u.kpc,
z_sun=20.8*u.pc)
gc = c.transform_to(gc_frame)
gc.representation_type = 'cylindrical'
print("(R,phi,z) in (kpc,deg,kpc)")
print("\t",gc.rho.to(u.kpc).value,gc.phi.degree,gc.z.to(u.kpc).value)
(R,phi,z) in (kpc,deg,kpc)
9.298821450287868 -178.7127048144322 0.5696125229885372
Here the angle is again in the right-handed coordinate system. \(180^\circ-\) this angle gives the angle in the left-handed coordinate system.
Of course, we could also start from Galactic coordinates (starting from Galactic coordinates approximately equal to those above):
[11]:
glon= 191.*u.deg
glat= 27.*u.deg
distance= 1.2*u.kpc
c= apycoords.SkyCoord(glon,glat,distance=distance,frame='galactic')
gc_frame= apycoords.Galactocentric(galcen_distance=8.1*u.kpc,
z_sun=25.*u.pc)
gc = c.transform_to(gc_frame)
gc.representation_type = 'cylindrical'
print("(R,phi,z) in (kpc,deg,kpc)")
print("\t",gc.rho.to(u.kpc).value,gc.phi.degree,gc.z.to(u.kpc).value)
(R,phi,z) in (kpc,deg,kpc)
9.150114090588534 -178.7224064420817 0.5730235993485633