Question: code i python please Prob 2 (10 points total) We want to understand how brightness limits affect the use of supernovae observations in the measurement

code i python please Prob 2 (10 points total) We want tocode i python please

Prob 2 (10 points total) We want to understand how brightness limits affect the use of supernovae observations in the measurement of the Hubble constant, H_0. To do so, we will use Monte Carlo computations to generate a set of simulated data. For this simulation, we make the assumption that we are only using a class of supernovae that all have similar intrinsic brightness, so that their apparent flux can be used to measure how far away they are. If their Doppler shift is also measured, the measurements can be used to calculate the expansion rate of the universe, or Hubble's constant. A subtle effect occurs in this measurement, called Malmquist bias, that can affect the result. The effect is caused by the range of apparent brightness for supernova. Supernova in our simulation have an absolute magnitude of M=19, Assume the supernova have a scatter about their absolute magnitude of approximately 1 magnitude. Survey telescopes will detect objects as faint as m=20. The limiting magnitude corresponds to a distance modulus mM=5log10(d/10) of 39 , which suggests that supernova can be seen as far away as 1000Mpc. Assume supernova are formed uniformly throughout a sphere with radius r=2000Mpc. In the data generation part of the simulation, assume that each supernova is receding at a rate v=H0d, where H0 is 72km/s/Mpc and d is the distance in Mpc. A. Create a Monte Carlo program to generate 100 randomly placed supernovae within this volume. Have the program generate the true distances, d, to the supernovae. Calculate the mean distance for the supernova. B. Now assume each supernovae has a brightness governed by M=19+G(1) where G(1) is a random number with Gaussian distribution and standard deviation of one magnitude. Calculate the apparent magnitude of each supernovae using the distance generated in part (1). If m>20, assume the object is too faint to detect and reject it from the sample. Create a plot of magnitude verses distant for all the supernovae. Write out the average magnitudes of the original sample and the detected sample. C. Generate a velocity for each supernovae using Hubble's law. Generate an observed distance (d') by using its apparent magnitude and Hubble's law, with the assumption that the supernova has an absolute magnitude (M) of 19. Plot the observed distance on the x-axis and velocity on the y-axis and compare it to the true distance. Explain the effect of the observing limit on the resulting sample

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!