First Last - Plotting


In [ ]:
%matplotlib inline
import matplotlib.pyplot as plt

import numpy as np
from astropy.table import QTable

The file SDSS_MainBelt.csv contains data on objects in the asteroid belt collected by the Sloan Digital Sky Survey.

The columns are:

  • Name - Object name
  • a - semi-major axis
  • cA - SDSS a$^*$ color
  • cI - SDSS i color (near infrared)
  • cZ - SDSS z color (infrared)
  • X - X position [au] - Sun-centered coords (10/29/2014)
  • Y - Y position [au] - Sun-centered coords (10/29/2014)
  • Z - Z position [au] - Sun-centered coords (10/29/2014)

Read in the file SDSS_MainBelt.csv


In [ ]:

The Kirkwood Gaps - Mean Motion Resonances

  • Orbital period [years]: P = a ** (3/2)
  • Orbital Period of Jupiter: Pjup = 11.8618 years
  • Make a histogram of: (Pjup / P)
  • Bins = 150
  • Invert the x-axis
  • Draw vertical lines at (Pjup / P) = 1,2,3,4
  • Label the axis
  • Output size w:12in, h:8in
  • Make the plot look nice (including clear labels)

In [ ]:

The Position of the Asteroids

  • Make a 3D plot of X vs Y vs Z for the asteroids
  • Orient the plot so you can see the 3D structure of the asteroid belt
  • Output size w:9in, h:9in
  • Make the plot look nice

In [ ]:

The Color of the Asteroids

  • Make three (3) plots in one row
  • In each panel, plot a histogram of the semi-major axis (a) for all of the asteroids.
  • Bins = 100.
  • Only show 2.0 AU < a < 3.6 AU
  • In the first panel, overplot a histogram of a for C-Type asteroids only.
  • In the first panel, overplot a histogram of a for S-Type asteroids only.
  • In the first panel, overplot a histogram of a for V-Type asteroids only.
  • In each panel, draw a vertical line at a = mean(a) for that type of asteroid.
  • Adjust the color and transparency of the overplotted histograms so that it is easy to see.
  • The asteroid types can be determined from their colors (see image below).
  • Output size w:15in, h:5in
  • Make the plot look nice (including clear labels)

In [ ]:

Trojan Asteroids

  • Trojan asteroid have a > 5.0 AU
  • Make a pie plot with 3 pieces
  • Each piece should represent the percentage of each asteroid type in the trojan population
  • Output size w:8in, h:8in
  • Make the plots look nice (clear labels)

In [ ]:


Asteroid classes - SDSS Colors


Due Tue Feb 14 - 5pm

  • Make sure to change the filename to your name!
  • Make sure to change the Title to your name!
  • File -> Download as -> HTML (.html)
  • upload your .html and .ipynb file to the class Canvas page

In [ ]: