

Bringing the Stars into Focus:
Optimizing Telescope Autofocus for Clearer Celestial Observation
Discover how an innovative search algorithm enhanced telescope performance, making astronomy more precise and accessible.
Explore the Research
Introduction
In astronomical observations, precision is everything. The challenge of keeping fast-moving celestial objects in focus is compounded by Earth’s rotation and the movement of these objects relative to our planet. To maintain clarity, telescopes must constantly adjust, often moving every few seconds to keep celestial bodies in frame. Focusing manually or with traditional autofocus methods can result in lost time and less precise images, particularly when observing star clusters or planets.
Motivation
This research was part of my final year project, where the goal was to develop an automated telescope alignment system. Typically, such systems are proprietary and come with a hefty price tag, making them inaccessible to smaller observatories or amateur astronomers using low-end telescopes. We aimed to address this gap by creating an open-source solution that could be applied to affordable telescopes. Achieving precise autofocus was a critical step in this project, as it would enable these telescopes to deliver high-quality celestial observations without the need for expensive, adaptive optics systems.

Understanding The Problem
Even though we understood the theory behind the problem, we knew it was important to experience it firsthand. So, we tested the telescope on which we planned to build our automated alignment system. Needless to say, it was quite a hassle! We primarily focused on the Moon, and because of its proximity to Earth, it moved much faster than distant constellations. This meant we had to adjust the telescope’s position every half minute or so, which quickly became tedious. This hands-on experience underscored the need for an automated solution to handle these constant adjustments and maintain focus.
Objective
The focus of my seminar was to evaluate and compare various search algorithms to determine the most effective approach for telescope autofocus. I aimed to provide astronomers with insights into the algorithms that offer the highest efficiency and accuracy across different astronomical conditions, enabling them to make informed decisions when selecting autofocus methods for their telescopes.
Methodology
The study was mainly based on a paper containing observational data collected from a 74-inch telescope at the Kottamia Astronomical Observatory (KAO). Five different star clusters—M103, N6793, N7067, N7788, and N7789—were observed. The images were evaluated using a Normalized Variance focus measure operator, which quantifies the sharpness of each image. Five distinct search algorithms—Global Search, Fibonacci Search, Binary Search, Modified Fast Climbing Search, and Subbarao Search—were applied to assess their performance in optimizing the telescope's focus.
Algorithms Compared
Global Search: This method systematically explores focus positions across a predefined range, looking for the optimal point with a fixed step size.
Fibonacci Search: Using the Fibonacci sequence, this algorithm narrows down the search space through a fixed number of iterations, offering efficiency in focus optimization.
Binary Search: A simpler, yet highly efficient approach that divides the search space in half repeatedly until the optimal focus is found.
Modified Fast Climbing Search (MFCS): An iterative method that adjusts its step size depending on the focus level, speeding up the refinement of the solution once it’s close to the target.
Subbarao Search: A hybrid method that combines aspects of both Binary and Fibonacci searches, designed for swift and accurate focus location.