AAOmega focus procedure
This page contains details of the AAOmega focus procedure, which uses pairs of Hartmann shutter arc frames to derive the focus offsets for the current grating setup. It is intended for the expert AAOmega user.
Housed in the West Coude room, AAOmega should be stable against environmental changes during a run and certainly does not have significant amounts of spectroscopic flexure. However, small shifts in the focus are seen night to night. We therefore recommend focussing the spectrograph every night, a few hours before observing starts (with the dome lights off). The effect is typically at a small enough level that data quality will not be significantly compromised if circumstances dictate that the system cannot be refocussed every day.
Briefly, a pair of arc frames are observed, each with an occulting (Hartmann) shutter closed across half of the collimator mirror (left and right half in turn). When the system is in focus, the obstruction in the beam will merely result in a loss of system throughput. However, if the system is not correctly focused, the two frames will project arc lines onto slightly different places on the CCD (moving the line pattern as a whole to the left or the right). The principle of the focus technique is to measure this shift as a function of position on the CCD, and then adjust the detector position (Spatial and Spectral tilts plus a Piston out of the plane of the tilt) to minimize the observed shifts.
Previous focus values are available in the AAOmega focus value database
Analysis of the Hartmann data pairs is currently performed using an IRAF script. The script takes as input a Left+Right Hartmann pair, smoothes the images to reduce the impact of bad pixels, cross correlates 9 sub regions of the images, in a 3x3 grid, to determines shifts, and then returns suggested values to adjust the focus.
Login to a user account on aatlxa and change to a convenient IRAF directory and run an xgterminal.
The relevant scripts are then setup within IRAF using the following procedure:
Start IRAF and define the hartmann task
Using the tdfct control task (AAOmega Spectrograph Control Dialog window - Calibrate AAOmega Blue Arm), close the Hartmann shutter 1. This is the left-hand shutter as indicated by the tdfct mimic. The order IS important for the Hartmann task.
Take an arc frame for your current grating setup. This should be at least twice as long as the normal times for your grating set-up as only half the light is getting through. For low-resolution gratings 60-120s with all the lamps except Thorium is an appropriate time and set-up. Further settings are given in Table 3 of the observing guide on the Technical Documents page. This frame can be taken in Ultra-Fast mode, and can be taken as dummy data.
Using the tdfct control task, close the Hartmann shutter 2. This is the right-hand shutter as indicated by the tdfct mimic. The order IS important for the Hartmann task.
Repeat the standard arc frame for your current grating setup.
At the aatlxa IRAF terminal, copy the relevant files to the working directory. Data is stored at :/net/aatlxy/data_lxy/aatobs/OptDet_dummy/yymmdd/ccd_1/
Note, both arms of the system may be focussed at onces, but if dummy data is taken, the file names will be identical, take care.
Run the hartmann task at the IRAF promptIRAF> hartmann a b
The output will look something like:
An example of the output from the IRAF focus routine.
Here the left and right Hartmann frames for the RED camera have been taken as dummy frames c.fits and d.fits. The result of the cross correlations are given in the text table. The 3x3 grid of shifts at bottom right represents the individual results of the cross correlation of the input images. The far left column shows the average of each row of shifts, the upper row of values indicates the average of each column of shifts, and the single number in the top left of the output array indicate the average piston offset of the 3x3 cross correlation array. One should check that the averages all make sense, as an indication that the code is operating as expected.
The pixel offsets from the cross correlation array map to the units of movement in the detector axis via a complex model discussed in the old aaomega focus page. Fortunately, the hartmann routine does the hard work for us. The adjustments that should be applied to the detector Spatial and Spectral tilts, and the focus Piston offset are given. The Absolute Values should be applied to each camera in turn under Set Camera (Focus/Tilts) from the Calibrate AAOmega Blue/Red Arm option in the AAOmega Spectrograph Control dialog of the AAOmega control task.
The Hartmann test should then be repeated with the new settings. Once the focus has converged, the task will say FOCUS OK.
> setenv FOCUSHOME /instsoft/2dF/config/aaomegafocus
IRAF> task hartmann = /instsoft/2dF/config/aaomegafocus/hartmann.cl
For the SPIRAL IFU, it is critical that one has a good focus in order to get good extraction of the overlapping spectra.
The focus should be redone every day, and monitored during the night (by eyeballing the flats and arcs).
Note that while the IRAF focus routine does work correctly for SPIRAL, because of the faster beam in the SPIRAL system, the focus adjustments presented by the IRAF task should be multiplied by a factor of x1.5, to account for the faster beam. The cautious observer may wish to simply use the values presented by the IRAF script, and approach focus through a larger number of iterative steps.
Sarah Brough (firstname.lastname@example.org)