# Learning more about exoplanet orbits using orbitize!

Spins! It is a program used in the scientific community to fit directly imaged exoplanet orbits. Sounds great, but what does that mean?

Most of the exoplanets we image are located directly away from their host star, which means they have very long periods. Since we cannot constantly observe these objects, we often get “astrometry” – x and y (or r and $theta$ If you are working in polar coordinates) the positions relative to the star at each time of observation, along with their uncertainty. An example of an astronomy table is shown in Figure 1.

Positions are useful to us because we can use them to estimate the orbits of planets in 3D – are the orbits eccentric or more circular? What is the semi-major axis of the orbit? Is it tilted orbit for us here on Earth? Since the live imaging method is relatively new, the community needed open source code that could help us answer these questions and better understand the orbits of these exoplanets. We want to learn more about the orbits of exoplanets because they can tell us a lot about how planetary systems are formed and how they will evolve over time.

Sarah Blunt, a graduate student at Caltech, led an effort to write orbit-friendly code in Python that’s open source and very straightforward to use, called orbitize! (Yes with an exclamation point!). It has since become a standard in the live imaging community for exoplanets. This code allows you to use planet positions to estimate the planet’s orbital parameters, using two main algorithms: Orbits For The Impatient (OFTI) and Markov-Chain Monte Carlo (MCMC). All six orbital parameters are shown in Figure 2.

In today’s post, we’ll learn how to download and use orbit! With the MCMC function to fit the possible orbits of the exoplanets HD 984 B (discovered by Meshkat et al. 2015), as shown in Figure 3. (Note: This tutorial assumes that you have Python 3 installed on your computer, along with the Python NumPy and Matplotlib packages – If you don’t have those installed, please click the links to learn how to install them).

We’ll need to coordinate our astrometry correctly for it to spin! It can be read. Spins! It takes a CSV file (it can be written on Google Sheets or Excel) where the columns, respectively, should be as follows:

• “Era” – This is the time of your observation of the astrometry, in the modified Julian date (MJD). You can use an online converter to convert our regular dates to MJD.
• “Object” – This refers to the object for which your astronomy is measured. Here, since we are using the astrometry from the planet, we always put the values ​​”1″ in this angle.
• “sep” – this is the separation of the body from the host star, in milliseconds (mas).
• “sep_err” – This is the uncertainty of your object’s separation in mas.
• “pa” – This is the angle in degrees of your planet’s position.
• “pa_err” – This is your planet’s uncertainty angle in degrees.

Figure 4 shows an example of how this data is formatted, for the HD 984 B. For the convenience of this tutorial, I’ve uploaded this CSV file to GitHub, so you can access it from there by clicking on this link.

Figure 4. Astronomy of HD 984 B that will be used in orbit!

Now that you have the file ready to go, we’ll move on to the Jupyter notebook for the rest of the tutorial.