Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

inplace_focus x y title bin exptime filter focstep focbase flags

Select The user first selects a star with coordinates x,y on a full frame left amplifier single and take . The script then takes subframe images centered about these coordinates, with a succession of focus settings, to find the setting with the best image quality.

There is no slew to locate the star, or any kind of centering telescope motion to center it up, thus whence comes the term "inplace focus". There is a The focus setting value used as a starting point 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 (400x400 200x200 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, 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 without a result. Otherwise the routine then initiates a "focus sweep" in which the focus setting is moved in steps from a value considerably lower than the focbase to one considerably higher. At each setting a "focus image" is taken , and another analysis is performed. If the brightness and fwhm meet similar criteria as those for acquisition, the focus is moved to the next step. Otherwise the image is retried; when retries are exhausted, the script usually abortsterminates without a result. This would could happen, for example, if clouds covered the star in midsweep, or pointing were lost. The current version of the focus script will can also adjust the exposure time during the focus sweep, prior to a retry, but with within narrower limits than during the those used at acquisition.

When the focus sweep is finished, the focus step with the smallest fwhm (or other figure of merit) is selected to be the new focus setting. If the focus setting is at the top or bottom of the sweep, the focus sweep is repeated with the center of the second sweep defined to be the best focus step found in the first.

The focus step 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. This is typically in the vicinity of 900 microns. Note that there is no internal focusing element in the LMI instrument. The focbase mentioned above, along with the size of the focus step, are arguments to inplace_focus. The number of focus steps is usually 109, including the central value, but that can be redefined with the focstep argument as well.

...

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. Evidence is gathering that the parabolic fit to fwhm is actually the best value obtained by the script for LMI, which is not true for other instruments that use a script like this. If the focus script fails, or is aborted, or is still at the top or bottom of the sweep after a second sweep, the focus setting is restored to focbase.

There is a focus log to which the results of each focus run are appended; on LMI this is called testlmifocus.log and lives in the obslemi home directory on computer lemi.

The images taken with this routine are test images. The "save" flags setting will make a special directory in the main image data path for the rundate to save named images for each focus step position. The name of the directory matches the hh:mm:ss timestamp used for the focus run in the focus log.

The script normally stops if a good star image is not available, either during acquisition or at any focus step. The conditioning flags setting causes all focus sweeps to run unconditionally to the end; however the focus setting is restored to focbase at the end regardless of results- this mode of operation merely updates the focus log.

The focus run can be aborted in the usual way with ./abscript.There is a focus log to which the results of each focus run are appended; on LMI this is called testlmifocus.log and lives in the obslemi home directory on computer lemi.

TESTFOCUS LOG

TBW

A sample log entry:
Note: The entries for focus steps 950 and 1000 have saturated maximum pixel values (65535). This degrades the quality of the fwhm, and thus focus, measured.

...