CS计算机代考程序代写 PHYS20161 Final assignment: Doppler

PHYS20161 Final assignment: Doppler

Spectroscopy

November 24, 2020

Doppler spectroscopy is an indirect method for detecting extrasolar planets
in astronomy. As the star and planet orbit around a common centre-of-mass,
the variation in the star’s velocity can be measured by inspecting the variation
in Doppler shift. From this, the planet’s mass can be obtained.

In this assignment you are tasked with fitting the observed variation in
wavelength of the light emitted from the star over time to find the mass of the
exoplanet and, if possible, an uncertainty on these values. Your work should
produce some graphics to support your analysis.

1 Theory

A planet in orbit around a star, of mass Ms, abides by Kepler’s third law,

r3 =
GMs
4π2

P 2, (1)

which relates the distance from the star, r, (assuming circular orbits) to the
period of its motion, P , where G is Newton’s gravitational constant. The force
of the planet on the star causes it also to orbit, albeit along a much smaller
path, a diagram depicting this is shown in figure 1. If the plane of the orbit is
such that the entirety of the star’s motion is in the observer’s line-of-sight, the
movement of the star can be seen in as a varying Doppler shift in the emitted
light. For classical speeds, assuming a stationary observer, the relationship
between emitted (λ0) and observed (λ(t)) wavelength is

λ(t) =
c+ vs(t)

c
λ0, (2)

where c is the speed of light and vs(t) is the star’s velocity along the line-of-sight.
vs(t) varies with time sinusoidally; i.e.,

vs(t) = v0 sin(ωt+ φ), (3)

where v0 is the magnitude of the star’s velocity, ω =

P

, where P is the same
period as in equation 1, and φ is an initial phase of the motion.

Once the period is known we can determine the distance between the bodies,
r, from which we can find the planet’s velocity,

vp =


GMs
r

. (4)

1

rrcm

vs

vp

Figure 1: Schematic of star-planet system orbiting around common centre-of-
mass whose normal is directed out of the page. The star, represented by a
large yellow circle, orbits around the circular path shown with velocity vs. The
planet, represented by a small grey circle, follows a much longer circular path,
of which only an arc is shown, with velocity vp.

Normal of orbit plane

Observer θi

Figure 2: Schematic of orbit whose normal is at an angle θi from the line-of-sight
of the observer.

Then, by taking moments, the planet’s mass can be found,

mp =
Msv0
vp

. (5)

If the plane of the orbit is subtended from the line-of-sight of the observer,
then the observed velocity is reduced due to the geometry. This inclination can
be taken into account in eq. 2 with a factor of sin θi multiplying vs(t). We
illustrate this for clarity in figure 2.

2 Project description

An experiment has taken place that observed the variation in light emitted from
a star over a number of years. The data were collected by two telescopes that
were in operation at different times of year. The data has had relative motion
of the Earth removed. You can find the data in files doppler data 1.csv and
doppler data 2.csv. Unfortunately there were some faults that led to not all
the points being recorded properly which you must filter.

You are tasked with obtaining the measured velocities from this data, then
fitting to equation 3 by varying v0 and ω. From this, find the mass of the planet,
mp, causing this wobble quoting uncertainties on this measurement.

Do not attempt to turn the fit into a linear problem and do not try
and fit the parameters separately. This will significantly overcomplicates

2

the problem and will almost certainly return the wrong result.
The data taking commenced when the star was closest to Earth. From

spectral analysis we know the emitted wavelength, λ0, is 656.281 nm, the H-
alpha Balmer emission line. Previous studies have found this star to have a
mass of 2.78 solar masses and suggest v0 ≈ 50 m/s and ω ≈ 3× 10−8 rad/s and
the orbit to be along the line-of-sight from Earth.

Your programme should:

• Read in, validate, and combine both data files.

• Perform a minimised χ2 fit by simultaneously varying ω and v0.

• Calculate both v0 and ω to four significant figures in m/s and rad/s re-
spectively1.

• Calculate mp and r to four significant figures in Jovian masses and AU
respectively1.

• Calculate χ2red. to three decimal places
1.

• Produce a useful plot of your result.

• Ideally, you should also find the uncertainties on ω, v0, mp and r to the
appropriate precision1.

With regards to style, in addition to what was asked for in the previous assign-
ment, we expect your code:

• To have a useful file check that halts the code if there is an issue.

• Read in the data files using inbuilt functions. Do not ask the user to input
the file names.

• Use inbuilt functions to perform the minimisation.

• Be versatile and applicable to similar data files with similar validation
issues.

• To make plots by attaching axes attributes to figure objects.

• Save any plots as a .png file.

• To achieve a linter score of at least 9.90/10.00 (maximum penalty of 10
marks)2.

Additional marks are available for extra features. You do not need to include
them all to get full marks for this aspect. Can you display extra information in
these plots? Can you format these plots nicely? Can it be applied to systems
with different line-of-sight angles, θi? Could it be applied to different files with
different validation issues? Can you make the initial guess on v0 and ω general?
Could it work without knowing the initial value for φ?

More detail on how the mark is split can be found in the illustrative rubric
on BlackBoard.

1When comparing to colleagues you might see minor discrepancies in the last significant
figure. These are fine and accepted as correct when marking.

2E.g. 8.33/10.00 corresponds to a deduction of 1.57 marks and -2.40/10.00 corresponds to
a deduction of 10.00 marks.

3

Theory
Project description