Homework #2
ASTR 3800
Due January 21, 2016

Download the accompanying file called rays.txt from the website. rays.txt

It contains a table of six columns. Read the table into Python. Make each column an array variable. Call them x,y,z,qx,qy,qz. Calculate the average of x and of y and then calculate x-x_av and y-y_av. Plot x-x_av vs y-y_av with the point symbol to show the scatter diagram of values. Put a label somewhere in the square of the plot that has your name on it. Print the plot.

Then truncate each array to its first 25 elements. Use python to print a new data file of columns. Call it rays_av.txt. Read it into Excel. Use Exel to plot the values of x-x_av vs y-y_av.  Print the plot in Excel.

Submit your python procedures, your .txt file and your .xls file and plots to Anthony.  Make certain the your name appears on the plot, written by the computer. 

This is a basic exercise in manipulation of data and simple statistics.