Path: blob/main/Group exercises/Group Exercise 4.ipynb
968 views
Cosmology of an Accelerating Universe
Introductory background: Supernovae, Dark Energy, and the Accelerating Universe
References: For more information about the dataset used in this exercise, see the following.
Background
In this exercise, you will use data from supernovae to constrain the cosmology of the Universe. For each supernova, the main observables are:
Redshift , which tells the supernova's relative velocity to us.
The supernova light curve, i.e., how bright it is as a function of time. Type Ia supernova appear to be "standard candles" so that by measuring their brightness, one can infer how far away they are.
Analyzing the relationship between redshift vs distance, one can gain an understanding of the expansion of the Universe, which in turn is related to the amount of matter and dark energy, according to the following formula
where is a measure of distance (luminosity distance), is constant known as the Hubble length, and are the total fractions of matter and dark energy, respectively. Eq. (1) assumes that the Universe has a flat spatial geometry (inferred from observations of the cosmic microwave background), so we assume that . The Hubble distance is related to the famous Hubble constant by
where is the speed of light. It is customary to parametrize in terms of a parameter , which is known to be around 0.7.
Hubble's analysis in 1929 considered Cepheid variable stars (another standard candle) in nearby galaxies, . In this limit
Eq. (2) can be rearranged as
where is velocity (along the line of sight). Thus, and the constant of proportionality is named in honor of Hubble (although it was first determined by Lemaitre, whose similar work predated Hubble's by two years).
For distant objects, such as supernovae, is given by a more complicated function in Eq. (1) and one can extract more information than just . The goal of this Exercise is to determine , showing that dark energy does indeed exist by finding that .
We will use the supernova dataset provided by Suzuki et al. (2011). The code below loads the dataset as a pandas dataframe. The columns provided are:
Name of the supernova (
'name')Redshift
'z'Distance modulus (
'mu')Error on the distance modulus (
'mu_err')Last column is not important for this analysis
The distance modulus is a way to express distance that is commonly used in astronomy. It is related to by the formula
Part I: Plotting the data
It is always a good idea to look at your data before you try any analysis. Make an error bar plot of as a function of . Use a log scale on the x-axis (and a linear scale on the y-axis).
On the same plot, plot Hubble's Law given in Eq. (2). (You will need to express Hubble's Law in terms of .) Take , which comes from a recent analysis of Cepheid variable stars.
Include labels and a legend for your plot.
Part II: Calculate the distance
Create an array of redshifts according to the following:
For , calculate an array distance moduli for each in z_grid. Using your arrays for and , create an interpolating function mu_interp as a function of .
Repeat your previous plot from Part I with an additional curve:
(Note: z has more points than z_grid so that the interpolation is actually doing something other than returning your original grid.)
Part III: Dark energy
Generalize your result from Part II as follows. Create a function chi_sq(Omega_Lambda) that takes as an input and does the following:
Sets
Generates an interpolating function
mu_interp(z), as in Part II.Calculates the where the sum runs over the data points, labeled by , where , , are the redshift, distance modulus, and error for each data point.
Make a grid in between [0,1] and (looping over your grid in ), determine the for each value of . Use your result to make a plot of as a function of .
Determine the best-fitting value of , i.e., the value of that makes the the smallest.