Optical Pointing 29 Jun 99 (last change: 28 Feb 2002) The Optical Telescope Software: The optical pointing telescope is mounted behind the subreflector. It's CCD camera is read out by a PC running Linux, Kueppers. The PC is located on the Receiver level on the table to the left of the small access door leading to the elevation cabin. It seldom necessary to use the PC keyboard and monitor. Normally, one simply logs in Kueppers from Koeingsbacher, and even that is not needed unless one wants to change the focus, for example. Ordinarily, BEORGA sends commands to the PC to take an exposure. The PC runs two programs to access the CCD. The Optical Pointing Daemon, opd, runs in the background and sends commands to the camera. When an exposure is taken, the image is written to a file, raw.fit, in the directory /data/op/raw ( is a 5-digit sequence number). opd then searches the 768x512 pixel image for a star. If it finds one, it writes a 40x40 subframe centered on the (brightest) star and writes it in another file, red.fit in /data/op/red. ( is the same sequence number as in the raw file. To save disk space, opd usually retains only the latest 20 or so raw... files.) In addition, opd records information about the position of the star. First it calculates the az & el offsets and intensity of the centroid of the star. Then it fits two 1-d gaussians to the slices in azimuth and elevation through the center of the centroid. (The subframe is actually rotated by a specified amount and rebinned to compensate for the fact that the camera is not precisely aligned to the azimuth-elevation coordinate frame.) The raw... files are in FITS format and can be viewed with general purpose programs such as xv, but one usually only needs to view the red... files. The red... files can be viewed with the Optical Pointing data Browser, opb. In fact, if opd notices that no opb is running, it automatically runs one which will put its display on Koenigsbacher. When first started, opb displays the latest sub-image. It also has buttons for sequencing through the images or one can type the name of the red... file to display. The display shows the subimage, the two gaussian fits, and the location of the subimage in the full image. Details of the fit are printed. opd reads commands from an ethernet socket. BEORGA usually sends commands to it, but when changing the focus, for example, one might want to send it commands manually. To do this, log on to Kueppers as smtobs (same password as on Jever) and type sock OPOINT Type "help" to see a list of commands and "help " to see more details about the command, . The most common commands to use are "start" and "focus". To exit the sock program, press CTRL-C. Do not use the kill command, as this will stop opd. (Unless you log in as root, opd can only be restarted by rebooting Kueppers.) "start" takes another exposure. the -t option of start specifies the exposure time in milliseconds. (1000 is about right for a sixth magnitude star.) If unspecified, the previous -t value is used. The other start parameters are only for documentation purposes in the image file header. The focus command is used to change the focus. "help focus" claims that there's an auto mode and a manual mode, but the automatic mode doesn't work properly yet. In the manual mode, one specifies how many steps to move from the current position. When the focus command has been completed, the absolute position of the focus is printed. (Since there's no encoder, the position isn't really absolute. It is really the total number of steps taken since the last time the camera & focus controller was powered up. Since they are powered by the UPS, they seldom get powered off. The best focus is usually found within a few hundred steps of zero. When searching for the focus, one usually moves in 100 step increments. One can probably not see the effect of moving fewer than 10 steps (except for backlash effects; see below). There's a lot of backlash in the focus, so instead of driving directly to the command position, opd first commands the focus to a position a fixed amount away from the target and then commands it to the specified position. (So even if one commands the focus to move zero steps, the focus will first move away the standard amount, then back.) This approach gives more repeatible focusings, but the focus may continue to drift for several minutes (or more?) after moving it. Consequently, when the focus hasn't been moved for a long while. moving the focus by zero steps may make a change in the focus. One (untested) idea to minimize the above drift in the focus is to move to target position less a standard amount, BACKLASH0, as described above, drive to the desired position, then back up by a specified "relaxation" amount, BACKLASH1. These two quantities are specified in the file /etc/opdrc. If the file is edited, opd will read the new file. Prior to June 1999, the BACKLASH0 parameter was -2000. It is now +2000, but we don't yet know if one sign is better than another. Prior to June, BACKLASH1 was zero. It is not yet known if the current value of 100 is an improvement. Note that BACKLASH1 ought to have the same sign as BACKLASH0. The Star Catalogs: The stars used for optical pointing are from the FK5 catalog. They are stored in the usual CAT: directory. For convenience, the stars are written into separate catalogs according to their magnitude range. FK5_3-4.CAT, for example, contains the 3rd to 4th magnigude stars and FK5_M2-2.CAT contains -2 to 2 magnitude. FK5_ALL.CAT contains all the FK5 stars (above declination -45). There are listings in the control room of the various catalogs in a prettier format than the OBSINP format. Within each magnitude range, the stars are grouped by declination range. (These listings were made from the .LIS files in the CAT directory.) Taking Data: 1) Previously one had to force FAHREN to read the pointing model for the optical telescope by copying KDATA:[SMT.ASTRO]POINTCON.STAR to KDATA:[SMT.ASTRO]POINTCON.DAT then stopping and restarting FAHREN. Now, however, OBST automatically does this when you choose "optical" as the backend for observing (i.e. type "backend optical" at the OBST prompt). This spares the observer the admittedly awkward step of having to remember to copy POINTCON.STAR to POINTCON.DAT, stopping and restarting FAHREN, before beginning optical observations and then deleting the latest version of POINTCON.DAT with the optical pointing model after optical pointing observations are done. 2) Select a convenient bright star from the catalog listings for a test exposure. In OBST: SOURCE FK5-nnnn/CAT CAT:FK5_xxxx/DEF where FK5_xxxx is one of the catalogs above. FK5_2-3 is a good choice. While one could specify the FK5_ALL catalog, it will take a long time to read through its 4000 stars if you happen to select one that is not near the beginning of the catalog file. 3) Select the OPTICAL backend and take an exposure: BACKEND OPTICAL CTRACK/TIM 5 5/DEFAULT (or just SET TIME_CM 5 5 to set it up) (The CTRACK command also sets up for the appropriate observing procedure for the SEL_AZEL command below.) This should result in an exposure of the star you selected. An opb window should appear on Koenigsbacher with the results. (If no star was found in the frame, a message, OPTSTP NODATA READ will appear in the ERROR log window. The opb window will still pop up, but it will display a star from the last optical observing session.) 4) Because of the backlash problem, it is probably best not to move the focus if you don't have to, as by now any slow drift of the focus is probably compltete. But if the star looks out of focus, send focus commands to opd: Log on to kueppers as smtobs in a convenient window. Type sock OPOINT Sometimes, the focus has simply drifted and the backlash needs to be removed again. So move the focus out and back to where it is now: focus -m 0 This also prints out the current (absolute) focus position. Make a note of it so you could go back to it if your focusings make it worse. Take another exposure: start The exposure time will be the same as that selected by OBST in step 3). Or specify a new one in milliseconds, , by adding "-t " to the start command. Take several exposures until you're sure the focus has stopped drifting. If the final image is still out of focus, try moving the focus +-100 steps and take a few more exposures until you're satisfied with the focus, 5) Back in OBST, select a catalog for the automatic star selection command SET CATALOG_C CAT:FK5_xxxx.CAT SEL_INIT SEL_INIT command should print a message saying how many stars were read. FK5_ALL is usually a good choice unless the weather is too marginal to be going for faint stars. 6) Once the SEL_INIT command is done, SEL_AZEL , will select the nearest star to the azimuth & elevation & (degrees), move the telescope to that star, and take an exposure. Do a CORR F F to get the stars centered in the CCD frame. You can make up a FOR loop to go through the (az,el) pattern you desire, or use one of the macros already made up to do this. @[-.STAFF]ALLSKY 15 10 will observe a series of points spaced 15 degrees in azimuth and 10 degrees in elevation. A series of lines of constant azimuth will be observed, alternating up and down. The first series of lines will be done at twice the specified azimuth spacing beginning in the north. When the telescope has gotten back to the north, the lines skipped will be filled in, incrementing the azimuth in the opposite direction. @[-.STAFF]EL30N60 will observe a 4 circles of azimuth at a constant elevation. The first circle is done at 30 degrees, the next at 60 degrees, the third at 60 degrees again, and the last at 30 degrees. The direction of azimuth scanning reverses between circles. (If you told OBS your initials were STAFF, you can omit the [-.STAFF] in the above.) If you first set the first, last, and increment in elevation DEFINE REAL EFIRST ELAST EDELT/GLOBAL LET EFIRST x LET ELAST y LET EDELT z (The DEFINE need only be done once.) Then FOR I 1 TO 5 @TEL$OBS:UP_N_DOWN 60 NEXT will repeat the line at azimuth 60 degrees, five times, alternating the direction of elevation between up and down. (EFIRST, ELAST, and EDELT are also set by the ALLSKY macro, above.) Gotcha's: 1) Occasionally, something goes wrong with the OBSERVE program and it stops reading the input from Online Chef. Eventually, Online Chef fills its buffer and quits until OBSERVE reads its messages. Meanwhile OBSERVE continues to send CHEF messages. Eventually, it fills its buffer too and no longer tells OBST when an observation is finished. Thus the observing macro waits indefinitely for something to happen. Workaround: In an SMTSYS window, clear out the unread Chef messages: COPY CLAS_FITMBX TT: Then CHEF will read the backlogged messages from OBSERVE, and OBSERVE will finally tell the observing macro to go on to the next star. Strangely, OBSERVE will usually read subsequent messages from CHEF again (until it gets tired?). This may result in a few stars not being processed. See 3) below to cure this. 2) The opb window appears briefly then disappears. This usually happens when the Kueppers disk partition fills. Observing will continue, but you'll not be able to see the star images that are being fit. Workaround: Log in to Kueppers as smtobs: cd /data/op/raw df and see if the in fact the /data partition is full. If so, delete some files in the above directory. Do a ls to be sure you only see raw... files. If so, you can safely "rm *", unless there's some raw image you want to save (unlikely). 3) After running GOOD_POINT to process the optical data, you see gaps of scan numbers where there shouldn't be. It's possible that for some reason (such as #1 above), Online Chef didn't record the data. The data can be recovered manually: DEFINE TEL$OBSINI where is some convenient directory other then the real TEL$OBSINI directory. (This is simply to separate the new fits from those already done. If you don't mind appending them to the normal POINTING.DAT... file in the real TEL$OBSINI, omit this step.) CHEF FOR I to SCAN I SUBSCAN NEXT will process scan numbers through and write a POINTING.DAT... file in the directory. If you now run GOOD_POINT on that file, you'll have the missing data. N.B., to keep the time order straight, when the missing data is combined with the rest of the data, it would be wise to to move the missing data back into the normal sequential scan number order. This will make it easier for a human to see any artifacts, such as a drift with time, in the pointing fit program's output.