Procedure Index

Loop instabilities

These are some of the strategies that can be followed if the AO loops become unstable, for instance in bad seeing conditions.

Step by step troubleshooting guideline:

  1. Try opening and closing loops
  2. Try 1% smaller leak factor, e.g. 0.96 if it was 0.97
  3. Reduce LO gain by a few percent, e.g. 0.36 from 0.40
  4. Reduce HO gain by 1%, e.g. 0.15 from 0.16
  5. If TT residuals are high, increase the TT gain up to a maximum of 0.45
  6. If the correction is still bad, then return to the original values.

It is also possible to decrease the number of modes, but it is recommendable to consider this option as the last resource, and generally keep the value at 300 or above.

If one factor seems to make a big difference, e.g. HO gain, it is advisable to go back and restore the other parameters to the default values.

Additional tips and tricks:

  1. For occasional instabilities one can try to open/close the loops without changing the loop parameters to see if the instabilities go away.
  2. If the DM becomes saturated, it may not respond to changes in the loop gains or number of modes. In this situation the recommendation is to open the loops, change the loop parameters, and reclose them.
  3. If the DM becomes saturated, making the integrator leak smaller may help. Small changes in the integration leak value have significant impact in the loop stability. If the default value is 0.96 it is recommendable to keep the leak value between 0.94 and 0.98.
  4. It is not necessary, bu it is good practice to open and close the loops briefly after changing the loop parameters, especially when the reason to make the cnages is to make the loops stable.

PyWFS dichroic control

There are different ways to move the PyWFS dichroic in and out of the optical path:

Loading a flat map on the KPIC BMC DM

IMPORTANT NOTE: Execute DM.zeroAll() at the end of a PyWFS observing night.

Restarting the KPIC BMC DM after prtcserver reboot

See Section 1 in KPIC BMC DM control notes.

PyWFS keywords for FSM, modulator and focus stage

Redefining the FSM on-axis position

Launch the Keck II calib GUI from the k2aoserver-new VNC pulldown menu and run Calibration setup for NIRC2 and NGS-AO.

Launch the PyWFS calib GUI. On a vm-pwfsserver terminal as user pwfs, type prtcCalibrationMenu.py.

  1. Press Calibration setup to launch the PyWFS calibration setup GUI.
  2. Select DICHROIC and press Optics setup. Wait until the status is Done.
  3. Press Init PyWFS camera. Wait until the status is Done.
  4. Press PyWFS setup. Wait until the status is Done.

Launch the PyWFS modulator control GUI. On a vm-pwfsserver terminal as user pwfs, type prtcModulator.py.

Center the modulator if it is not already centered. On any terminal with access to AO keywords, type modify -s pmoffx=0.5 pmoffy=0.5

Launch the PyWFS loop display GUI. On a prtcserver terminal as user prtc, type loopDisp.py. Check that the four pupils are evenly illuminated. If they are not, then the FSM on-axis position needs to be adjusted.

Launch the PyWFS Status GUI. On a vm-pwfsserver terminal as user pwfs, type prtcStatusGui.py

Move FSM1 and FSM2 until the four pupil images in the PyWFS loop display GUI are evenly illuminated.

You can move the FSM using the ecPDev2.ui GUIs for FSM1 and FSM2, or you can move the FSM using keywords.

Once you are happy wih the pupil illumination (four pupils evenly illuminated) after having moved FSM1 and FSM2, click on the Named Posn button on the ecPDev2.ui GUI for FSM2 (same procedure for FSM1). This brings up the ecNps2.ui GUI.

PyWFS FSM2 named position definition widget
  1. Input the new fsm2x on-axis position on the left box of the control area (red background and white fonts) and hit Enter.
  2. Input the new fsm2y on-axis position on the right box of the control area (red background and white fonts) and hit Enter.
  3. Click on the Define button.

Run the PyWFS Calibration setup again to double check that all pupils are evenly illuminated once the calibration setup procedure is completed.

Modulator info

This section includes general information about the PyWFS modulator:

KPIC diagram

The following figure shows the KPIC optical layout before the Phase-2 upgrade in March 2022.

KPIC optical layout before the Phase-2 upgrade in March 2022

A new KPIC BMC DM was added to the optical path as part of the Phase-2 upgrade in March 2022.

CRED2 display (tracking camera)

The CRED2 tacking camera is an integral part of KPIC. It can also be used to monitor the the PSF when operating the PyWFS with NIRC2 independently of KPIC.

There are two possible options to bring up the the CRED2 camera:

  1. On a k2aoserver-new terminal (VNC passwd):
    ssh -X nfiudev@nfiuserver
    	  [nfiudev@nfiuserver ~]$ cd src/sce
    	  [nfiudev@nfiuserver sce]$ ./psfDispTiny.py -s /tmp/TC_Display_images.im.shm
    	
  2. Eavesdrop on the VNC where the FIU camera software, nfiuserver:2 (AO passwd).

Stand alone CRED2 display
KPIC control GUIs

PyWFS Quick Access GUI

This is a low level GUI that has some additional functionality with respect to the user control GUIs. The PyWFS quick access GUI can be used for troubleshooting purposes.

The PyWFS Quick Access GUI is launched from a vm-pwfsserver terminal as user pwfs:
[pwfs@vm-pwfsserver ~]$ prtcQuickAccess.py

Typical layout of PyWFS control user interface

An example of PyWFS Quick Access GUI usage is to recenter the modulator:

  1. Open the AO loops on the PyWFS Loop Control GUIs
  2. Click on Center Modulation on the PyWFS Quick Access GUI

PyWFS AO screens

The following figure shows the typical layout of the PyWFS control user interface running on k2aoserver-new:2.

Typical layout of PyWFS control user interface

Restarting the PyWFS camera (SAPHIRA)

Symptom:
PyWFS Camera (in the PyWFS status) shows red and says it is powered off. Clicking on it and rebooting/restarting the camera server does NOT resolve this.

Solution:

  1. Connect to the RTC: ssh -X prtc@prtcserver
  2. Type: showRTProcess. This opens a window, and the second process from the top is partially crashed
  3. Ctrl-c to restart the process
  4. Connect to the PyWFS server: ssh -X pwfs@vm-pwfsserver
  5. Issue command: prtcRestartCOM. It kes about 5 sec, then you should be able to reacquire with the camera.