{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Homework Problem \\#3 - Finding an exoplanet" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Hand-in format:** IPython Notebook or python program. Submit via email.\n", "\n", "As a reminder: please make sure your code is clean, documentated, and understandable. Make sure it runs without errors." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Background" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "In this problem set, we will analyze a dataset that contains the [radial velocity](https://en.wikipedia.org/wiki/Radial_velocity) of a star versus time. The radial velocity is the velocity with which the star is moving towards or away from us (positive velocities indicate it is moving away from us).\n", "\n", "If a star is not close to any other objects, there is no reason why the radial velocity should change over time. However, in the case where a second object is orbiting a star (such as a planet or another star), the star and the object will both orbit the center of mass of the system. Therefore, the star will show periodic variations in its velocity over time. \n", "\n", "These changes in velocity then cause a shift in spectral lines via the [Doppler effect](https://en.wikipedia.org/wiki/Doppler_effect), which we can measure with specographs on telescopes.\n", "\n", "> The smaller the second object, the less the star will be affected. For example, the Earth causes the Sun to change its velocity with an amplitude of 0.1 m/s over 1 year.\n", "\n", "Watch the following video to see an example of a large planet orbiting a star, and the effect on the observed spectral lines of the sta:" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "data": { "image/jpeg": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2MBERISGBUYLxoaL2NCOEJjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY//AABEIAWgB4AMBIgACEQEDEQH/xAAbAAEBAAMBAQEAAAAAAAAAAAAAAQIDBAYFB//EAD8QAAIBAgIGBgcGBQQDAAAAAAABAgMRITEEEhRBUZEFFVJhcbETIjIzcoGyNEJTc6HBIySCktEGFmJ0NUPh/8QAGQEBAQEBAQEAAAAAA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ft9Xsw5MbdV7MOTJtBrLvBwbdV7MOTC06qvuw5DaDWXeD5+3VezDkxt1Xsw5MbQay772eVxe2RwbbU7MOTG3VOzDkxtC6y7yNHDttTsw5DbanCPIbQay7gcO21OzDkNtqdmHIbQay7rkOLbanCHIm2VOzHkNoKl2g4tsqcI8htlThHkNoKl3Wu8EQ4tsqcI8htlTsx5DaCpdoOJaZUWSiNsqcI8htBUu2wtvOLbKnCPIbXU4R5DaCpdgOPa6nCI2upwjyG0FOwHFtdThHkXbKnCPIbQVLsLvzwOLbKl76sOQ2ypwiNoKl2kONaZUX3YcmNrqcI8htBUu29rWD4nFtdThHkNrqcI8htBTtBxbZU4R5DbKnCPIbQVLtBxbZU4RG2VOEeQ2gqXcDi22p2YcibbU4R5DaCpdwOHbKnCPIbZU7MeQ2gqXek27LFsHDttTsx5DbalrasOTG0Gsu4HDttTsw5DbanZhyG0GsvoYNN7+BDg22p2YcmNuqdmHJjaE1l9DMHBt1Xsw5E26r2YcmNoNZfQKfP26r2YcmNuq9mHJjaDWX0Cnztuq9mHJjb6vZhyY2g1l9Ep83b6vZhyZesKvZhyY2g1l9EHzusKvZhyY6wrJ+zDky7Qay5AAcnQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf/9k=\n", "text/html": [ "\n", " \n", " " ], "text/plain": [ "" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from IPython.display import YouTubeVideo\n", "YouTubeVideo(\"-BuwWtMygxU\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Looking for small changes for the radial velocities of stars is one method to find planets outside our own Solar System (\"exoplanets\").\n", "\n", "> The other common technique is the [transit method](https://de.wikipedia.org/wiki/Transitmethode), which we will not consider.\n", "\n", "## Our goal\n", "\n", "In this problem set, we want to find out whether a particular star has a companion object, and if so, we want to estimate the probability that the companion object is a planet.\n", "\n", "The data file required for this exercise is [data/p3_rv.txt](data/p3_rv.txt), a CSV file (whitespace separated) with three columns (and three header lines prefixed by `#`):\n", "\n", "* column 1: time [days]\n", "* column 2: radial velocity [m/s]\n", "* column 3: radial velocity uncertainty [m/s]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Part 1 - Visualizing the data" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "To start we want to see whether the star does indeed show periodic variations, and if so, we want to measure the period and amplitude.\n", "\n", "Read in the data and make a plot of the radial velocity in the file. Include axis labels, units, and error bars.\n", "\n", "Is the time spacing in the data equal? Do you see any clear periodic variations \"by eye\"?" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "# your solution here\n" ] }, { "cell_type": "markdown", "metadata": { "tags": [] }, "source": [ "## Part 2 - The periodogram\n", "\n", "To automatically determine the period of a time series, we can use a [periodogram algorithm](https://en.wikipedia.org/wiki/Periodogram). Adopt the following method:\n", "\n", "1. take an input `period`\n", "\n", "2. compute the phase of the radial velocity curve: `phase = (time % period) / period`\n", "\n", "3. sort both the phase and velocity data, by the phase.\n", "\n", "4. find the \"string length\" $L$ of a line that would join all the sorted points, from left to right. If $\\phi$ is the sorted phase, $v$ is the velocity, and $N$ is the number of points, then\n", "\n", " $$L = \\sum_i^{N-1}{\\sqrt{(\\phi_{i+1} - \\phi_{i})^2 + (v_{i+1} - v_{i})^2}}$$\n", "\n", "---\n", "\n", "Implement this algorithm, and find the string length for 10,000 periods logarithmically spaced between 1 and 100 days.\n", "\n", "Make a log-log plot of string length versus period. What do you see? (There should be several clear minima)." ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "# your solution here\n" ] }, { "cell_type": "markdown", "metadata": { "tags": [] }, "source": [ "## Part 3 - Finding the best-fit period\n", "\n", "Using the above calculations, find the best-fit period of the first clear minimum (optional question: why the first? what do the other minima correspond to?).\n", "\n", "Then, plot radial velocity (with error bars) versus phase for the best-fit period you derived.\n", "\n", "> If you have a good best-fit value, you should see something that looks similar to one period of a sinusoidal function.\n", ">\n", "> This means that there are indeed periodic (in fact. sinusoidal) variations in the radial velocity curve, indicating that a second object is likely orbiting the star!\n" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "# your solution here\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Part 4 - Fitting the radial velocity amplitude\n", "\n", "Fit the radial velocity versus phase (using your best-fit period), with the functional form: $f(x) = a \\sin{(2\\pi x + b)}$ where $a$ is the amplitude, and $b$ is a phase shift.\n", "\n", "> Make sure $a$ is positive.\n", "\n", "Plot the radial velocity data, with error bars, and overplot the best-fit function.\n", "\n", "Then, derive the uncertainty on $a$, using the covariance matrix returned by the fitting function." ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "# your solution here\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Part 5" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We will now estimate the mass of the planet that is orbiting the star.\n", "\n", "Given that the radial velocity curve is roughly sinusoidal, this suggests the planet is on a roughly circular orbit.\n", "\n", "For two bodies (in our case a star and a planet) orbiting a common center of mass in circular orbits, Kepler's 3rd law of motion states that:\n", "\n", "$$\\frac{4\\pi^2}{T^2} = \\frac{G M_\\star (1 + q)}{R^3}$$\n", "\n", "where $T$ is the orbital period, $M_\\star$ is the mass of the star, $q$ is the ratio of the object mass to the mass of the star, and $R$ is the distance between the object and the star.\n", "\n", "In addition, for two objects orbiting a common center of mass, the amplitudes of the velocities $K$ will be related to the mass of the two objects - with the more massive one moving less:\n", "\n", "$$\\frac{K_\\rm{star}}{K_{\\rm planet}} = q$$\n", "\n", "Finally, for a circular orbit:\n", "\n", "$$K_{\\rm planet} T = 2\\pi R$$\n", "\n", "Substituting this back into Kepler's law and simplifying gives:\n", "\n", "$$(1 + q)~q^3 = \\frac{T K_{\\rm star}^3}{2\\pi G M_\\star}$$\n", "\n", "Finally, there is one final important thing to consider, which is that the velocity amplitude we measure for the star is not $K_{\\rm star}$ but\n", "\n", "$$K_{\\rm obs,star} = K_{\\rm star}~\\sin{i}$$\n", "\n", "where $i$ is the viewing angle of the system ($i=90^\\circ$ means that we are observing the system *edge-on*, and $i=0^\\circ$ corresponds to a *face-on* orientation where we would not see the star move towards or away from us). $K_{\\rm obs,star}$ is the amplitude of the velocity - the ``a`` parameter you measured above.\n", "\n", "Therefore, assuming $q << 1$, the final equation is:\n", "\n", "$$q \\approx \\left(\\frac{T}{2\\pi G M_\\star}\\right)^{1/3} \\frac{K_{\\rm obs,star}}{\\sin{i}}$$\n", "\n", "---\n", "\n", "Compute the value of $q$ assuming the values of $T$ and $K_{\\rm obs,star}$ you found above, and adopting $\\sin{i}=1$. Further, assume that $M_\\star$ is the mass of the Sun ($M_\\star=1.989\\times 10^{30} \\,\\rm{kg}$).\n", "\n", "Using $q$, derive the mass of the object in units of the mass of Jupiter ($M_{\\rm Jupiter}=1.898\\times 10^{27} \\,\\rm{kg}$). Is the object likely to be a planet?" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [], "source": [ "# your solution here\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Part 6 - Quantifying the uncertainty on the planet mass\n", "\n", "In reality, your derived $K_{\\rm obs,star}$ value has uncertainties, as does the mass of the star, and the viewing angle.\n", "\n", "Carry out a Monte-Carlo error propagation simulation, to find the likely distribution of masses for the object assuming that:\n", "\n", "* the error on the radial velocity is the one you derived above, and is normal (i.e. represents a Gaussian)\n", "\n", "* the mass of the star is sampled from a uniform distribution, between 0.6 and 1.4 times the mass of the Sun.\n", "\n", "* the viewing angle can be anywhere between 0 and 90 degrees. However, one cannot simply sample $i$ randomly between 0 and 90 because some viewing angles are more likely than others - to do it properly you need to sample $\\cos{i}$ uniformly between 0 and 1, then derive $i$ and so $\\sin{i}$ from this.\n", "\n", "From the Monte-Carlo simulation, plot a histogram of the probability that the object has a certain mass, and show only the range from 0 to 13 times the mass of Jupiter.\n", "\n", "What is the (numerical) probability that the object is less massive than 13 times the mass of Jupiter?\n", "> This is usually considered to be the upper limit for the mass of a planet.\n", "\n", "What degree of confidence do we have that the object is a planet, for 1, 3, and 5 sigma [confidence bounds](https://en.wikipedia.org/wiki/68%E2%80%9395%E2%80%9399.7_rule)?1/2/3/4/5-sigma confidence terminology?\n", "\n", "Based on this, what can you conclude about the object?" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [], "source": [ "# your solution here\n" ] } ], "metadata": { "anaconda-cloud": {}, "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.12" } }, "nbformat": 4, "nbformat_minor": 4 }