Whether you are using a classical equatorial telescope in your backyard, or an alt-az monster like the HET, you often find yourself asking one thing: where are my targets? The targets you are after will be listed in a table somewhere, and that table can have all sorts of formats. We want to use our table, which is hopefully available in a readble ASCII format (i.e. a text file), to select an object and point our telescope at it. Here I present such a table and show some ways that I deal with it. Near the end I use some extra-funky things that involve the HET (a funky scope if ever there was one), but most of this little demo should be generally useful.
We have a way to enter a list of targets into htopx2. However, the style of this input list is fairly rigorous and we may have to pre-process the list prior to submission to htopx2. The fairly general steps described here will help with this.
We have to start somewhere, and I start with the assumption that I have some kine of ASCII text file. In the example here, our list actaully started out as a Microsoft (2007) Word doc file. I had to transform it to my usual Open Source doc format, yadda, yadda. In the end, we all know this shit changes all the time. Suffice it to say, after a bit of hassle, I go the following file text file (that I named "Steve.1"):
% cat Steve.1 PG0216+032 02 16 43.0 +03 13 08 1950 sdOC 14.56 faint PG0310+149 03 10 49.9 +14 55 14 1950 sdO 15.5 faint G191B2B 05 05 30.6 +52 49 54 2000 DA0 11.78 best BD+75o325 08 10 49.3 +74 57 57 2000 O5p 9.54 v. far north PG0823+546 08 23 01.0 +54 37 58 1950 sdOC 14.4 faint PG0939+262 09 39 58.8 +26 14 42 1950 DA1 14.66 faint Feige 34 10 36 41.2 +43 21 50 1950 sdO 11.23 Very best EG81__ 11 34 51.3 +14 26 58 1950 sdO 13.21 faint HZ 21 12 13 56.4 +32 56 31 2000 D02 14.68 faint Feige 66 12 37 23.6 +25 04 00 2000 sd0 10.5 Feige 67 is better Feige 67 12 41 51.8 +17 31 20 2000 sd0 11.81 best HZ 44 13 23 35.4 +36 08 00 2000 sd0 11.66 best PG1545+035 15 45 53.9 +03 32 03 1950 sdOB 14.3 faint PG1708+602 17 08 35.9 +60 13 52 1950 sdOC 13.7 faint BD+28o4211 21 51 11.1 +28 51 52 2000 0p 10.51 Red companion BD+25o4655 21 59 39.3 +26 25 42 2000 9.6 best Feige 110 23 19 58.4 -05 09 56 2000 D0p 11.82 Very best GD 50 03 48 50.1 -00 58 30 2000 DA2 14.06 faintPretty easy to read, right! Not really. But we're off to a good start. The first item on each line is obviously the target name. The next items are the RA and DEC, followed by a (Variable!) equinox. Then we get to we have a spectral type, a magnitude, and a comment. Some of the target names and comment strings have "white-spaces". These will make life hard when we get to cutting up the list with things like awk and some of our custom bash scripts. So, right off the bat, I use vi, or emacs, or what ever modern text editor I like to make a few manual fixes and create the following list (that I named "Steve.2"):
% cat Steve.1 PG0216+032 02 16 43.0 +03 13 08 1950 sdOC 14.56 faint PG0310+149 03 10 49.9 +14 55 14 1950 sdO 15.5 faint G191B2B 05 05 30.6 +52 49 54 2000 DA0 11.78 best BD+75o325 08 10 49.3 +74 57 57 2000 O5p 9.54 very_far_north PG0823+546 08 23 01.0 +54 37 58 1950 sdOC 14.4 faint PG0939+262 09 39 58.8 +26 14 42 1950 DA1 14.66 faint Feige_34 10 36 41.2 +43 21 50 1950 sdO 11.23 Very_best EG81__ 11 34 51.3 +14 26 58 1950 sdO 13.21 faint HZ_21 12 13 56.4 +32 56 31 2000 D02 14.68 faint Feige_66 12 37 23.6 +25 04 00 2000 sd0 10.5 Feige_67_is_better Feige_67 12 41 51.8 +17 31 20 2000 sd0 11.81 best HZ_44 13 23 35.4 +36 08 00 2000 sd0 11.66 best PG1545+035 15 45 53.9 +03 32 03 1950 sdOB 14.3 faint PG1708+602 17 08 35.9 +60 13 52 1950 sdOC 13.7 faint BD+28o4211 21 51 11.1 +28 51 52 2000 0p 10.51 Red_companion BD+25o4655 21 59 39.3 +26 25 42 2000 None 9.6 best Feige_110 23 19 58.4 -05 09 56 2000 D0p 11.82 Very_best GD_50 03 48 50.1 -00 58 30 2000 DA2 14.06 faintNotice what I did? I changed the white-space parts of target names and some of the cooment strings to under_scores. I also added a "None" string to an empty column that was in the 3rd to the last data line (no Spectral type, so it was left blank). Now, I know we all might do this diffierently. Someone my want to use "DoodleFlop_2.3.4.exe" to do this (of course use 2.3.4, since 2.3.3 is soooo last month). I say, if you have a better way, do that.
This example is a bit of an overkill. Usually most Ra,Dec strings will have a colon (:) delimeter, or will perhaps use "hms" syntax. In any case, the Ra and Dec will come in TWO strings. We see above that we have 6 strings (separated by white spacee). Also, because our names and spectral types have different number of characters, it may be difficult to survey the different columns. We can use the unix "awk" command to pretty quickly take care of this. My brain is small, so I have some simple notes on awk and sed that I often refer to for stuff like this. Just as a sanity check, I use awk to grab out a column near the end of my lines (the V magnitude in this case) and print it. If I have an empty column somewhere or I did not correct a white-space in one on my target names, then I'll see something in my list that does not appear to be magnitude. I'll go back and correct that line and do this exercise again until all of the output lines make sense! Since my mags are the 10th entry on each line, I do this:
% awk < Steve.2 '{ print $10 }' > New_file % cat New_file 14.56 15.5 11.78 9.54 14.4 14.66 11.23 faint 14.68 10.5 11.81 11.66 14.3 13.7 10.51 9.6 11.82 14.06Oops, looks like something is weird in line 8! I looked in Steve.2 and saw that I put and underscore between the (short) target name and the HOURS part of the RA string. I fixed this up and ran again. BTW, I could just dump all of the this to standard out, but I want to get used to writing to a file as my final product. Now I do the job again, but I wan to print two things: the spectral type and the magnitude. Also, I wan to switch their order compared to how they sit in Steve.2:
% awk < Steve.2 '{ print $10" "$9 }' > New_file % cat New_file 14.56 sdOC 15.5 sdO 11.78 DA0 9.54 O5p 14.4 sdOC 14.66 DA1 11.23 sdO 13.21 sdO 14.68 D02 10.5 sd0 11.81 sd0 11.66 sd0 14.3 sdOB 13.7 sdOC 10.51 0p 9.6 None 11.82 D0p 14.06 DA2Looking pretty good now! At this point I could build one horrendous awk command line that would process each of my lines. Not my style. Below I show how I pull out the Ra and Dec data and make more readable RA strings:
% awk < Steve.2 '{ print $2":"$3":"$4 }' > list.RA % head -5 list.RA 02:16:43.0 03:10:49.9 05:05:30.6 08:10:49.3 08:23:01.0 % awk < Steve.2 '{ print $5":"$6":"$7 }' > list.DEC % head -5 list.DEC +03:13:08 +14:55:14 +52:49:54 +74:57:57 +54:37:58Just to make a short story long, I can cut up my big file to make single column files, on for each of my other quantities:
% awk < Steve.2 '{ print $1 }' > list.names % awk < Steve.2 '{ print $8 }' > list.equinox % awk < Steve.2 '{ print $9 }' > list.spectype % awk < Steve.2 '{ print $10 }' > list.mag % awk < Steve.2 '{ print $11 }' > list.comment % wc -l list.* 18 list.comment 18 list.DEC 18 list.equinox 18 list.mag 18 list.names 18 list.RA 18 list.spectypeIn the last command line I just make a check that all of my list.* files have the same number of lines (18 lines for my 18 stars) Finally, we can assemble a combined file using any order we like using the handy unix facility named "paste". Below I show how I make such a listing:
% paste list.RA list.DEC list.equinox list.names > Steve.3 % cat Steve.3 02:16:43.0 +03:13:08 1950 PG0216+032 03:10:49.9 +14:55:14 1950 PG0310+149 05:05:30.6 +52:49:54 2000 G191B2B 08:10:49.3 +74:57:57 2000 BD+75o325 08:23:01.0 +54:37:58 1950 PG0823+546 09:39:58.8 +26:14:42 1950 PG0939+262 10:36:41.2 +43:21:50 1950 Feige_34 11:34:51.3 +14:26:58 1950 EG81__ 12:13:56.4 +32:56:31 2000 HZ_21 12:37:23.6 +25:04:00 2000 Feige_66 12:41:51.8 +17:31:20 2000 Feige_67 13:23:35.4 +36:08:00 2000 HZ_44 15:45:53.9 +03:32:03 1950 PG1545+035 17:08:35.9 +60:13:52 1950 PG1708+602 21:51:11.1 +28:51:52 2000 BD+28o4211 21:59:39.3 +26:25:42 2000 BD+25o4655 23:19:58.4 -05:09:56 2000 Feige_110 03:48:50.1 -00:58:30 2000 GD_50Now I have a list that is easy to view and can be read by various bash scripts that I'll use to manipulate the data.
We commonly need to precess the coordinates in a list like we made in the above section. I use the script named precess_list to do this step. It takes a file of Ra,Dec,Equinox,Name values (like Steve.3 above) and precesses each line to a common equinox specified by the user:
% precess_list Steve.3 2000.0 Steve.4 % cat Steve.4 02:19:18.9289 +03:26:53.947 2000.0 PG0216+032 03:13:36.9537 +15:06:23.914 2000.0 PG0310+149 05:05:30.6009 +52:49:53.994 2000.0 G191B2B 08:10:49.2989 +74:57:57.008 2000.0 BD+75o325 08:26:50.4240 +54:28:05.605 2000.0 PG0823+546 09:42:51.1578 +26:00:57.465 2000.0 PG0939+262 10:39:36.8852 +43:06:10.981 2000.0 Feige_34 11:37:26.7934 +14:10:21.167 2000.0 EG81__ 12:13:56.3995 +32:56:30.999 2000.0 HZ_21 12:37:23.5970 +25:04:00.003 2000.0 Feige_66 12:41:51.8008 +17:31:20.001 2000.0 Feige_67 13:23:35.4030 +36:08:00.006 2000.0 HZ_44 15:48:24.2461 +03:22:54.021 2000.0 PG1545+035 17:09:15.8395 +60:10:10.497 2000.0 PG1708+602 21:51:11.1044 +28:51:52.001 2000.0 BD+28o4211 21:59:39.3045 +26:25:42.000 2000.0 BD+25o4655 23:19:58.4024 -05:09:56.000 2000.0 Feige_110 03:48:50.0999 -00:58:30.000 2000.0 GD_50Now I have a fairly readable object list with all coordinates in the 2000.0 equinox.
Now we can use a final paste command and put the contents of some of our list.* back into a single big file:
% paste Steve.4 list.mag list.spectype list.comment > LRS2.list % cat LRS2.list 02:19:18.9289 +03:26:53.947 2000.0 PG0216+032 14.56 sdOC faint 03:13:36.9537 +15:06:23.914 2000.0 PG0310+149 15.5 sdO faint 05:05:30.6009 +52:49:53.994 2000.0 G191B2B 11.78 DA0 best 08:10:49.2989 +74:57:57.008 2000.0 BD+75o325 9.54 O5p very_far_north 08:26:50.4240 +54:28:05.605 2000.0 PG0823+546 14.4 sdOC faint 09:42:51.1578 +26:00:57.465 2000.0 PG0939+262 14.66 DA1 faint 10:39:36.8852 +43:06:10.981 2000.0 Feige_34 11.23 sdO Very_best 11:37:26.7934 +14:10:21.167 2000.0 EG81__ 13.21 sdO faint 12:13:56.3995 +32:56:30.999 2000.0 HZ_21 14.68 D02 faint 12:37:23.5970 +25:04:00.003 2000.0 Feige_66 10.5 sd0 Feige_67_is_better 12:41:51.8008 +17:31:20.001 2000.0 Feige_67 11.81 sd0 best 13:23:35.4030 +36:08:00.006 2000.0 HZ_44 11.66 sd0 best 15:48:24.2461 +03:22:54.021 2000.0 PG1545+035 14.3 sdOB faint 17:09:15.8395 +60:10:10.497 2000.0 PG1708+602 13.7 sdOC faint 21:51:11.1044 +28:51:52.001 2000.0 BD+28o4211 10.51 0p Red_companion 21:59:39.3045 +26:25:42.000 2000.0 BD+25o4655 9.6 None best 23:19:58.4024 -05:09:56.000 2000.0 Feige_110 11.82 D0p Very_best 03:48:50.0999 -00:58:30.000 2000.0 GD_50 14.06 DA2 faintOne more quick point: as we'll see in the nex section, we also want a more stripped down list of Name,Ra,Dec. Given what we've just discussed above, this is now easy:
% awk < LRS2.list '{ print $4" "$1" "$2 }' > list.targets % cat list.targets PG0216+032 02:19:18.9289 +03:26:53.947 PG0310+149 03:13:36.9537 +15:06:23.914 G191B2B 05:05:30.6009 +52:49:53.994 BD+75o325 08:10:49.2989 +74:57:57.008 PG0823+546 08:26:50.4240 +54:28:05.605 PG0939+262 09:42:51.1578 +26:00:57.465 Feige_34 10:39:36.8852 +43:06:10.981 EG81__ 11:37:26.7934 +14:10:21.167 HZ_21 12:13:56.3995 +32:56:30.999 Feige_66 12:37:23.5970 +25:04:00.003 Feige_67 12:41:51.8008 +17:31:20.001 HZ_44 13:23:35.4030 +36:08:00.006 PG1545+035 15:48:24.2461 +03:22:54.021 PG1708+602 17:09:15.8395 +60:10:10.497 BD+28o4211 21:51:11.1044 +28:51:52.001 BD+25o4655 21:59:39.3045 +26:25:42.000 Feige_110 23:19:58.4024 -05:09:56.000 GD_50 03:48:50.0999 -00:58:30.000
Now we've arrived at the true purpose of this doc. You have been handed a list of (Name,Ra,Dec) by visiting astronomer X, and now you must answer the question: "Which targets are observable now?". By a variety of means you can lear what NOW is in terms of LST (local sideral time). The routine "my_targets" can now be used to produce the list of observable targets. Suppose your time of interest is LST=10:30:45.0, then your goal is accomplished with:
% my_targets % my_targets list.targets 10:30:45.0 PG0823+546 08:26:50.4240 +54:28:05.605 323.375 Feige_66 12:37:23.5970 +25:04:00.003 89.325 Feige_67 12:41:51.8008 +17:31:20.001 103.694 HZ_44 13:23:35.4030 +36:08:00.006 69.620