Exercise 2: Deriving the Distance to a Globular Star Cluster with Parallax Measurements
In this exercise, we will estimate the distances to stars in a globular cluster using the parallax method. As you go about doing the steps below, you’ll find that you need to look up various functions within numpy to answer the questions. That’s intentional: practicing this will help you get comfortable with reading documentation!
Background: Globular Clusters¶
A globular cluster is a spherical collection of old stars that are gravitationally bound. These clusters can contain thousands to millions of stars, all of which share a common origin and age. Because they are bound objects, and are compact (~a few parsec in size) compared to their distances (>> 1 kpc in the Milky Way), all of their stars can be considered as being equidistant from us to good approximation.
Background: Parallax Measurements¶
Parallax is the apparent shift in the position of an object when viewed from different angles. It’s commonly used in astronomy to measure distances to stars by observing their position from two points in Earth’s orbit.
The relationship between parallax shift/angle ϖ (in arcseconds, which is a unit of angle) and distance d (in parsecs) is:
d=ϖ1 where d is in units of parsecs and ϖ is in arcseconds.
In theory, the stars in a globular cluster should all have the same parallax, since the stars are roughly equidistant from us. However, in practice, measurements of parallax angles can be noisy due to observational errors. In this problem, we’ll explore the implications of that for measuring the distances to clusters.
Your Task¶
Create a numpy array of fixed parallax values, each with a parallax of 0.001 arcseconds. The array should have a length of 100 (simulating 100 stars in the globular cluster). You don’t need to give units to the array, but consider naming the variable something that mentions this information.
Simulate Noisy Parallax Measurements:
- For each star, simulate a noisy parallax measurement by adding random noise to the true parallax value. Specifically, use numpy to add Gaussian (normal) noise with a mean of 0 and a standard deviation of 0.0005 arcseconds (this represents measurement uncertainty).
Compute the Distances to Individual Stars:
- Use the formula above to compute an array of distances to the stars based on the array of noisy parallax angles.
Compute the Cluster Distance with Uncertainties:
- Calculate the mean distance across all the stars.
- Calculate the standard deviation of the distances.
- Compute the 68% confidence interval for the distance distribution by using numpy.percentile. Hint: what percentiles could you use to select for the central 68% of the distribution?
- Use your results and known conversion factors to translate your answer to units of lightyears
Interpretation
- Print the noisy parallax values, the computed distances, and the statistical results (mean distance, standard deviation, and confidence interval).
- How does the derived mean distance compare to the value that you get if you simply inverted the known parallax of 0.001 arcseconds? Explain a bit why your answer makes sense