@Focus2 Introduction

@Focus2 provides a convenient interface to focus your imaging system. It can be used interactively from CCDSoft, or accessed with Orchestrate or from an external script.  The concept behind @Focus2 is simple: move focuser, measure focus, repeat.

 

The focus curve is, more or less, "^" shaped, where the x axis is the focus position and the y axis is the measure of focus, the higher focus measure value, the better the focus.  

 

Please see the @Focus2 Research Data (PDF) for "real world" @Focus2 results.  

 

@Focus2 requires focus data on both sides of the "^", from which it will determine the peak of the curve by assigning a best fit curve whose inflection point essentially defines the best focus.

 

 

Long story short, @Focus2 has to move through best focus to be able to detect a peak.  When complete, @Focus2 moves to the focus position that coincides with the peak of the focus curve (that is, optimal focus).

 

You can:

 

 

Software Bisque strongly recommends using the first method until you're confident with the process.

 

Interactive Use

 

  1. @Focus2 requires CCDSoft for Windows version 5.00.159 or later.

  2. To enable the @Focus2 button so you can try it, exit CCDSoft, then create a folder named “AtFocus2” off the folder where CCDSoft (CCDSoft.exe) is installed, and start CCDSoft.  Go to the Focus tab of the Camera Control window and verify the @Focus2 button now appears.  (This step is temporary while @Focus2 is under development.)

  3. Connect to the camera, and try to adjust the focuser so that the system is "near" focus.

  4. Click the @Focus2 button to show the @Focus settings window:

 

 

 

Samples

Enter the number of samples that are used to define the focus curve (x-axis is focus position, y-axis is the measure of focus; the higher the value, the better the focus). Keep samples at 4 for now.

 

Averaging

Averaging is the how the focusing data is averaged, a value of 1 equates to no averaging.  A value of 3 will use three data points (or images) at each sample and average the results. Averaging may changed to 2 or 3, if the final focus position @Focus converges on over several runs seems inconsistent with averaging set to 1.

 

Focus Move Size

For each sample, the focuser is moved away from focus by many focus steps – this is done symmetrically on either side of focus.  @Focus2 assumes the current focus position is reasonably close to focus – even if it is not, the algorithm will probably still succeed.  You can be “aggressive” with this setting, bigger is better than too small. The focus range needs to be large enough that @Focus can “see” (or measure) a significant change in focus.

 

Automatically Slew Telescope to the Nearest Appropriate Focus Star

Mark this option to have @Focus2 automatically select and slew the telescope to the nearest "appropriate" focus star.  If this option is off, @Focus2 will not slew the telescope.

 

Minimum Altitude

Enter the minimum altitude for the focus star. Stars below this altitude will not be used as a focus star.

 

Automatically Place Subframe Around the Focus Star

Mark this option to have @Focus2 automatically place a subframe around the focus star. This option is required if automatically choosing/slewing to the focus star.

 

Automatically Adjust Exposure Time

Mark this to have @Focus2 automatically adjust the camera’s exposure time while focusing to avoid under and over sampling.  If this option is off, @Focus2 uses the current exposure time on the Camera | Take Exposure dialog box, Exposure text box.  This option requires the two values below.

 

Calibration Star's Magnitude (between 3.5-6.5 inclusive)

 

and

 

Exposure Time that Produces an Approximate 20,000 Count Signal

 

Before running @Focus2, pick one star in the sky with magnitude 3.5 to 6.5, and take several images. Adjust the exposure time until the camera produces approximately 20,000 counts on this calibration star (look at Max value in the camera status, or use View | Cursor Information command). Then enter the calibration star’s magnitude (use TheSky6 to give the exact magnitude) and the exposure time you have figured out that produces approximately 20,000 count signal in these settings.  

 

Note: all checkboxes on the @Focus2 settings must be marked to have @Focus2 behave as it will when called from an automated environment like Orchestrate.  You can unmark these settings to help debug @Focus2 interactively or interactively skips steps.  For example, say you have a “good” focus star already on your detector – so you can tell @Focus2 to skip slewing, skip subframing and just focus with the star you have selected.

 

Once you are comfortable with the @Focus2 settings, and end results for interactive use, should you move on to calling @Focus2 from Orchestrate or a script.

 

Calling @Focus2 from Orchestrate

 

  1. To call @Focus2 from Orchestrate, Orchestrate version 1.00.022 or later is required and CCDSoft version 5.00.158 or later.

  2. In addition, the script file named “Camera.@Focus2.vbs” must reside in a folder named “BuiltInScripts” off the folder where Orchestrate (Orch.exe) is installed.

  3. Below is the syntax for calling @Focus2 from Orchestrate.

 

RunVBScript,Camera.@Focus2.vbs

 

 

Calling @Focus2 from a scripted environment

 

To avoid having to publish a new CCDSoft scripting interface (.tlb), the scripted syntax for calling @Focus2 uses the generic PropLng property. The syntax is given below:

 

Cam.PropLng("m_mAtFocus2") = 1

 

@Focus2 begins immediately when “m_mAtFocus2” is set to 1.  @Focus2 will progress synchronously or asynchronous based upon the Asynchronous property.