Assignment #6
ASTR 3800
Due March 15, 2016

Now we start simulations.

Use the Python class structure you created in the last Assignment.  Add classes and functions as you see fit.

1 .Create an array of wavelengths
2. Create a function that returns a Planck Function in response to the wavelengths and a temperature.
3. Put the Planck array into a class function that converts to expected photons per wavelength bin per square centimeter per second at a given radius.
4. Use the temperature and radius of the Sun. Integrate across your wavelength band to show that the total output of the Sun is correct.
5. Take the Sun and calculate the photon flux per bin at 10 parsecs.
6. Assume a telescope with 10,000cm2 of collecting area, and create an array with the expected number of photons per bin.
7. Randomize the data to simulate poisson counting rate statistics.
8. Plot the simulated data in counts vs wavelength.
9. Scale the distance so that there are only 1000 counts in the whole spectrum.  How far away is it?
10. Overplot the new, rattier spectrum.
11. Overplot the same size star at that distance, except drop the temperature to 4000K.

The spectral plotting procedure must create a plot with all axes labelled and a title. It must be in appropriate units. The procedure must plot the flux in a color that is appropriate to the star (e.g. the Sun should be yellow).

The idea here is to make the plot as cool-looking as possible and exercise all the capabilities of Python's plot function.