Here I describe a way to get a list of [Ra,Dec,Name] values into htopx2. Sergey R. has written a way for us to enter a csv (comma separated value) file into a temporary htopx2 catalog. We must have the RA values in units of HOURS and the Dec values in units of DEGREES. This makes real-time target selection easier during the night. In the example below I parse the initial file to remove some Mac-style end of line characters. After realizing that the Ra are in DEGREE usints, I compose a short bash script to convert Ra to HOURS and write a new csv file.
STEP 1: My initial list is a comma-delimited, Mac-line ending file named forHETlist_1.csv: % cat forHETlist_1.csv In a unix/linux system we'd see a long single string of stuff. Not useful First we need to remove the Mac end of lines: Method 1, we sue sed: % sed 's/\r/\n/g' forHETlist_1.csv > List.0 Method 2, we use "tr" % tr '\r' '\n' < forHETlist_1.csv > List.0 --------------------------------------------------------------------------- From th web: The Unix program tr is used to translate between two sets of characters. Characters specified in one set are converted to the matching character in the second set. Thus, to convert the Ctrl-m of a Mac OS text file to the line feed (Ctrl-j) of a Unix text file, at the Unix command line, enter: tr '\r' '\n' < macfile.txt > unixfile.txt Here, \r and \n are special escape sequences that tr interprets as Ctrl-m (a carriage return) and Ctrl-j (a line feed), respectively. Thus, to convert a Unix text file to a Mac OS text file, enter: tr '\n' '\r' < unixfile.txt > macfile.txt --------------------------------------------------------------------------- Using either way, we get: % cat List.0 18.4373,15.6834,SDSS J011344.94+154100.3 19.3671,14.7044,SDSS J011728.10+144215.9 19.7441,-0.4351,SDSS J011858.59-002606.4 20.3873,-0.9699,SDSS J012132.95-005811.7 21.2039,0.91,SDSS J012448.92+005436.0 255.2481,24.4331,SDSS J170059.53+242559.0 262.0739,60.0154,SDSS J172817.72+600055.0 333.8174,-9.2632,SDSS J221516.18-091547.6 STEP 2: Get RA in units of hours. **** Everyone would have their own way here. I would write a bash script: #!/bin/bash # Check command line arguments if [ -z "$1" ] then printf "\nUsage: fix_targets file.in\n" printf "arg1 - name of csv input file \n" exit fi # remove the commas from the original list ($1) sed 's/,/ /g' $1 > temp.0 # Process each line in the input file # NOTE: I use my own "fpmath.sh" to divide each radeg # by 15 to get HOURS. You could use the Unix "bc" command exec 3ra_hrs read rahours < ra_hrs printf "$rahours,$decdeg,$name\n" done # clean up \rm -f ra_hrs temp.0 Then, to get my final file: % fix_targets List.0 1.229153,15.6834,SDSS J011344.94+154100.3 1.291140,14.7044,SDSS J011728.10+144215.9 1.316273,-0.4351,SDSS J011858.59-002606.4 1.359153,-0.9699,SDSS J012132.95-005811.7 1.413593,0.91,SDSS J012448.92+005436.0 17.016539,24.4331,SDSS J170059.53+242559.0 17.471594,60.0154,SDSS J172817.72+600055.0 22.254494,-9.2632,SDSS J221516.18-091547.6 % fix_targets List.0 > My_file_for_htopx.csv
The file "My_file_for_htopx.csv" can now be read directly into the lrs2temp catalog in htopx2. Here are the steps I use for this, where I have placed the file into the astronomer home directory (renamed as "T.csv").
[astronomer@mcs ~]$ ls /home/mcs/astronomer/T.csv /home/mcs/astronomer/T.csv * In htopx2 I selected from "Catalogues" the entry "LRS2temp". " In the tab with the entry "enter file name" I type the full path name of my file: /home/mcs/astronomer/T.csv * Move the cursor out of the tab and click * Hit "Okay" in the pop-up box * Hit updat to see targets (after you set a long "Time to Track" of, for eaxmple, 1440)This gets your targets into htop. To remove them you must select a target by doing a left-click on the ID number. A small box pops up and you hit the "Delete target" button (the OK). Thi s is tedious, but reasonably useful for short lists. If the list is large (hundreds of targets), then we are to call Sergey and he will manually delete the catalog contents.