Theory Of Operation
In order to focus an image, Ekos needs to establish a numerical method for gauging how good your focus is. It's easy when you look at an image and can see it as unfocused, as the human is very good at detecting that, but how can a program possibly know that?
There are multiple methods. One is to calculate the Full Width at Half Maximum (FHWM) of a star profile within an image, and then adjust the focus until an optimal (narrower) FWHM is reached. The problem with FWHM is that it assumes the initial focus position to be close to the critical focus. Additionally, FWHM does not perform very well under low intensity fluxes. An Alternative method is Half-Flux-Radius (HFR), which is a measure of the width in pixels counting from the center of the stars until the accumulated intensity is half of the total flux of the star. HFR proved to be much more stable in conditions where you might have unfavorable sky conditions, when the brightness profile of the stars is low, and when the starting position of the focus is far from the optimal focus.
After Ekos processes an image, it selects the brightest star and start measuring its HFR. It can automatically select the star, or you can select the star manually. It is usually recommended to select stars that are not too bright as they might get saturated during the focusing process. A magnitude 3 or 4 star is often sufficient. Ekos then begins the focusing process by commanding the focuser to focus in or out, and re-measures the HFR. This establishes a V curve in which the sweet spot of optimal focus is at the center of the V curve, and the slope of which depends on the properties of the telescope and camera in use. Because the HFR varies linearly with focus distance, it is possible to calculate the optimal focus point. In practice, Ekos performs several large iterations to until it get closer to the optimal focus where the gears change and smaller, finer moves are now made to reach the optimal focus. Ekos let the user set a configurable tolerance parameter, or how good is good enough. The default value is set to 1% and is sufficient for most situations. The Step options specify the number of initial ticks the focuser has to move (assuming an absolute focuser, this is NOT applicable to relative focusers). If the image is severaly out of focus, we set the step size high (i.e. > 250). On the other hand, if the focus is close to optimal focus, we set the step size to a more reasonable range (< 50). It takes trial and error to find the best starting tick, but Ekos only uses that for the first focus motion, as all subsequent motions depend on the V-Curve calculations.
While Ekos Focus Module support relative focusers, it is highly recommended to use absolute focusers.
In manual focus mode, you can issue focus in & out commands to your focuser. If you click Capture, an image will be aquired and an HFR will be measured and displayed.
In autofocus mode, you can initiating focus operation by clicking Start Focus. If Auto Select Star is checked, Ekos will attempt to find the best star in the captured frame and focus on it by subframing the image frame. If unchecked, you can select the star manually and Ekos will try to focus it. To accelerate the focus process, check Subframe. With Subframed enabled, Ekos will capture a subframe around the focus star which will make downloading the image from CCD faster. You can limit the maximum travel distance of your absolute focuser by setting the Max Travel option.
You can specify filters such at AutoStretch and High Contrast if you have problem seeing the stars. Usually this is not necessary unless the image is severely out of focus.
Framing simply takes continious exposures of the CCD as specified by the Exposure option. This will help you to gauge, for example, how good your focus is, or to center a target in the CCD frame.