07| Age of the Universe

Author

Bijaya Luitel (2024)

Warning

You cannot use any specialised packages for this challenge except astropy(see later). However, Numpy, SciPy and matplotlib are kosher.

Introduction

How old is the Universe?

A hundred years ago, amongst many other things, humans lacked the knowledge of the universe’s true size and age. This all changed with a groundbreaking measurement of the distance to the Andromeda Nebula (as it was called back then), as well as a handful of other “nebula”. We now know of these objects as galaxies, and we know that they are islands of stars that are gravitationally distinct from our own little island, the Milky Way. One of the most important discoveries that Edwin Hubble made was that most galaxies were moving away from us, and that galaxies further away seem to move away (or recess) faster. He did this by synthesizing his data of the distance to these galaxies with spectroscopic data that revealed how fast they were moving relative to us. This is now called the Hubble-Lemaitre Law (Hubble wasn’t the only scientist to conceptualize the notion of an expanding universe). One of the implications of this fact is that at some point, galaxies must have been closer to one another, which more importantly for our purposes, suggests that the Universe had a beginning! In this challenge, we will use data acquired as part of a large galaxy survey to determine our own, albeit simplified, estimate for the age of the universe!

The original photographic plate used by Hubble to determine the distance to the Andromeda Galaxy. He wrote the word Var to indicate that he had identified a Cepheid Variable in the galaxy, which is a standard candle

Hubble’s Law

Hubble’s law is pretty straightforward. It is: \[ v = H_{0} d, \tag{1}\]

where \(v\) is the speed of recession, \(H_{0}\) is Hubble’s constant and \(d\) is the distance to the galaxy. An important thing to keep in mind, \(v\) is expressed in units of km/s, \(d\) in Mpc (megaparsecs) and from unit analysis, \(H_{0}\) is in terms of km/s/Mpc. 1 parsec (or pc for short) is a unit of distance, that is roughly equal to 3.26 light-years.

It turns out that it is possible to use Hubble’s constant to determine the age of the universe, although its model specific. I.e. it depends on how much contribution we have from dark matter and dark energy1. \[ t_\text{universe} = \frac{0.956}{H_{0}}. \tag{2}\]

Recessional Velocities and Redshifts

Usually, the recessional velocity is obtained by examining a spectrum, determining how shifted the lines are compared to lines seen in the laboratory, and finally using the Doppler formula. Astronomers generally report redshifts (\(z\)) and so the conversion to a velocity is pretty straightforward: you just multiply the redshift by the speed of light,

\[ v = cz. \tag{3}\]

However, this only works for low redshifts \((z\ll1)\) because of relativity. If this is not the case you need to use

\[ 1 + z = \left(1 + \dfrac{v}{c}\right)\sqrt{\dfrac{1}{1-\dfrac{v^2}{c^2}}} \tag{4}\]

\(c\) here is the speed of light.

Measuring Distance to Galaxies

Measuring distance is a bit trickier. Usually, astronomers will use what’s called Standard Candles, which are celestial objects (e.g. pulsars) that have a fixed intrinsic brightness, or in an astronomer’s parlance, luminosity. Standard candles emit fixed amounts of light, so if you are able to identify them in your galaxies of interest, you will be able to figure out which galaxies are closer depending on the measured brightness of the standard candle. Annoyingly, due to some historical quirks, astronomers have developed a magnitude scale that is logarithmic to compare object’s brightnesses. We don’t need to know all the details for these tasks, but you do need to know that the ‘distance modulus’, shorthanded as \(m - M\), is given by:

\[ m - M = 5\space log_{10}(d) - 5, \tag{5}\]

when \(d\) is measured in parsecs. (If you are curious what \(m\) and \(M\) stand for, they are the apparent magnitude and absolute magnitude respectively. The capitalization/lack of capitalization is vital to understand what type of magnitude is being referred.)

Tasks

Import Data

  1. Download the data file: GAMA_Survey_nearby.csv and inspect its headers.
  2. Import the data from the file: GAMA_Survey_nearby.csv.

A little bit about the data.

  • It was taken from DR4 (the 4th Data Release) of the Galaxy and Mass Assembly (GAMA) survey. It is a very comprehensive dataset with lots of different observations.
  • Astronomers are really bad at naming things. The redshift data is contained in “Z_TONRY” and the distance modulus in “DM_70_70_25”. (The ID column just gives you an identifier for the galaxy, and the RA and Dec columns are the galaxy’s position in the sky, a bit of a preview for SP3176).

Check Your Data

I earlier made the claim that if redshift is much lower than 1, we can use the non-relativstic form of the doppler effect, which is the formula I put above. Check that our data satisfies that claim!

  1. What range of redshift values do we have?
  2. What’s our median?
  3. Plot a histogram of the redshifts to see what the distribution of our data is like (please make at least 7 bins, and at most 10).

Convert to Recession Velocities

Unfortunately, we do not want the redshift and distance modulus for our further steps, but rather the recession velocity and distance. Do the required equation manipulation as presented in the introduction. PLEASE pay extra attention to units, because a conversion error will cause garbage outputs.

Hint: the velocities should all be much lower than the speed of light in km/s and the distances should not be more than a thousand megaparsecs.

Plot Stuff

Make a scatter plot of the velocity as a function of distance.

Linear Regression

In order to determine a value of Hubble’s constant, we would need to fit a line of best fit and determine its slope. For this:

  1. Lookup how to use SciPy’s curve_fit() function to fit a straight line to our data.
  2. Fit a straight line to this data and extract the value of \(H_0\).
  3. Now overlay your fit on the previous plot.

Hint: You must think carefully about the intercept. Look at Hubble’s law again. What should the intercept be? Please label your axes and give the plot an appropriate title.

Note: There are many different ways to fit curves using Python. However, Scipy curve_fit() is very versatile and good to know how to use.

The Age of the Universe

  1. Use that slope to now determine the age of the universe. Remember to make the required unit conversions! Hint: If you are lazy and python-savvy, you can import a module called astropy and use units.
  2. According to the Planck 2018 results (2020), the value for the age of the universe is 13.787 billion years. How different is your estimate? Express the difference as a percentage deviation of the true value.
Back to top

Footnotes

  1. We will use an estimate that involves roughly \(30\%\) matter and \(70\%\) dark energy. Regular matter has very little contribution, most of the \(30\%\) comes from dark matter↩︎