Astronomy 15 - Homework 1 - Dartmouth Collegeast15/homework/hw1_02.pdf · 2005-05-19 · Astronomy...

5
Astronomy 15 - Homework 1 Here are some exercises to get you used to celestial coordinates and calculations. 1) For an observer at latitude l, the altitude a of an object at hour angle H and declination δ is given by a = arcsin(cos l cos H cos δ + sin l sin δ ), where atmospheric refraction has been ignored. Clearly, when the altitude is zero (on the horizon), the expression in parentheses is also zero. Hanover, NH is at l = 43.7 degrees. Compute the hour angle of the setting sun on the winter solstice; how long is the sun above the horizon that day? Repeat for the summer solstice. 2) Here’s a way of computing the angle between two objects in the sky. (a) First, you transform the celestial position to Cartesian unit vectors. Show that a unit vector to an object with celestial coordinates (α, δ ) has components z = sin δ, x = cos δ cos α and y = cos δ sin α , where the x-axis points toward (α, δ ) = (0, 0), the y-axis points toward (α, δ ) = (6 h , 0), and the z -axis points toward the north celestial pole. (Hint: How long is the projection of the vector onto the x-y plane?) Verify explicitly that the resulting vector has length = 1 (that’s the easy part). (b) Now recall that the inner or dot product of two vectors a =(x a ,y a ,z a ) and b = (x b ,y b ,z b ) is a · b = x a x b + y a y b + z a z b = ab cos θ, where a and b are the magnitudes of the two vectors and θ is the angle between them. Use this to calculate the angle between a star at α =0 h =0 and a star at α =6 h = 30 . Remember, 1 h = 15 . Interlude: Linux on the Astro Lab Machines Much of the astronomical community uses Unix or Linux as the computer operating system of choice, instead of Microsoft Windows or the various Macintosh systems. Unix was first developed back in the 1970s at Bell Labs. Back then, computers were big expensive things and most of them had many users at the same time, so it was important not to let any one user get control of the machine, deliberately or inadvertently. Therefore, stability was engineered into the system from the start – each user is allowed to see and manipulate only certain files, and in principle a user’s program cannot crash the whole system (in practice this can happen, but very rarely). By contrast, the PC operating systems were developed around the idea that a single user controls the system. Features like security and stability were afterthoughts – if the thing crashed, you just got the ‘blue 1

Transcript of Astronomy 15 - Homework 1 - Dartmouth Collegeast15/homework/hw1_02.pdf · 2005-05-19 · Astronomy...

Page 1: Astronomy 15 - Homework 1 - Dartmouth Collegeast15/homework/hw1_02.pdf · 2005-05-19 · Astronomy 15 - Homework 1 ... window from which you launched xephemand type pwd ... In the

Astronomy 15 - Homework 1

Here are some exercises to get you used to celestial coordinates and calculations.

1) For an observer at latitude l, the altitude a of an object at hour angle H and declinationδ is given by

a = arcsin(cos l cos H cos δ + sin l sin δ),

where atmospheric refraction has been ignored. Clearly, when the altitude is zero (on thehorizon), the expression in parentheses is also zero. Hanover, NH is at l = 43.7 degrees.Compute the hour angle of the setting sun on the winter solstice; how long is the sun abovethe horizon that day? Repeat for the summer solstice.

2) Here’s a way of computing the angle between two objects in the sky.

(a) First, you transform the celestial position to Cartesian unit vectors. Show that a unitvector to an object with celestial coordinates (α, δ) has components

z = sin δ,

x = cos δ cos α

and y = cos δ sin α

,

where the x-axis points toward (α, δ) = (0, 0), the y-axis points toward (α, δ) = (6h, 0),and the z-axis points toward the north celestial pole. (Hint: How long is the projection ofthe vector onto the x-y plane?) Verify explicitly that the resulting vector has length = 1(that’s the easy part).

(b) Now recall that the inner or dot product of two vectors a = (xa, ya, za) and b =(xb, yb, zb) is

a · b = xaxb + yayb + zazb = ab cos θ,

where a and b are the magnitudes of the two vectors and θ is the angle between them. Usethis to calculate the angle between a star at α = 0h, δ = 0◦ and a star at α = 6h, δ = 30◦.Remember, 1h = 15◦.

Interlude: Linux on the Astro Lab Machines

Much of the astronomical community uses Unix or Linux as the computer operating systemof choice, instead of Microsoft Windows or the various Macintosh systems.

Unix was first developed back in the 1970s at Bell Labs. Back then, computers were bigexpensive things and most of them had many users at the same time, so it was importantnot to let any one user get control of the machine, deliberately or inadvertently. Therefore,stability was engineered into the system from the start – each user is allowed to see andmanipulate only certain files, and in principle a user’s program cannot crash the wholesystem (in practice this can happen, but very rarely). By contrast, the PC operatingsystems were developed around the idea that a single user controls the system. Featureslike security and stability were afterthoughts – if the thing crashed, you just got the ‘blue

1

Page 2: Astronomy 15 - Homework 1 - Dartmouth Collegeast15/homework/hw1_02.pdf · 2005-05-19 · Astronomy 15 - Homework 1 ... window from which you launched xephemand type pwd ... In the

screen of death’, or the little bomb icon, and a three-fingered salute (ctrl-alt-delete) wouldget you out.

Linux was the brainchild of a Finno-Swedish programmer, Linus Torvalds. Seeing theproliferation of inexpensive PC hardware, he wrote a little system which acted like Unix,put it out over the Internet, and invited others to contribute functionality. In a remarkablyshort time, the volunteer efforts of thousands of enthusiasts worldwide created a robust,powerful, full-featured operating system which is mostly very similar to Unix. Linux isfree – but creating a working Linux system yourself from the resources out on the webis painfully difficult. Accordingly a number of companies have sprung up which packageup Linux software in user-friendly bundles for a modest price. RedHat Linux is the mostpopular flavor in the U.S. market.

Nearly all software for Linux is free. That’s right, it costs nothing. Some specialized stuffdoes cost money, but there’s often a freeware alternative for many tasks.

We have a suite of machines in Room 200 which are ‘dual-boot’, that is, they run eitherLinux or Windows. By default they come up in Linux.

Each of you will get a user account for these machines. This is necessary because all Linuxor Unix machines require them – you can’t just turn it on and start typing. The advantage,as noted above, is that they don’t (or hardly ever) crash.

You user account will come with a password. You should immediately change your defaultpassword to something secure which you can remember. Hackers routinely try to break intomachines by ‘cracking’ passwords, so it’s important to make your password ‘uncrackable’.The rules are:

• Don’t use any proper name or English or other language word

• Don’t use something obvious like an encoded birthdate

• Make your password reasonably long (like 8 characters)

• Mix upper- and lowercase letters, numbers, and punctuation marks

• Ideally, come up with some unforgettable mnemonic for your password.

Once you’ve thought up a password, sit down at one of the machines. If it’s not on, turnit on with the button – it will take a minute or so to go through the boot sequence. Whenit comes up with a window which prompts for a username, type it in, and then type yourdefault password to log on. Then the machine will come up in the X windows display. Xis a window manager which runs under Linux - Linux itself will run from a command linealone, but that’s somewhat limiting. The particular flavor of X you’re running is calledfvwm2.

By default there will be one window – an X terminal – which will be ready to accepttext. Put the mouse in the window, and change your password by typing yppasswd andanswering the prompts. You’ll be asked to type your new password twice to avoid typingerrors.

2

Page 3: Astronomy 15 - Homework 1 - Dartmouth Collegeast15/homework/hw1_02.pdf · 2005-05-19 · Astronomy 15 - Homework 1 ... window from which you launched xephemand type pwd ... In the

You might have to select the text window by clicking on it. Nearly everything in Linuxis done with the left mouse button, which is the one under your index finger if you’reright-handed. In the instructions below, the left button is understood unless otherwiseindicated.

You can move the text window around by clicking on the top bar and dragging it, andyou can resize it by clicking accurately on the corner of the border. Try it, it’ll be helpfullater.

You’re ready to go!

Exercises with xephem

Xephem is a very nice desktop-planetarium calculator package written by Elwood Downey.He has a free version available on the Web, and for something like $80 you can get a CD-ROM version with lots of extra goodies *. We just need the free version, which is installedon these machines.

To start xephem, place the mouse in the terminal window (you may have to click on theborder with the left mouse button to activate it for input), and type xephem &. Theampersand launches the job in ‘background’ and leaves the terminal free for other input.A control panel for xephem will come up after a few seconds.

X1: Let’s repeat the sidereal/solar demonstration we did in class. Look at the lower rightportion of the control panel, which says ‘Looping’. Click on ‘N Steps’ and select 1000000;click on ‘Step’ and select ‘24:00:00’; click on ‘Pause’, and in the dialog box (which youhave to click on to get access to) put in ‘1’ second.

Now, go to menus at the top of the window and under ‘View’ select ‘Sky view . . .’. Thiswill pop a window showing the sky. Finally, at the bottom of the box, click on the ‘Update’control bar.

The display will start to move. Watch it for a while. Write a few sentences to describewhat you see.

Return to the control panel and click on the bottom bar, which is now labeled ‘Stop’.Return to the ‘Step’ item and select ‘Sidereal Day’. Start the demo again with ‘Update’.Again, watch it for a while. Write a few sentences to describe what you see.

X2: Let’s trace the sun through the year, in an interesting way. Select a local time sometimewhen the sun is up – around local noon works well. You can experiment with the UTCtime to do this – just change it and hit the update button (but be sure to change thenumber of steps back to ‘1’).

Go to the ‘Looping’ items and set it up to have a step of 7 days, and to run 52 steps.

Under the ‘View’ menu, select ‘Data Table’.

* This is available from clearskyinstitute.com. If you’re into this stuff it could be a goodinvestment, esp. since the free version is quite difficult to install properly

3

Page 4: Astronomy 15 - Homework 1 - Dartmouth Collegeast15/homework/hw1_02.pdf · 2005-05-19 · Astronomy 15 - Homework 1 ... window from which you launched xephemand type pwd ... In the

Under the ‘tools’ menu, choose ‘Plot values’. This will bring up a dialogue box. Click‘create plot file’. Under the button labeled ‘Browse. . .’ is a box for entering a file name.Click in this box, erase what’s there, and enter something like /net/myuser/myplot.plt

(don’t type this! Read on for what to really type). This is the name of the file you’llbe sending output to; the format is a first example of a path name. In this example/net/myuser is the name of the directory you’re writing to, the words separated by slashesare directory levels (so /net is the ‘top’ directory, myuser is the name of the subdirectory,and so on. To figure out what to actually give for your directory name, go back to the textwindow from which you launched xephem and type pwd (which stands for ‘print workingdirectory’), which will print out the name of your own personal directory (your own ‘top’directory). Figure out your own path from the response.

Now click on the ‘select fields’ radio button. Boxes will appear around all the items in thedata table. In the row labeled ‘Sun’, click on ‘Az’ and ‘Alt’. This will be where the sunappears in the sky on each date. The fields ‘Sun.Az’ and ‘Sun.Alt’ will appear under the‘ X ’ and ‘ Y ’ columns in the plot control window. Click again on ‘Create plot file’ anddon’t worry about the append/overwrite choice box which comes up – just click either one(but overwrite if it’s your second time through).

Time to run it. Click on ‘Update’ again, and watch the sky go week-by-week through theyear. When it’s done, click ‘close’ on the Plot Control window, then select it again (undertools) – not sure why one has to close it and open it, but it looks as if one must – and then‘Show plot file’. Describe what you see. In the ‘Control’ menu under the plot, there’s a‘Print’ item, which might work. Try it and see!

X3: Spend a little time playing around with the program and its controls. When you movethe mouse around on the skyview display, it shows the coordinates of the mouse pointerin various systems – look at these and make sure you understand what you’re lookingat. Under ‘Control’ in the sky view display you can do lots of things, like turn on andoff the boundaries between the constellations (the constellations have official boundaries,a relatively modern invention, so that any point in the sky belongs to a well-definedconstellation, unless it’s exactly on a border). If you point at an object and click on theright mouse button, you can get a little synopsis about what the object is. The littlebuttons along the side of the sky view display control options affecting the appearance ofthe display. You can enlarge the sky view by resizing the window. You can get a nicepicture of the solar system as well under the ‘View’ menu. Watch the moons of Jupiterfor a while – there are lots of possibilities.

Exercises with Skycalc

I wrote a little program which does time-and-the-sky calculations, called skycalc. Itdoesn’t do nice fancy displays like xephem, but it’s simple to use.

Go back to the text window, and type skycalc. It will ask you for what site you’reobserving from; it’s s for Shattuck (followed by the enter key, nothing happens ’til youtype enter).

Now you can use the program to check some of the answers to your earlier work.

4

Page 5: Astronomy 15 - Homework 1 - Dartmouth Collegeast15/homework/hw1_02.pdf · 2005-05-19 · Astronomy 15 - Homework 1 ... window from which you launched xephemand type pwd ... In the

a) You can enter a date with y 2002 4 5 or whatever – this means 2002 April 5, and type a

to get an ‘almanac’ for that date. The output on the screen will include sunrise and sunsettimes which you can use to check the length-of-day calculation.

b) Here’s a neat trick; enter your date of birth with y, and the time with t 19 03 00 (if youwere born at 3 minutes past 7 in the evening, for example). If you hit = you will get abig output which includes the ‘Julian date’, a big number over 2 million. Write it down.Now set the date to now, which you can do easily by typing x T 0, and hit = again. Writedown the Julian date again. The Julian date is a timekeeping system which is simply asequential day number, with a fractional part to deal with time of day. Julian date zerowas back in 4713 BCE, so all historical dates are positive (and the numbers are huge).Now you can easily compute your age in days, simply by subtracting the two Julian dates– this bypasses all the complexities of the calendar for any kind of timekeeping. All youneed is a routine which reliably converts back and forth from Julian date.

c) As we saw in class, the earth’s axis precesses gradually with time, which leads to a slowchange in the coordinates in an object (even if the object isn’t moving). Let’s see howmuch of a difference this makes. There’s an interesting star called SS433, which is at 1950coordinates α = 19h 09m 21s.3 and δ = 4◦ 53′ 55′′. Suppose you were to mistakenly aimthe telescope at the 1950 coordinates at the present time. How far off would you be? Toanswer this, type e 1950 in skycalc, which tells the program to expect 1950 coordinates;then enter the ra and dec with r 19 09 21.3 and d 4 53 55, and finally hit ‘=’ to seethe result. Write down the present coordinates.

How far off is this? You can figure this out by considering the sky locally to be like a littlepiece of flat graph paper and using the Pythagorean theorem to compute the distance.Complications include (1) converting to decimal units before subtraction; (2) multiplyingthe RA difference by 15 to change it to degrees; and (3) multiplying the RA difference bycos δ to take account of how the lines of constant RA ‘crowd together’ as you go off theequator. Convert your answer to minutes of arc (60ths of a degree), and compare it to thetypical 5 arcmin finder field of a large telescope.

5