Calibrating the LGS AO system

The procedures for calibrating the LGS AO system are described in this document. The OBS should be rebooted periodically to avoid potential problems with suspended tasks, especially before long LGS AO runs. Instructions on rebooting the OBS can be found here. The following procedure assumes that the OBS has already been rebooted and that the stages have been initialized and that the optical axis has been checked. Note that we have not been rebooting the OBS lately or encountering any problems with the OBS software.

DISCLAIMER:

The procedure outlined here is not idiot-proof! Please pay attention to what is happening!

Ensure that the nighttime observing tools have been killed, particularly the LBWFS image acquisition tool

Questions to ask yourself are: Am I signed up on the AO calendar? Am I giving myself enough uninterrupted time to do the calibrations? Are any stages faulted? Do I have enough light on the WFS/LBWFS/STRAP? Is STRAP in overcounts? etc.

Preliminaries

Start the real time LBWFS software:

If the software is not already running, then from the K2AO tools pulldown → Other AO → Start RT LBWFS software. It takes about one minute for the two xterms and the camera display to come up.

Bring up all the other tools:

  • MAORI
  • The SC GUI
  • The IDL calibration tool
  • The WFS intensity display
  • The STRAP intensity display
  • The "LBWFS CALS" IDL calibration (under AO other) or from IDL calibration tool
Run the calibration setup:
  • Select NIRC2 instrument first
  • Select LGS AO
  • Select SOD=SOD
  • Select light to LBWFS and STRAP
Run the DM to lenslet registration

LBWFS Calibration Setup

From the LBWFSCALS widget, do the following:

Setup for cals

  • Select SOD=SOD
Align TSS
  • Check counts on STRAP and TT Graphs while this is happening
  • Ensure that the counts on STRAP are approximately balanced once it is finished
  • Remember to DEFINE and SAVE optsodstrap position on TSS
DM/LBWFS REG

This is the part that could go wrong. Let's assume that is has converged and later we will deal with the case where the algorithm has not converged after 5 minutes or so.
Case 1: The algorithm converges After the algorithm has converged, the program will poke a cross pattern, measure the centroids and reconstuct the actuators. If the convergence is good, the centroids and the reconstructed actuators will look something like


If, on the other hand, the convergence is bad, the centroids and reconstructed actuators could look like


or the actuators could look like they are shifted by one subaperture to the left, right, up or down. You can tell for sure whether this is happening by reading the correlation value printed in the IDL session: it should read a value greater than 0.9. If not, then it hasn't converged properly and you could try running it again or following the instructions for the case when it does not converge.
Case 2: The algorithm does not converge If the algorithm does not converge or it converges to the wrong value, you will have to give it a better starting estimate. The golden rules of thumb are:
  • Each lenslet is 0.4 mm (i.e., you need to move LBS 0.4 mm to move one subaperture)
  • Moving LBS in x changes the position of the spots in x
  • There are approximately 16.6 pixels per subaperture
  • One unbinned pixel is approximately 0.267 arcseconds

Move LBS manually such that the DM/LBWFS registration is approximately correct in both x and y. You can check by pressing the CHECK LBWFS REG button. Do not worry at this point if it is one subaperture out. Once it is close, write down the LBS positions for future reference.

Now run the DM/LBWFS registration again by pressing DM/LBWFS REG. If it fails the first time, you might want to try it again.

If it still hasn't worked, you will have to do it the ole kine way, the way the early pioneers used to do it.


Once the DM/LBWFS registration is complete, define and save the 20x20 LBS named position.

Registering the 5x5 lenslet array by poking actuators is difficult. Instead, we will try to register the 5x5 lenslet array to the 20x20 lenslet array by taking advantage of the fact that, when the two lenslet arrays are registered to each other, the spots they produce will have the same x0, y0. The LBWFS calibration tool will adjust the position of the LBS until this is true. Then define and save the 5x5 LBS named position.

In the unlikely event that the tool has problems finding the correct 5x5 position, then do the following:

  • Select 5x5 subapertures from the LBWFS calibration tool.
  • Select "Float X0, Y0".
  • Take an image. Ensure that there are at least 5x5 spots in the image. If not, you will have to find a historical value of LBS where this is true or hunt around manually.
  • Ensure that the maximum peak intensity is between 5000 and 10000 counts. Change the integration time if necessary.
  • Take an image. Move LBS until the x0, y0 values are the same as those found for the 20x20 case.
  • Redefine the 5x5 LBS named position.

Image sharpening (non-common path aberrations)

The purpose of this step is to set the DM actuators (hence shape) in a static mode (open loop) so that they correct the non-common path aberrations. There are different ways to do it depending on the instrument. For OSIRIS, NIRSPAO and IF (and also for NIRC2 in an emergency when you don't have time to run the full image sharpening): load a phase map that has normally been created lately and corresponds to the static aberrations in the imaging path. This phase map name depends on the instrument in use. For NIRC2, we run the NIRC2 image sharpening algorithm.

Loading the phase map

Click on DM control on the WFC IDL widget.
Click on Clear voltages button.
Click on Load phase using WYKO
Select the last saved file for the instrument:
NIRC2 nirc2_yyyymmdd.ph
NIRSPAO ddmmyy_nirspec_h.ph
IF zeros.ph
OSIRIS zeros.ph
Check the returned Wyko phase map (see below)
Repeat Steps 3, 4 and 5 three more times.
Judge on Wyko display that that the fringes are reasonably straight (for the case of zeros.ph). If it is not the case, iterate steps 3, 4 and 5.
If zeros.ph was selected and you are happy with the fringes, redefine the DM origin file by clicking on click on Save voltages as DM origin .
Dismiss DM Control

Checking the Wyko phase map:

The Wyko interferometer that we use to measure the shape of the DM surface is very sensitive to vibrations. It is necessary to check any phase measurement. Under quiet conditions, the returned phase will look very smooth and does not present any phase discontinuity. Examples of thoses instances are shown on the left in the table below. The user would click on accept button for such cases
On the other hand, the returned phase may show the presence of phase discontinuities, and the user would click on redo. If you are having difficulty in making the measurement due to the presence of vibrations, you may ask the summit crew to turn telescope oil off.

Examples of good returned phase map Examples of bad returned phase map
  • Problems with the WYKO:
    If you have problems with the WYKO software (e.g., no phase map is returned), then you may want to check that the software is running. You can VNC onto wykopc or k1wykopc (the password is the same as for the k2ao account) and check that the "WYKO-Vision" program is running. If not you may (re)start the program. If this fails, you can ask someone on the summit to reboot the WYKO PC.

  • For IF:
    If there is no optimized phase map, we just assume the flat shape is the best one... One can optimize the image quality on KAT by adjusting the focus (SFP z) and loading DM zernikes (from the DM zernike widget) until the best image is found on KAT.
  • For OSIRIS:
    Make sure the DM is flat by loading a zeroes.ph phase map from DM control (see above for instructions).

    VERY IMPORTANT!!! Define the phase on the DM as the DM origins by clicking

    Save voltages as DM origins.

    Load the best shape using Load voltages from file and selecting the latest OSIRIS calibration file.
    If this does not yield adequate image quality, move the SFP-z and change the DM Zernikes until the image quality is good.
    Remember to Define and Save the SFP position (for OPTOSIRIS, OSPEC and OSIMG) and the new DM shape using Save voltages to file.


    LBWFS Calibration

    Once we have the right shape on the DM, click on RECORD IMAGE to take an image. Ensure that all subapertures are evenly illuminated, that 20x20 mode is being used, that the LBS is at the defined position (20x20) and that the saved X0, Y0 values are being used. Then click on "SAVE AS COG" in the LBWFS Calibration Tool. This will save the cog file for the 20x20 mode and the 5x5 mode.

    WFS Calibration

    LGS AO WFS Calibration

    • e.g., select NIRC2-L.
    • Select 2.4
    Check calibrations
    • From Light Source Control, turn HEPA filter OFF.
    • Select SND=10trans.
    • Close the tip-tilt loop on STRAP with a gain of 0.05. Check STRAP gate and ensure it is 100% (add ND filter on SFW if necessary)
    • Close the DM gain with a gain of 0.10.
    • Take a NIRC2 image with BrGamma filter (see NGS AO cals for more details).
    • Load the correct LBWFS cog file. e.g., for NIRC2 with SOD in place and 20x20 subapertures, type in IDL: LOADLBCOG,'NIRC2-L.cog'. For 5x5 subapertures, type: LOADLOBCOG, 'NIRC2-L5x5.cog'. Alternatively, you can load it from the SC GUI → Cameras → LBWFS.
    • Take a LBWFS image. Check that the aberrations are small and focus is less than 0.2 mm.
    NGS AO WFS Calibration
    • e.g., select NIRC2-N.
    • Select 2.4
    • Select SND=10trans.
    • Close the tip-tilt loop on STRAP with a gain of 0.05. Check STRAP gate and ensure it is 100% (add ND filter on SFW if necessary)
    • Close the DM gain with a gain of 0.10.
    • Take an image with the science camera (see NGS AO cals for more details).
    Calibrating a second (or third!) instrument

    To calibrate a second or third instrument, run through all the same steps except:
    • Do not run Align TSS
    • Do not run DM/LBWFS REG
    The reason for this is that currently there is only one named position for TSS, LBS, and X0/Y0. In the future, we should have different positions for different instruments.

    Checking the calibrations

    Once you have completed the calibrations, you can check to see how good they are by running the AO calibrations check procedure.


    WARNING: This should only be attempted as a last resort. An AO expert should be involved or notified if this is necessary.

    1. Select 20x20 subapertures

    2. SET ORIGINS TO ZERO

    This sets the LBWFS cog file to zeros.cog.

    3. Select FIXED X0, Y0

    If button reads FLOAT X0,Y0, click it so it says FIXED X0,Y0

    4. Move LBS

    Send LBS to the value you had recorded that was approximately correct.

    5. RECORD IMAGE

    If the X or Y centroids are about half black and half white on the display, then add 8 pixels to the X0 or Y0 and take another image. Remember to PRESS ENTER after entering an X0 or Y0 value! Check that the Subap Intensity has all the subapertures with approximately equal illumination. If not, then subtract 8 pixels to the original X0 or Y0 value.
    If the X or Y centroids have an average with an absolute value greater than 0.15, then hit NULL AVG CENTROIDS and take another image. In this case, X0 is off by two pixels and Y0 is correct.


    6. CHECK LBWFS REG

    Press CHECK LBWFS REG and look at the reconstructed actuators.

    If the X0, Y0 is off by one subaperture, then you will see something like this. Try adding/subtracting 16 pixels from the Y0 value (in this case) or X0 value and press CHECK LBWFS REG. Once you are no longer off by one subaperture, then go back to Step 1 and start again.
    If the DM to LBWFS registration is not very good, then move LBS until it is, as described here. Then go back to Step 1 and start again.


    7. Press SET ORIGINS TO ZERO

    8. Define and save the LBS position

    Write down the values for the LBS position and hit DEFINE and SAVE in the SC GUI LBS screen.

    9. Save the X0, Y0 values

    Write down the X0, Y0 values and save them by hitting the SAVE X0, Y0 VALUES. This will save the X0 and Y0 values. Now you can continue with the calibrations.

    9. Determine the 5x5 position

    Now send the LBS to the 5x5 named position.
    Take an image and record the x0, y0. Move LBS until the x0, y0 is the same as was calibrated for the 20x20 case. Ensure that there are 5x5 spots on the CCD. Then define and save the 5x5 named position for LBS.

    For more information, please contact
    .