Physics 3730/6720 Assignment 1


For each of the following exercises create a text file with your answer. See Exercise 3, below, for instructions for submitting your homework.

Exercise 1.

Using the GNU emacs editor, write a text document describing your experience with physics and with computers. Specifically,

  1. What is the most advanced physics course have you taken? (Name, please, not number)
  2. What is the most advanced mathematics course you have taken?
  3. Please list the operating systems (Windows, Linux) and computer languages (Basic, Fortran, C++, C, Python, Java) with which you have had experience and the length of time you have worked with each one.
  4. Have you had other classes that used Maple? Matlab?
This information will help us set the level of the course, but the real (graded) purpose is to test your ability with emacs.

Save your text file using the name exper.txt.

Exercise 2.

(Exercise and data thanks to B. Bromley) In ~p6720/examples/lcrs there is a file called lcrs.bright_gax containing a list of data from galaxies observed in the Las Campanas Redshift Survey. It is a four column text file except that the first few lines contain comments. Here is a sample line:

21910 2.30355501 0.721660018 -19.8176746
The first column is recession velocity (km/s), the second two are polar angles theta and phi (radians), the last is absolute magnitude in red light. In what follows, treat recession velocity v as a radial distance so that the first three columns describe spherical coordinates in a 3D space, with the origin at the Sun. (To get an approximate real distance, just divide v by the Hubble constant, about 71 km/s/Mpc, where 1 Mpc = 1 megaparsec = 3.086x1024 cm.) In this case that would give a galaxy at a distance of approximately 21910/71 = 308 megaparsecs from the solar system at the given angles and absolute magnitude.

Note that absolute magnitude is a measure of the intrinsic brightness or luminosity (emitted energy per second) of a galaxy. Think of it as being measured nearly at the source. The observed or apparent brightness is generally reduced, of course, mainly by the 1/r2 law, where r is the distance from the observer. For historical reasons, more negative numbers mean brighter objects.

Use grep to strip off all lines containing comments and to create your own purely numerical data file. Then use sort (and whatever else you want) to find

a) the highest and lowest "absolute magnitudes", and

b) the fastest and slowest recession velocities, and

c) the "absolute magnitudes" of the ten slowest receding galaxies and the absolute magnitudes of the ten fastest.

In each case give the Unix command(s) you used to obtain your answer.

[Hint: You will find that a combination of Unix commands linked by pipes "|" will do the job efficiently. Review the use of pipes and the Unix commands head, tail, sort and grep. See Unix Introduction chapter.]

Did you notice that the fastest receding galaxies tend to have larger absolute magnitudes? Why might this be? See if you can figure this out before reading the answer below!

Answer: The survey was designed so that only galaxies with an apparent brightness larger than a fixed minimum brightness were included.

So in order to make the cut, distant galaxies had to be much brighter, so they have a larger absolute magnitude.

Put your answers to parts a-c in a text file called galaxies.txt.

Exercise 3. ***Handing in your homework***

This exercise tells you how to hand in your homework. No credit will be given for any of the above exercises if this last one is not completed--so please get help if you have trouble!

Please follow the instructions given here in the assignments web page.

The files to be submitted for this assignment are

This page is maintained by:
Carleton DeTar
Last modified 27 December 2016