Warning |
---|
This page is under construction. |
Overview
How
The focus script is a Tcl script that runs under LOIS. In the case of LMI, it is available after LOIS has been started and initialized in the usual way. There may be an inplacefocus button under the User Buttons tab on the LMI UI to run the script but the preferred way to run the focus is through the imager. It is necessary for the TCS and AOS to be running and the usual connections via JOE established to perform the focus changes that this script will make.
The focus value is technically called the focus offset with units of microns -- – it is a direct piston of M2 applied in addition to the continuous update for temperature and elevation angle provided by the AOS. Changing the focus for LMI will also change the focus for the probe cameras and other instruments in the instrument cube.
...
So the user first takes a full frame left amplifier single image, usually binned 2x2. The user then sets up the focus parameters and initiates the focus sweep by selecting a star from the initial full frame image. The script then takes subframe images centered about the star, with a succession of focus settings, to find the best image quality. And finally a dialog box comes up displaying the results and the associated parabolic fit where the user can decide on the appropriate focus offset sent to the AOS.
Method---
, with a succession of focus settings, to find the best image quality. And finally a dialog box comes up displaying the results and the associated parabolic fit where the user can decide on the appropriate focus offset sent to the AOS.
Operation through the Imager
The focus script/operation can be initiated through the imager. The first step is to take a full frame left amplifier single image, usually binned 2x2. A star on this image will be used as the basis for the focus sweep.
The "Focus" drop-down menu in the imager has 2 items; one for setting the parameters and the other one for initiating the command:
Selecting "Focus Parameters" brings up a dialog box with pre-filled values:
Two of these parameters deserve some explanation. The bin
value is not editable and is pre-filled based on the setting chosen in the previous full frame image. In the case of the LMI, the Focus Base
is adjusted from the value in the config file by the differential focus offset value for the current filter. So if the value in the config file is 750 µm and the current filter is V, the default value would be 920 µm.
The first time the "Focus Run Parameters" dialog box comes up, the values will be the default values which are read from the config file. Most of the times, the default values are a very good place to start. But if for some reason, the user decides to change some of these values, they will be saved and used the next time the dialog box comes up. If a pre-filled value in the text box is not the same as the default, the color will change to red and the suggested default value will display in front of the text box. In the example above, the focus base is set to 850 which would be the saved value from the previous run and we see that the suggested default is 20.
Selecting "OK" saves the parameters and we will be ready to initiate the focus sweep. "Reset to Defaults" and "Clear All Values" are self explanatory but the "Redo Focus Run" should be used with care. This button is used to repeat a focus run (same star and therefore same x & y coordinates) with different parameters. The button saves the repetition of the initial step of taking a full frame image.
The second item on the drop-down, "Mark & Initiate Focus Run", allows selection of a target star by clicking on it. The x & y coordinate of the star is included in the inplacefocus command sent to LOIS. If a user selects this action, the imager will be expecting a mouse click event indicating the star to be used for focus sweep. This action can only be aborted using the ESC button. Otherwise the next mouse click inside the imager will initiate a focus sweep.
For the details of the operation of the inplacefocus script, please refer to the sections below. After the focus sweep has completed, the script sends a message to the imager containing the focus steps and the associated FWHM values:
02:52:10 Level_9:FOCUS_PARAMS=800.0,18.58|830.0,16.85|860.0,20.44|890.0,15.47|920.0,16.34|950.0,17.75|980.0,20.83|1010.0,21.41|1040.0,22.30
????-----
Method
There is no slew to locate the star, or telescope motion to center it up, whence comes the term "inplace focus". The focus setting value used as the center of the sweep is called focbase; the script first sets the focus to that value. The routine then "acquires" the star by defining a standard sized (now 300x300 at 2:2 on LMI) subframe around the given position and taking a single image. Analysis is performed on this image- if the star is sufficiently bright, in terms of instrumental mag. and maximum pixel value, but not saturated, and the fwhm is reasonable, the subframe is redrawn to place the psf in the center of the image. If the image appears reasonable, but either too bright or faint, the exposure time will be adjusted within certain limits and the exposure retried. If this is still out of specification, the focus script ends with a failure status.
...
The focus value is ordinarily defined to be the position of a focusing element. On LMI, the definition is somewhat abstract: it is the offset in microns from the nominal focus selection of the AOS for M2 as mentioned above. This is typically between 750 - 900 microns with no filter in place, the open position. Note that there is no internal focusing element in the LMI instrument.
...
The estimates are printed in the lois log and in the focus log; . the final focus setting adopted, however, is that based on the minimum fwhm criterion. You are not obligated to accept this focus. The setfocus command and user button can be used to select another focus. If the focus script fails, or is aborted, the focus setting is restored to focbase.
...