NOTE: Portions of this document are obsolete as of March 03, 2011

For further info please contact: P200 Support Last modified: May 25, 2013; by Kevin Rykoski

Eric Bloemhof wrote most of this document.


This COOKBOOK gives a step-by-step guide to operation of PALAO (Palomar Adaptive Optics) at the Palomar 200" telescope. For a description of the instrument and information needed for advance planning of an observing run, go back to the PALAO homepage and click on the OVERVIEW button. As of this update (2004) an observing run with AO divides the labor in the following way. The night assistant is responsible for the telescope and AO operation. The observer is responsible for PHARO the science camera. The following document was originally written to give an overview of both AO and PHARO. It is a very useful reference in outline form to understand all that goes on during observations. However, the first time observer does not need to be completely conversant with the night assistant's resposibilities. Use the web pages as an introduction, and the support astronomer will give you instruction on the system to fill in the blanks (especially PHARO) when you get to Palomar.

Despite its intended real-time usefulness, the COOKBOOK contains nuggets of instrument theory here and there that might require some time to of course a thorough reading in advance of the observing run is recommended to avoid unpleasant surprises at the telescope. (Failing this, night assistants carry extra Kleenex).


  1. Get to the telescope no later than 2:00 PM on the afternoon of your first night to make contact with the set-up crew, and the support astronomer (Jeff or Rick). The set-up crew goes off at 4pm, and the support astronomer is on from noon to 10pm. The support astronomers share an office just off the control room for the 200".

  2. Arrive with AT LEAST TWO 8-mm Exabyte tapes per night of observing (it is possible to obtain more than 2,000 images, each 4.2 Megabytes, in a night); The PHARO computer is EZRA2. If you prefer archiving to DVD, the WIRC computer in the 200" control room has that capability, ask the support astronomer about sftp'ing to WIRC and burning DVDs.

  3. The day crew will handle all liquid nitrogen fills for the PHARO dewar. The PHARO dewar holds for 24 hours. If you are interested, ask one of the daycrew to show you how to check Pharo's temperature. This is a quick and simple way to check that the dewar is holding.

  4. HARBOR is the AO control computer. The daycrew may already have this up and running when you arrive.

  5. Initial system alignment and checkout tasks will be carried out by the support astronomer, and are listed in the palaosetup html. Go to PALAOSETUP if you are interested...

  6. Aligning the pupil and determining the centroid offsets, are also undertaken by the support astronomer in the afternoon. These tasks are very important for optimzing the AO correction. If there is time, it useful (but not critical) to see how this is done.

  7. An excellent time to review the PHARO GUI is after the system is tuned up, and before you go to dinner. Have the support astronomer show you all the PHARO functions. Controls include; camera, dithering, filters, slits, apertures, masks, nods, image diagnostics, and error display. More will be said about Pharo later. There is also the link to the Cornell PHARO page on the PALAO homepage.

  8. Obtain (PHARO) dark(s): use the internal PHARO dewar block...i.e., set the Lyot filter wheel to BLOCK. It's best to have darks for each integration time you plan to use during the run. Take a few to be safe and perhaps to allow median filtering. Then go to dinner.


    1. (Normal) startup of PHARO:

      1. Open some xwindow and check disk space is adequate via "df -k" command; if not, scrape the /scr1 disk

      2. Create a custom subdirectory of /scr1 for your data, if desired, that may be labelled with your name and the "mkdir /scr/eeb00jul23"

      3. You'll want to have PALAO up and running before you start PHARO (or else restart PHARO later) to get proper communication with TCS and hence proper display of telescope quantities (RA, Dec, etc) in the window at lower left on PHARO's screen. Check with the support astronomer for information on PALAO current status.

      4. Run the program via "xpharo" will be prompted for the subdirectory into which data should be written, and the names of the observers

      5. You are pretty much free to crash and restart xpharo any time; you'll just lose a couple of setups on the PHARO screen (e.g. the green crosshairs; the display settings). You should have the Lyot wheel BLOCKED before you crash/reenter, for safety.

      6. Inspect the small message window that shows beneath the PHARO sure that current telescope positions are being displayed, instead of just zeroes, and exit/reenter xpharo if there's a problem.

      7. Take a "quick" image or two (not saved to disk)...even with Lyot wheel blocked, you should see a little dark-image structure

    2. The XPHARO gui and display screens;

      1. The lefthand monitor...

      Above is a snapshot of the lefthand monitor on Ezra2. After you start xpharo, and fill in the data path pop-up this is what you will see.

    3. The lefthand monitor;

      1. The lower left window is the Xpharo camera GUI. In this window you will control exposures, filters, grisms, apertures, fields of view, and macros. At the bottom of this window is an ever changing camera status window. This is the single most important window, there will be much more to say about this GUI which is actually an analog layout of the Pharo optical path.

      2. The upper left window partially hidden behind the Xpharo Plot window, is a console status window. This window gives status updates on mechanical movement within the Pharo dewar. It is especially valuable for trouble shootting mechanical problems.

      3. The Xpharo plot window is an excellent tool for determining image quality. Used in conjunction with the tools in the Xpharo display window, Xpharo plot can give information on, image Strehl, uncorrected seeing, and corrected PSF/FWHM.

      4. The right side window is, not surprisingly the Xpharo display window. This window gives detailed information on the entire Pharo image with it's capability to "zoom in" on observer designated features.

      5. As mentioned in item #1, there will be more to say about each of these windows. It is also wise to look at the Pharo manual, which has a link on the PALAO homepage.

    4. The righthand monitor;

1. This monitor display is dominated by the full 4 quadrant Pharo image.

2. On the left are 4 display and control areas.

3. At the top is a display that shows the type of image (eg. reference), what buffer is being displayed (eg. background), the image max/min, the "green" box max/min, and the green box stretch mode (eg. zoom box).

4. The next box down selects the size in pixels of the green zoom box displayed on the Pharo image (eg. 128 X 128 )

5. The next box down selects green crosshairs and lines that are used to mark slits, spots, and target positions. Simply click on A or B and a crosshair or line will appear on screen. To move the fiducial markers around, all you need to do is click and drag. The col and row indicators display marker column and row pixel position on the image.

6. The final box at the bottom, which is blank in this example, sometimes indicates cardinal image direction. At the moment this is a buggy feature which is being looked at. Re-starting Pharo sometimes restores this feature.

7. A section will be added to this document at a later date which goes into more detail on GUI selections, but for the moment refer to the above images when this text referes to GUI commands. Also check the PALAO link to the Cornell Pharo manual.

    1. Obtain (sky or dome) PHARO flats for each filter/platescale combo you'll use. For sky flats:

      1. Use the chart of detector counts vs. time (after sunset)/(before sunrise), found in the blue PHARO manual, as a check. You'll have to be set up on the sky (PALAO on, open to sky, just a flat DM) monitoring counts at least 15 minutes before sunset for broadband (J,H,K,K',Ks); narrowband require being on an hour or two earlier (check with crew regarding the rules of telescope/G-star proximity)

      2. Work fast; suitable sky brightness lasts only 20 or 30 minutes.

      3. Cycle through the suite of filters you'll do science with.

      4. For each filter, get about 5 different 10-second exposures that span a good range (a few tens of thousands) of counts as the sun rises/sets . For flats through neutral-density filters, you may have to make do with fewer counts.

      5. Point the telescope at zenith and let earth rotation smear out any stray stars in your way.

      6. Remember that narrow-band filters may need to be done well before sunset or after sunrise, and at longer integration times, to get enough counts, brighter sky is preferable to longer integration to get the counts (to avoid those stray stars).

    2. Flats are generally believed to be constant over an observing run, so long as nothing in the optical setup is changed

    3. Find a good telescope focus. Once you are ready do some science, the night assistant will want to look at an SAO star near zenith to check and set up several things. The night assistant will want to check pointing, get a rough focus (see below), and get an uncorrected seeing value from PHARO. To get the uncorrected seeing expose on the SAO star for 30 to 60 seconds with no AO correction. The support astronomer will show you the tools for estimating the seeing on the PHARO GUI.

      1. Start with the telescope focus set to 56.5 mm .

      2. Image a bright (V<9 mag) star, with flat_map on DM (AO unlocked), and use the hand-paddle to roughly focus the image on either PHARO or the acquisition camera. It is quicker to focus with the acquisition camera due to the higher frame rate.

      3. You just need to find a rough focus because AO will focus more precisely later, when you close the loop on any star (and it will quickly offload any large focus term from DM to telescope).


    Note: in the following outline the night assistant will carry out all the PALAO GUI commands. The observer would be wise to understand what is going on but is only resposible for PHARO operation.

    1. night assistant; Generally, the basic pattern follows the buttons in the central part of the PALAO GUI toolbar from left to right (not including the T/T and DM lock buttons at left, or SHUTDOWN button at right)...

    2. night assistant; The ACQUIRE SOURCE sub-GUI should be set to "Star/sky", rather than "white light"...after setup on whitelight source at beginning of night, you should have put source to "Star/sky", closed this sub-GUI, and generally forgotten about it for the rest of the night

    3. night assistant; Point telescope to new object...

      OBSERVER: CAUTION, ALWAYS BLOCK PHARO'S INTERNAL LYOT STOP DURING LARGE TELESCOPE MOVES to avoid frying science CCD...but the visible-light WFS CCD need not be protected from strong light]

      1. night assistant; Acquire the guide star on PALAO's acquisition camera (small video monitor; camera is labeled ACQ in Figure below). Field of view here is small...only 10 or 20 arcsec.

      2. night assistant;Faint stars (l.t. V = 10 or so) are not visible on the acquisition monitor...instead, acquire them by watching the WFS display light up. A useful trick is to TEMPORARILY turn down the speed of the WFS camera to 25 Hz while steering guide star onto it (turn it up again before starting science or getting a fresh WFS sky frame).

      3. night assistant, with observer's help; PHARO itself, especially with 40 arcsec FOV, is a useful acquisition tool...never hurts to leave a fiducial cross around marking the WFS "hotspot". You can steer the source there with "continuous acquisition" mode of PHARO, and then the visible light has to be hitting the Field Stop and going into the WFS.

    4. night assistant; Use the Palomar hand-paddle to bring the star onto the Field Stop (small 4 arcsec square silvered pickoff mirror drawn in grease pencil on ACQ CAM moniitor)...WFS display should then light up

    5. night assistant; Press the SET WFS CAM button on PALAO toolbar, for choosing rate, gain, and bias settings of the wavefront sensor camera, depending on guide star magnitude and seeing...

      1. night assistant; Choose the fastest rate consistent with seeing...if the WFS shows no discernible wind direction, you might try turning the rate down (permitting fainter guide stars)

      2. night assistant; Choose the highest gain (smallest e/DN number) that does not give counts greater than 10,000 on the WFS camera.

    6. night assistant; Open the TAKE WFS SKY sub-GUI from the TAO GUI toolbar, to obtain a fresh "WFS-sky", a.k.a. "WFS-dark", a.k.a. pixel offset, file.
      NOTE: alone among all the sub-GUIs, this one prevents other buttons from being active while it's open.

      1. night assistant; The observer should be told, and probably note in the PHARO log, when a fresh wfs sky file is will affect imaging. Keep everything the same, particularly the wfs sky file and the pupil registration, if the PSF is to be kept constant (eg between SRC and PSF CAL, dithers, coronographic rotation).

      2. night assistant; Obtaining a fresh wfs sky is optional if WFS camera settings have not changed, but wise and easy to do...certainly, if you use a pixel offset file not matching current WFS settings (eg you have loaded and visible via print_conf "po500Hz68g41o" but camera speed is 250 Hz) you're doing a new kind of science.

      3. night assistant; A fresh wfs sky is particularly important during changing twilight, if the moon has just risen or set, or if you point to an object near the moon.

      4. night assistant; Set pointing offset magnitude to 60 (arcsec), say, then hit the direction arrow of your choice

      5. night assistant; When telescope is there, hit "Create & Load Pixel Offsets" bar (wait till the messages below the bar say "On Point")

      6. night assistant; This is quite slow (minute or two?) at low camera rates (eg 50 Hz), a few seconds at 500 Hz, but when it's done the new table is automatically loaded (a message to that effect appears)

      7. night assistant; Then hit the opposite direction arrow from the first one you star should zoom right back onto WFS (generally, it's within capture range of T/T, so you don't need to tweak pointing)

    7. night assistant; Press the REGISTER DM button on PALAO toolbar, for checking alignment of pupils (DM to WFS):

      1. night assistant; The observer should be told, and probably note in the PHARO log, when the pupil registration is may affect imaging. Keep everything the same, particularly the pixel-offset file and the pupil registration, if the PSF is to be kept constant (eg between SRC and PSF CAL).

        Note items 2 thru 9 are now obsolete. Coarse and fine registration are now done automatically by simply selecting either the coarse, fine, or "both" buttons and then hitting apply in the Register DM window. I include items 2 thru 9 in case the automatic algorithm fails, and as an excellent reference for what should be seen during the automated process.

      2. You may want to lock the T/T loop (only) and TEMPORARILY reduce the WFS camera rate before you look at the pupil test patterns, particularly if the guide star is faint.

      3. Apply FINE pupil test pattern (used to be called CHECKMAP), then use REGISTER DM sub-GUI buttons to sharpen up pupil quality... use about 30 units per click to start, 10 units for fine adjust

      4. You want dark streets separating a 16x16 array of sharp, symmetric squares.

      5. This will bring DM actuators into alignment with the subapertures of the WFS

      6. If worried that you might be a whole subaperture off, apply the COARSE pupil test pattern (used to be called RINGMAP)... you'd have to be about 180? PUPIL units off to be out of alignment by one subaperture (would definitely not lock if you were, and the WFS display would show some vignetting at corners as well)

      7. (The pupil alignment will never drift a whole or even a half subaperture off by itself, but rebooting the system could put you back in a far-from-aligned state).

      8. With COARSE, you want a single large square pattern centered on the display, so there should be 5 bright quad cells (subapertures of the WFS) on all four sides of that square.

      9. Apply the OFF selection near COARSE and FINE (this loads what used to be called FLATMAP onto the DM), and touch up centering on WFS display with IMAGE GUI buttons.

    8. night assistant; Press the SET SERVO GAINS button on PALAO toolbar, if you wish to adjust the current values of the integral/proportional gains on the T/T and DM loops

      1. night assistant; Remember that here, as elsewhere in this GUI, the numbers displayed do not actually enter the system until you hit the "Apply" button

      2. night assistant; To check current values, try print_conf in the VxWorks window at left side of LH AO monitor

    9. night assistant; Lock T/T (=FSM) then DM...

      1. night assistant; Make sure WFS display looks OK, without "cracking"...dark regions driven to actuator rails

      2. night assistant; With each new lock, look at the values of subaperture flux and dm_residuals, taken from the real-time plots on the upper-left desktop of the right-hand PALAO monitor

    10. [When it's time...] Unlock in reverse order (DM then T/T). (If you open the T/T loop first by mistake, the FSM will rail...easily fixed by the following two commands:

      ao move fsm_{a,b} 0

      Unlock the loops before moving telescope to a new source, or moving off by an arcminute or so to take SKY images, or dithering by more than 5 arcsec. Otherwise, in addition to possible T/T mirror railing, the SSMs will get out of alignment. This is fixed (after opening the loops) by giving four commands:

      ao reset ssm{1,2}_{a,b}

    11. night assistant; Tell PHARO operator that he is free to take images...(and make small dithers, up to 5 arcsec, and lock/unlock loops from PHARO, etc)

    12. night assistant; To get the real-time plots going: (needs at least T/T lock on)

      1. You will want to start the DM residuals, and DM position plots started from the TAO window first before the IDL plots. If you start the IDL plots first, you will get an ugly color map on the IDL plots.

      2. Use a window in the right-hand HARBOR monitor

      3. cd to /data/scratch

      4. Type "IDL"...wait for this package to start up

      5. Type "go"...this launches our custom plot software

      6. When the GUI shows up, press the "Display Plots" button and watch the 3 plots appear.

      7. If the system locks up and you have re-"start_ao -tcs", it is best to exit/quit IDL and then re-start the IDL plots as in steps 2 thru 6.


    OK. Observers this part is for you.

    After the PALAO console has been used to achieve a good lock on the new guide star, most of the action occurs at the PHARO console. Small (5 arcsec) closed-loop dithers and even locking/unlocking the loops can be done remotely from PHARO.


    1. DO NOT MOVE THE "SHUTTER" (located in the middle of the PHARO GUI)...just leave it open. It could get stuck in the closed position if moved, requiring days to fix.

    2. ALWAYS BLOCK PHARO'S INTERNAL LYOT STOP DURING LARGE TELESCOPE MOVES to avoid frying science CCD...but the visible-light AO/WFS CCD need not be protected from strong light]

    3. Turn off "Continuous Acquisition" mode before taking an image or moving a motor.

    4. Be very careful when using the tweak option on a motor's pull down menu. It is possible to overwrite the motor position default calibration file. It is better to home the motor and try the move again. Putting the Carousel wheel in pupil mode can help determine if a wheel has not moved correctly. Ask Rick or Jeff to give you an in depth education on the tweak function, and it's pitfalls.

    5. Make small (no more than 5 arcsecond) dithers of the telescope while loops are locked (not really for safety, but to keep tip/tilt and SSM mirrors happy and loops locked).


    1. There are two set of image buffers: "regular" and quick, you take an image into one or the other with the upper/lower rows of image-taking buttons, and you may choose their integration times independently in the white rectangles immediately above those. ["Regular" is not called is the row "Take Src & Write Diff" etc].

    2. Quick is always a single image, and not written to disk. You use it to scout out the situation, perhaps to check the field or exposure time. "Regular" will take as many images as you choose in the "# cycles" box, and write them all to disk. Use this option for your science observing.

    3. Within those divisions, there are two more kinds of image buffers: source/background...these are addressed with the left/right columns of image-taking buttons, and are referred to in the display window as src/bgd. If you obtain a background on dark sky, you may display the more sensitive background-subtracted difference.

    4. Any image, regular or quick, source or background, is made up of two readouts of the CCD chip, called "signal" and "reference". Except in engineering modes, you will generally want to work only with the "difference" of these.


    REMEMBER: for objects fainter than about 10th mag at V (current limit of PALAO's acquisition camera), PHARO's continuous-acquisition imaging mode is a powerful acquisition tool
    ...and it has a wider field of view than PALAO's acquisition camera...

    1. At start of setup, make sure "LYOT" wheel is set to "block" (as with most selections, a pull-down menu option)

    2. Select plate scale (25 mas or 40 mas pixels) by selecting 25/40 arcsec field on "SLIT" wheel, and 25/40 mas on "CAROUSEL"

    3. Select spectral and (optionally) neutral-density filters from the assortment offered on the "FILTER" and "GRISM" wheels

    4. The "SHUTTER" wheel should be set to "open" (DON'T MESS WITH may get stuck). The shutter is intended for future automated use with the Laser guide star upgrade.

    5. Enter an integration time, in milliseconds, in the "Quick Time" box (2000 = 2 seconds is the shortest for the full array)...the box will alter it slightly while accepting it, to fit chip readout specs

    6. When setup is all ready, move the "LYOT" wheel to the setting of choice, most likely "Standard Cross", which has the basic pupil-plane (Lyot) mask designed to cover the aperture and spiders of the telescope

    7. Hit the "Quick Src" button, and in a few seconds an image should be displayed.

    8. Hit the "Cont Acq" button if you wish, to continually obtain new images (none saved); remember to press it again to exit before doing other things.

    9. For more information download the PDF Cornell Pharo manuals at and To be honest these manuals are preliminary, more Pharo information will become available on this web page.


    (many items stolen from R. Burruss Feb. 12, 2002, PALAO/PHARO observer's workshop)

    1. The Pharo array is a four quadrant HgCdTe chip, where each chip is 512 X 512. The CCD optimum linearity is up to 40,000 counts.

    2. Pharo pixels are readout one row at a time . Then a reset is applied to all the pixels in the row. A timing discontinuity exists on chip quadrant borders, so it is wise not to put targets on the borders.

    3. On long dark exposures, you will notice a circular glow at the four quadrant read points. This is multiplexer FET glow, which increases with exposure time.

    4. There is no shutter on this array. When idle, the array continuously clocks and resets to a preset bias level. It is always recommended that the block on the Lyot wheel be inserted into the path when slewing the telescope, or when Pharo will be idle for a significant length of time.

    5. The bias reset is noisy. Correlated double sampling is the technique used to remove reset noise.

    6. The default Pharo image setup sends a difference image to the display. This image is the difference of the target signal minus the initial reference signal.

    7. All exposures are sent to either the source (src) or background (bgd) buffer. Quick exposures are for target acquisition, exposure determination, and AO peaking. Quick exposures are not saved to disk, unless the "write FITS" button is pushed. Take & Write exposures are written to disk as standard three dimensional FITS files (X, Y, quadrant#). No coadding, or image subtraction is done to the images before writting to disk. The "S-B" display button on the GUI DOES NOT create a subtracted file of the source minus background files. The displayed subtracted image is for display only, unless you use the "write FITS" button.

    8. Clicking the "Detector Setup" button opens up the "Settings" popup window. In the popup, the quadrant size can be changed, endpoints can be added, and what gets saved to file can be expanded. There are no binning options on Pharo.

    9. The #cycles text box is used to enter the number of "Quick" or "Take & Write" exposures to be taken in sequence with on button push.

    10. The Xpharo display box can be used to get various image, zoom modes, stretch options, Strehl analysis, photometry statistics, statistical plots, and full field options. Some of these were covered earlier in this document. To prevent overloading the new observer with more detail on these options, it would be better if the observer met with Jeff Hickey or Rick Burruss to go over the entire Pharo GUI in general, and the display options in particular.

    11. Dithering is accomplished with two steering mirrors in the AO bench. These mirrors moving in tandem enable the AO system to remain locked on a target while the target can be dithered in the field of the science camera. Here are some tips for "smart" dithering; 1. Don't make dither moves greater than 5 arcseconds, and wait 2 seconds before making another move to maintain a stable lock. Moves are made manually, or with a macro, both methods are discussed in this section.

    12. If the observer makes a dither move too far or too fast, the AO system will lose lock. The night assistant will need several minutes to restore the lock.

    13. On the Xpharo GUI there are manual dithering buttons for the observer to use. The buttons can move in either sky or detector units. As stated previously, the buttons move the steering mirrors to move the target on the pharo array but not off the AO wave front sensor (dithering). The steering mirror motors suffer from hysteresis, and stiction. Fine move accuracy in a best case scenario is around 1 pixel/.025". These buttons are mainly used to get fine placement behind a coronagraphic spot, or a grism slit.

    14. A digital fine move method exists. This method applies tip/tilt to the deformable mirror. This method is controlled by the AO operator/night assistant/telescope operator. The digital moves are once again a method to make fine moves to position a target on a coronagraphic spot or slit. While this method is accurate, it is limited in range 0.2", it reduces Strehl by several percent, and it reduces available DM stroke.

    15. There are three nodding methods to move the telescope with the AO unlocked (open loop). Nodding is used to make moves for sky frames, field identification, and star searching. The three choices are; 1. Telescope hand paddle, 2. ask the night assistant to move the telescope with the TCS, 3. Use the Xpharo mover buttons with the system unlocked (be sure to unlock).

    16. Macros are simple text files that can make dither moves, take exposures, move filter wheels, and repeat sequences. Examples of macros can be found on the Pharo computer Ezra2 one level below the Pharo login directory at /macros. Macros are loaded with the "Load Macro" button on the Xpharo GUI. Macros are run with the (you guessed it) "Run Macro" button. Be sure to add 5 second pauses after each 5 arcsecond dither move, to make sure the steering mirros are stable.

      PHARO OPERATION: CORONAGRAPHY (updated Jhickey Aug. 23, 2005)

      (many items again stolen from R. Burruss Feb. 12, 2002, PALAO/PHARO observer's workshop)

      1. The Slit Wheel holds the two Coronagraphic spots. The Slit Wheel is in focus, and the spot locations can be easily identified against a moderately bright background.

      2. The Coronographic spots are mounted on transparent Calcium Fluoride substrate. The substrate is masked to match the 25" field. There is no wider field of view advantage in using the 40" field since the area beyond the 25" field substrate is opaque.

      3. The two spots are 0.46" and 0.91". They can be selected using the Slit Wheel pull down menu.

      4. A drawback to Coronagraphy is the fact that the Slit Wheel is not repeatable to better than a few pixels. Dust specks and the spots will not line up on the same locations after Slit Wheel moves. This non-repeatability makes flat-fielding a problem. There are two choices for taking flats; 1). Remove the Coronagraphic spots for flats (use the 25" field mask), and 2). Set up the Slit Wheel for one spot selection, and never move the Slit Wheel after taking flats.

      5. Note items 11. through 16. in the section above relating to dithering, nodding, and macros. The .025" move is the finest move that the SSM's can currently make, and this move is unfortunately not always precise with the mover buttons.

      6. It is reported by observers that the spots are slightly transmissive in the K-band. If the object is bright enough, or the exposure long enough the occulted object should be detectable with the Xpharo line display plot. Use the line display plot to center the target behind the spot. BE CAREFUL to not over expose the array. Use short exposure quick sources to make sure the target is fully behind the spot before taking long science exposures.

      7. System flexure is an issue. Targets can drift out from behind the spot on the order tens of minutes. The flexure effect is variable depending on Cass ring rotation, altitude, and azimuth.

PHARO OPERATION: GRISM SPECTROSCOPY (updated Jhickey Sep. 17, 2005)

    1. In the afternoon home the slit wheel. After homing, move the slit wheel to the desired slit for observations. Take an image with enough stray light to see the slit. Use the vertical fiducials to mark the the slit location. You will need this when observing to put your object correctly on the slit.

    2. If the the slit does not look vertical, use the tweak option in "current" mode to get to vertical. After tweaking, home the slit wheel, and then move back to your slit. Take another image to make sure that the slit is vertical. Tweak and repeat as necessary.

    3. Grism Spectroscopy with Pharo was designed for use on the 40" field. Make sure the Carousel wheel is in the 40" position.

    4. In the afternoon, home the Grism wheel , and then move to the Grism of choice. Take a test spectra of the dome and check that the spectra is horizontal with the horizontal fiducial markers. If the spectra is not horizontal, tweak in "current" mode, home the wheel, go back to the Grism and check the spectra. Tweak and repeat homing as necessary.

    5. The Grism wheel is "heavy" and a bit unbalanced due to the Grism wedges. This at times can cause the Grism wheel to make incomplete moves. During observing if the spectra looks strange, home the wheel and try again.

    6. It is a good idea to write down the coordinates of critical fiducial markers. If the xpharo gui crashes, and you need to re-start xpharo, the fiducial locations will be lost.

    7. The basic spectral observing tactic goes something like... Set the slit wheel to " 40" field ", set the Grism wheel to a safe ND location, make sure the the Carousel is at the 40 mas position, and then take a short "quick" image to safely set an exposure value. With the camera in "Cont. Acq."(& AO locked), dither the object into the vertical slit fiducial markers that you have previously set. Turn off "Cont. Acq.", move the slit wheel from " 40" field" to the chosen slit, and take another "quick" image to confirm the target location on the slit. Then move the Grism wheel to the selected Grism. Take science images. When slewing to a new location, set the Lyot wheel to "block", set the slit wheel to 40" field, and set the Grism wheel to some safe ND location.

    8. The currently available slits are; 0.13", 0.26", 0.52". The available Grisms are; J, H, K bands.


      1. observer; Take twilight flats if desired (see section B).

      2. observer; Block light to the PHARO detector.

      3. night assistant; Hit the "SHUTDOWN" button on PALAO (rightmost button on toolbar)

      4. observer; Check if PHARO's disk is getting full (scr1 30 gig, scr3 67 gig; each image takes 4.2 Meg)...if so, back up to DVD/FTP/tape and erase some images.

      5. observer; DO NOT do PHARO BACKUPS "ON THE FLY": If you run an FTP process OR write a tape while taking new data on PHARO, you will crash the GUI, lock-up the computer, or overwhelm the Fiber Optic Interface.; END OF THE RUN:

      1. By Palomar custom, you have until the next afternoon to remove your data from EZRA2, the Sun workstation with the pyramid on top that runs PHARO, and purge the disk for the next user. It never hurts to leave a note on the computer giving its status.

      2. If yours is the last night of AO, make sure you put a note on EZRA2 for the day crew, telling them that you are still running tape backups or FTP. Hopefully the daycrew will gently roll EZRA2 to the corner of the data room without disturbing it.

      night assistant; (Appendix A) HARBOR STARTUP

      (for more detail see also
      (start of each new night, or system restart to initialize and fix problems)
      1) Darken dome (If it is before 4pm, get the cage lights off, at least).
      2) Open a window anywhere on LH screen and give the command:
           start_ao -tcs
         ...this magic startup script will delete any old PALAO windows,
            open new ones, and run all the needed programs in them (note
            that some, like AODR and AODB, run in the background without
            specific windows). 
      3) It will run a VME resetting routine in that window for a minute or so.
         It will create (and kill old ones if around) a "start_aocp" window.
         IF "start_aocp" then hangs for more than a few seconds after printing only
         the following 2 lines in that start_aocp window:
        " starting tgtsvr
        " Waiting to attach to target server           (press CTRL+C to stop) | "
         but won't spit out the page or so of stuff including the TORNADO
         graphics (see bottom of this page), then go back to step 2: and give "start_ao -tcs" again.
      4) Wait until the LOG window gives the message 
              " aocp: initialization complete. "
         (the " PALAO start-up completed! " msg in first window is not enough)
         (while waiting, you may position the windows that pop up as you like,
          and when the blue-and-gray GUI pops up you should open and position
          the command-line sub-GUI that is found by selecting "Observations" 
          from the toolbar and then selecting "Command Line Input").
      5) In the start_aocp window, give the "print_conf" command to check that the
         default settings went in OK (see immediately below for an example of a
         normal print_conf printout right after setup). 
      Appendices (optional):
      -> print_conf
      pixel_gains     = aocp:/default/pixel_gains/pix_gains_big_obs
      pixel_offsets   = aocp:/default/pixel_offsets/po_zero
      cent_offsets    = aocp:/default/cent_offsets/co_default
      reconstructor   = aocp:/default/reconst/may99
      actuator_map    = aocp:/default/actuator_map/eev_ccd
      dm_integral_gain = 0.150000, fsm_integral_gain = 0.50000
      dm_proportional_gain = 0.00000, fsm_proportional_gain = 0.0000
      dm_mode = 0, fsm_mode = 0
      log_data = 0x74,  log_interval = 50
      white_light = 0,  dm_if = 0x8000
      wfs_cam_mode = 0
      wfs_cam_rate = 500, wfs_cam_bias = 46
      stimulus filter wheel  = 3
      alignment filter wheel = 3
      stimulus shutter       = 0
      pharo shutter          = 1
      white light            = 0
      video camera           = 1
      sol_z   = 0.000000
      accd_z  = 0.000000
      apm_x   = 177.963394
      spm_x   = 184.488708
      ssm1_a  = 5292.000000
      ssm1_b  = 6100.000000
      ssm2_a  = 5340.549805
      ssm2_b  = 4925.099609
      swls_x  = 182.115860
      acqccd_z        = 0.000000
      wfsrl_z         = 0.000000
      rm1_x   = 178.556595
      spsm_x1         = 2.000076
      spsm_x2         = 2.000076
      spsm_x3         = 2.000076
      fsm_a   = 0.000000
      fsm_b   = 0.000000
      value = 0 = 0x0
      APPENDIX:  the TORNADO stuff from a normal startup of PALAO: a little dated, but basically correct.
      killing windsh
      starting tgtsvr
      Waiting to attach to target server            (press CTRL+C to stop) |
            /////   /////   /////   /////   /////       |
           /////   /////   /////   /////   /////        |
          /////   /////   /////   /////   /////         |
          /////   /////   /////   /////   /////         |
         //////  //////  //////  //////  //////         |     
         //////  //////  //////  //////  //////         |     T  O  R  N  A  D  O 
          /////   /////   /////   /////   /////         |                        
          /////   /////   /////   /////   /////         |                        
           /////   /////   /////   /////   /////        |     Development  System
            ////    ////    ////    ////    ////        |                        
             ////    ////    ////    ////    ////       |                        
              ////    ////    ////    ////    ////      |     Host  Based   Shell
               ////    ////    ////    ////    ////     |                        
                ////    ////    ////    ////    ////    |                        
                 ///     ///     ///     ///     ///    |     Version  2.0
                 ///     ///     ///     ///     ///    |
                  //      //      //      //      //    |
                  //      //      //      //      //    |
                  //      //      //      //      //    |
                 //      //      //      //      //     |
            Copyright 1995-1999 Wind River Systems, Inc.
      C++ Constructors/Destructors Strategy is AUTOMATIC
      hostAdd  ("huey","")
      value = 0 = 0x0
      hostAdd  ("hugh","")
      value = 0 = 0x0
      #hostAdd  ("hoth","")
      routeAdd ("", "", 1)
      value = 0 = 0x0
      # Exported Directories
      nfsExport ("/ops",0,0,0)
      value = 0 = 0x0
      nfsMount ("hugh","/export/home/aocm/ao4.6b3/bin","/bin")
      value = 0 = 0x0
      ld < aocp
      Loading /home/aocm/ao4.6b3/bin/aocp /
      value = 419352 = 0x66618
      ld < wdr
      Loading /home/aocm/ao4.6b3/bin/wdr |
      value = 1785048 = 0x1b3cd8 = cplusTerminate__Fv + 0x3c
      taskSpawn  "wdr", 100, 0, 1000000, wfp_data_relay, ""
      value = 28055408 = 0x1ac1770
      taskSpawn  "aocp", 50, 0, 1000000, aocp, "-debug"
      value = 26753296 = 0x1983910
      [I actually put spaces in < aocp and < wdr above, to fool HTML]

      night assistant (Appendix B) MANUAL INITIAL ALIGNMENT:

      Somewhat obsolete, this is now mostly automated, see checkout document at;
      (Jeff Hickey update July 2004);
      -------------------------  (Eric E. Bloemhof, x3658;
      PALAO STARTUP 2: alignment  11/00...aousr/eeb/Training> PALAOstartup2.computers
      --------------------------  -----------------------------------------------
      (start of each new night, or system restart to initialize and fix problems)
      NOTE:  COMPUTERS ("SYSTEM") SHOULD BE RUNNING...see "PALAOstartup1.computers"
      1) Use "Acquire Source" subGUI to select "white light" internal lamp.
      2) With arrows on that subGUI, stepsize 1, move the white light onto 
         field stop (the dark square on ACQ cam).  Then get it decently symmetrical
         on the wavefront sensor (WFS) display (on Compac monitor).
      3) Close the Tip/Tilt loop; should lock up as seen on WFS display.
      4) Leave T/T locked for DM alignment...with "Register DM" subGUI, apply the 
         "fine" Pupil Test Pattern.
      5) Use arrows on that subGUI, stepize 30 to start, 10 for fine adjustment,
         make the nice square pattern on the WFS display.
      6) Apply the Pupil Test Pattern "off" to flatten the DM; then exit subGUI.
      7) MAKE SURE THAT T/T is still on; if you turned it off, turn it on now.
         And then close the DM loop, and see that the WFS display distorts a little
         but stays stable.
         (Excess jitter would mean either a bad pupil alignment, so recheck 4-6, or
          an old WFS SKY...this is less likely).
      8) Unlock the loops (DM first, then T/T) and you're ready to go.

      daycrew & night assistants (Appendix C) Tune-up procedure:

      In this appendix is included the actual sheet used by the daycrew to do tþe start of run alignment and tuning of the AO system.

    200" AO Align & Tune Checkout

    (Rev 4-24-03)

    It is assumed that AO is cabled up and running. AO computers should be powered up and running (RAID system first, then hoth). Pharo should be cabled and running.

    Completed by: Date:

    Observer's name:

    1. Quick Check:

    [ ] 1. Use Jeff Hickey's AO/PHARO Checkout procedure to ensure that both AO and Pharo are working and communicating properly.

    2. Check the AO Field Stop:

    [ ] 2. In the PALOMAR ADAPTIVE OPTICS CONTROL (PAOC) window, click the Register DM button and register the deformable mirror as you did in step 1.

    [ ] 3. When the DM is registered, make sure the Tip Tilt and the DM loops are opened (green lights are OFF). Make sure Pharo is BLOCKED.

    [ ] 4. Go to the Cass cage and turn the cage lights ON. Turn on the small Acquisition TV monitor in the SW rack.

    [ ] 5. The small Field Stop (black square) should be centered inside the white light fiber chuck circle. If it is, proceed to step 7. If it is not, proceed to step 6.

    [ ] 6. Align the Field Stop:

    DAMAGE CAN BE DONE HERE. You should be trained by a qualified expert before continuing with step 6!

    [ ] a. Get optical gloves and a 5/32"(?) allen wrench. Open the lower AO bay doors.

    [ ] b. Locate the Field Stop lens in the SW corner of the AO bench near the acquisition

    camera. The base of this lens is a 5 axis stage with 5 allen screws. The top 2 screws move

    the field stop up/down (clockwise = up). The bottom 2 screws adjust left/right (clockwise = right). Do NOT adjust the single screw on the bottom left of the base!

    [ ] c. Adjust each SET of 2 screws as necessary to center the Field Stop behind the circle of

    the white light fiber chuck. It is necessary to move each screw the same amount when

    adjusting (ie: if you move the top-left screw ½ turn, you must move the top-right ½ turn).

    [ ] d. When the Field Stop is centered, turn off the Cass cage lights.

    [ ] e. Lock the Tip Tilt loop for a few seconds, then open the loop. Go back to the Cass

    cage, turn on the lights, and repeat from step 5. Continue until the Field Stop is centered.

    3. Align Pharo Pupil To AO Pupil:

    [ ] 7. Make sure the Cass cage lights are OFF, open the mirror cover, and turn the Flat Field Lamp switch (at Night Assistant's desk) to HI. Normal daytime lighting is ok.

    [ ] 8. In the PAOC window, push the GUIDE SOURCE ACQUISITION button and select Star/Sky (to look out at the dome).

    [ ] 9. Set PHARO to the following:

    Slit Wheel = 25" Field

    Lyot Wheel = Open

    Filter Wheel = J

    Grism Wheel = Open

    Carousel = Pupil

    [ ] 10. Take a Quick Src exposure to make sure the pupil image is centered on the array in the right-hand monitor. If it is not centered, you may have to TWEAK the Pupil UP (~ 6-10 steps). You may also have to HOME the other wheels until the pupil image looks right. Once the pupil image is centered, place fiducial crosshairs on both the left and right horizontal telescope spiders in the right hand monitor.

    [ ] 11. Set PHARO to the following:

    Slit Wheel = 25" Field

    Lyot Wheel = Std. Cross

    Filter Wheel = J

    Grism Wheel = Open

    Carousel = Pupil

    [ ] 12. Take a Quick Bgd exposure and display the Bgd image. You should now see the Std. Cross in place over the telescope spiders. The fiducial marks that determine the telescope position need to be centered within Pharo's Std. Cross. If they are centered, display the Src image again and position the fiducial marks over both the upper and lower vertical telescope spiders. Check the Bgd image again to see if the Std Cross is also aligned vertically. If both axis are aligned, continue to step 14.

    [ ] 13. If the telescope and Pharo pupils are not aligned, then you will have to do one of the following:

    [ ] a. Rotational Alignment: If the telescope is rotated with respect to Pharo, increase or

    decrease the Cass ring angle by 0.1 degrees and go back to step 9.

    [ ] b. Translation (up / down): If the horizontal telescope spiders are displaced from the

    Pharo Std. Cross by equal amounts, you can TWEAK the Std. Cross to align them. Select

    TWEAK from the Lyot Wheel GUI selector. In the pop-up window, select Current and

    enter a step size of 6 <enter>. Choose either the up or down direction, and then go back to

    step 9.

    [ ] c. Translation (left / right): If the vertical telescope spiders are displaced from the

    Pharo Std. Cross by equal amounts, you have to move the camera physically on the AO

    bench. You will need a 7/16 wrench to loosen the two locking nuts at the rear of the

    camera. The small knob at the back of Pharo can now be used to translate Pharo. Start by

    moving the knob ~ ¼ turn in the "hard" direction (there is about a full turn of "easy" backlash before the camera will move the other way). Go back to step 9. Once Pharo is aligned, lock the two nuts and re-check that nothing has moved.

    [ ] d. Pharo may be translated up / down on the AO bench. Seek help if this is needed.

    If the pharo / telescope alignment is more than 5% of the total pupil diameter, then the AO

    pupil to telescope and pharo needs to be checked. Seek help if this is the case.

    4. Sharpen The Pharo Image:

    [ ] 14. The dome must be either dark or constant in brightness. Cass cage lights must be OFF.

    [ ] 15. Take a fresh WFS Sky.

    [ ] 16. In an xterm window, type the following:

    hoth:/home/aousr> cd /opt/ao/ops/cent_offsets

    hoth:/opt/ao/ops/cent_offsets> matlab

    [ ] 17. When matlab has started, type the following:

    >> z=zeros(10,1);

    >> co_tune('co_default',z,'cocur');

    [ ] 18. In the PAOC window under the Observation menu, select Command Line Input to open the command input window (if it isn't already open). In the text entry area, type the following:

    ao load cent_offsets /ops/cent_offsets/cocur (click APPLY; make sure "load complete" dialogue appears)

    [ ] 19. In the PAOC window click the Acquire Source button and select HeNe laser.

    [ ] 20. Set Pharo to the following:

    Slit Wheel = 25" Field

    Lyot Wheel = Std. Cross

    Filter Wheel = K

    Grism Wheel = ND 0.1%

    Carousel = 25 mas field

    [ ] 21. When the laser chuck is in place (do not turn on the laser), take an image with Pharo by clicking the Quick Bgd button.

    [ ] 22. In the PAOC window, click the Aquire Source button and select the white light source. Lock the Tip Tilt and the DM loops.

    [ ] 23. Take a Pharo image with the Quick Src button. Configure the Xpharo Display as follows:

    Select Box display mode.

    Check the S-B display buffer radio button.

    For the Stretch Mode, select Box, 99% Max, and 99% Min.

    Under the Plot menu option, select Radial Plot. Open this plot window, which may be

    minimized under the Xpharo Display.

    In the right-hand monitor, select Zoom Box for the stretch mode, place the box over the

    white light source, and ensure that the zoom box size is 128.

    [ ] 24. In the Xpharo Display, place the box over the white light source and stretch it out such that all of the light from the source is contained within the box (~ 60 - 70 pixels square).

    [ ] 25. Look in the Xpharo Plot window that should now be showing the radial profile of the white light source. The scale on the left is the flux of the source in DN. The scale on the bottom is pixel number. The scale on the right is a "strehl" number. You will be measuring changes to the maximum "strehl" number achieved (largest value) as changes are made to the quality of the image. Typical starting values are anywhere between 25 and 45. Typical ending values are 45 to 50.

    [ ] 26. Back at AO in the MATLAB window, type the following:

    >> z(3) = 2

    >> co_tune('co_default',z,'cocur');

    Click APPLY at the TAO Command Input Window

    This applies a change of 2 units to the focus term on the DM. Take an image with Pharo using the Quick Src button. Note the change to the maximum "strehl" number when the image is displayed. Repeat the above steps with a z(3) = -2. Continue with steps of +0.5 until you have gone through focus and have determined the best value. Take a few images at each setting to average the results; strehl will change by a few % with each image. Select the unit value that achieves the highest strehl number, AND the best uniformity in the first Airy ring (which image looks best by eye?). When you are done, make sure z(3) = the best value and continue to the next term.

    [ ] 27. Continue on with the following 9 zernicke terms as you did in step 26:

    z(4) = astigmatism z(8) = spherical

    z(5) = astigmatism z(9) = triphoil

    z(6) = coma z(10) = triphoil

    z(7) = coma z(1) and z(2) are tip/tilt; we don't tune these values

    If you have time, it's a good idea to recheck each term again from the beginning when you are done, especially the focus term z(3). From run to run, we usually find that a few (2) to several (6) zernicke terms must be changed by 0.5 to 2 units to produce the optimal image on Pharo. This is an example of the final August 2002 zernicke output (seen after every z(x)=y entry) :

    z =











    [ ] 28. When the tuning is done, save the results. In the MATLAB window back at the AO computer, type the following:

    >> co_tune('co_default',z,'co_<date>'); where <date> is today's date (ie: 22aug02)

    >> co_tune('co_default',z,'co_default');

    >> quit

    [ ] 29. In the same xterm window, type the following (in bold) :

    hoth:/opt/ao/ops/cent_offsets> ftp aocp

    Connected to aocp.

    220 VxWorks (5.4) FTP server ready

    Name (aocp:aousr): <enter>

    331 Password required

    Password: <enter>

    230 User logged in

    ftp> cd aocp:/default/cent_offsets

    ftp> put co_default

    [ ] 30. In the TAO Command Input Window, type the following:

    ao load cent_offsets aocp:/default/cent_offsets/co_default

    [ ] 31. Take another image with Pharo. It should be exactly the same as your best image.

    (Appendix D) PALAO USERS GUIDE:

      note Sep, 2005; Most of this is obsolete, I will try to update asap, Jeff Hickey.             
      This version (ug.txt.4.2b2.99aug17) is the most recent I have;
      the document is supported by Thang Trinh at JPL, and this version
      may be out of date in some ways.
      All commands are to be preceded by "ao " differentiate them
      from TCS commands starting with "tcs " "tcs n 1"


                        PALAO USERS' GUIDE              (EEB, November 2000)
      RECALL:  1) Give these command in the GUI AO/TCS Command Input subgui;
               2) Preface all of these with    "ao"    (as opposed to  "tcs").
      Beware that this is rather old documentation.
      ao set log_interval 50 avoid system crashes at high telemetry rates.
      ao load cent_offsets aocp:/default/cent_offsets/cocur3  ...load psf (c.o. file)
      ao move fsm_a 0       ...and similarly for fsm_b, the other t/t mirror axis.
      ao reset ssm1_a    ...1,2; a, recover when ssm's get out of synch,
                            e.g. if telescope is moved a long ways while loops locked.
                                                      Thu Jul 29 17:22:27 PDT 1999
                                                      Thu Aug 12 14:58:32 PDT 1999
                              Palomar Adaptive Optics System
                                      User's Guide
      1.0   Command Summary
      SET       [=] 
      RESET      Reset system or motor to default state
      SHUTDOWN                        Save the state of the system and shutdown
                                      hardware. (Next power-up will be warm boot.)
      GET_FRINGE_MAP                  See command processor documentation.
      2.0   SET Command
              SET   [=] 
      system_parameter                value
      ----------------                -----
      DM                              {ON | OFF}
      FSM                             {ON | OFF}
      FSM_RATE                        {1 .. 500}
                                          number of WFS camera frames per FSM update
      CAMERA                          {STIMULUS | ALIGNMENT | ACQUISITION |
                                       METROLOGY | MOCK_SCIENCE}
      LOG_DATA                        {RAW_PIXELS | FF_PIXELS, CENTROIDS,
                                       SUBAP_FLUX, RESIDUALS, DM_POSITIONS,
                                       WFP_STATUS, NONE, ALL}
      LOG_RATE                        {5 .. 500}
                                          number of WFS camera frames per log sample
      WFS_CAM                         {ON | OFF} 
      WFS_CAM_RATE                    {25 | 50 | 100 | 250 | 400 | 500 | 550}  Hz
      WFS_CAM_BIAS                    {0 .. 255} 
      WFS_CAM_GAIN                    {0 .. 3}
      WFS_DISPLAY                     {RAW_PIXELS | FF_PIXELS | CENTROIDS |
                                       SUBAP_FLUX | RESIDUALS | DM_POSITIONS}
      ACQ_INT_TIME                    {100 .. 10**7}  usec
      STIM_FW                         {CLOSED | PUPIL | STAR | OPEN}
      ALIGN_FW                        {CLOSED | PUPIL | STAR | OPEN}
      WHITE_LIGHT                     {ON | OFF}
      DM_PROPORTIONAL_GAIN            {0.0 .. MAX_FLT}
      DM_INTEGRAL_GAIN                {0.0 .. MAX_FLT}
      FSM_PROPORTIONAL_GAIN           {0.0 .. MAX_FLT}
      FSM_INTEGRAL_GAIN               {0.0 .. MAX_FLT}
      3.0   OPEN and CLOSE Commands
      3.0   OFFSET Command
      system_parameter                offset_value
      ----------------                ------------
      WFS_CAM_BIAS                    {-255 .. 255}
      4.0   LOAD Command
      5.0   MOVE Command
      SSM1_A          SSM1_B
      SSM2_A          SSM2_B
      SPSM_X1         SPSM_X2         SPSM_X3
      FSM_A           FSM_B
      IMAGE_X         IMAGE_Y
      PUPIL_X         PUPIL_Y
      6.0   QUERY Command
      7.0   STOP Command
              STOP   ALL
      8.0   RESET Command