Hello,
Can someone provide a reasonably detailed workflow that illustrates how auto focus can be done (with successful results) in APT?
I've tried using it on and off for a few months with zero success. I have better success using a b-mask with the b-mask aid.
In fact, if I achieve decent focus with b-mask, then run the auto focus routine, every single time the outcome is focus that is WORSE than what was achieved with the b-mask.
Also, where is the auto focus log data stored and does it allow looking for the classic parabolic shape characteristic of approaching, achieving, then overshooting focus? Some tools provide a graph that shows this within the GUI.
Auto focus is the last remaining frontier that I've not tamed with APT. Once I do, then I will be 100% automated and able to use my gear 100% remotely.
Thanks,
Al
Auto focus
Mounts: CEM120, CEM40EC, Atlas EQ-G
OTAs: 305 mm RC, 108 mm doublet refractor, 152 mm Mak-Newt, 51 mm Redcat
Cameras: ZWO ASI2600MC Pro, ZWO ASI1600MM Pro w/ CFW7, ZWO ASI294MC Pro, 2x ZWO ASI290MM Mini, QHY 10, QHY 8L, QHY 5III-178C
OTAs: 305 mm RC, 108 mm doublet refractor, 152 mm Mak-Newt, 51 mm Redcat
Cameras: ZWO ASI2600MC Pro, ZWO ASI1600MM Pro w/ CFW7, ZWO ASI294MC Pro, 2x ZWO ASI290MM Mini, QHY 10, QHY 8L, QHY 5III-178C
- Yoddha
- Site Admin
- Posts: 16291
- Joined: Thu Apr 17, 2014 3:48 pm
- Reputation: 837
- Location: Bulgaria
- Contact:
Hello Al,
The Auto Focusing will not work unless the Threshold is correctly as it is not possible to separate the focuser moves from the atmosphere turbulence. Here are few notes how to determine the threshold.
https://ideiki.com/astro/usersguide/aut ... =MjQw#id_2
The Auto Focusing will not work unless the Threshold is correctly as it is not possible to separate the focuser moves from the atmosphere turbulence. Here are few notes how to determine the threshold.
https://ideiki.com/astro/usersguide/aut ... =MjQw#id_2
Clear skies,
Ivo
May the weather be with you!
Astro Photography Tool (APT v4.80) - The Imaging Catalyst
My images (6 AAPODs, 1 Published)
Ivo
May the weather be with you!
Astro Photography Tool (APT v4.80) - The Imaging Catalyst
My images (6 AAPODs, 1 Published)
Hello,
Thanks. I've looked over the info you pointed me to. I will give another try once the sky clears up.
By the way, if focusing unattended, how is the star selection done? In the documentation (and as I've discovered in my several attempts at using the auto focus) it is stated that the 1:1 setting of display must be used then one must scroll around to find a suitable star. If imaging unattended with focusing routines between light frame captures, how can the same star be reliably selected each time?
I'm guessing that all of this can be automated through some scripting, but I've not even gotten that far and would appreciate if there are any working examples that I can look through and duplicate in my environment...?
Thanks again
Al
Thanks. I've looked over the info you pointed me to. I will give another try once the sky clears up.
By the way, if focusing unattended, how is the star selection done? In the documentation (and as I've discovered in my several attempts at using the auto focus) it is stated that the 1:1 setting of display must be used then one must scroll around to find a suitable star. If imaging unattended with focusing routines between light frame captures, how can the same star be reliably selected each time?
I'm guessing that all of this can be automated through some scripting, but I've not even gotten that far and would appreciate if there are any working examples that I can look through and duplicate in my environment...?
Thanks again
Al
Yoddha wrote: ↑Tue Jan 21, 2020 4:33 pm Hello Al,
The Auto Focusing will not work unless the Threshold is correctly as it is not possible to separate the focuser moves from the atmosphere turbulence. Here are few notes how to determine the threshold.
https://ideiki.com/astro/usersguide/aut ... =MjQw#id_2
Mounts: CEM120, CEM40EC, Atlas EQ-G
OTAs: 305 mm RC, 108 mm doublet refractor, 152 mm Mak-Newt, 51 mm Redcat
Cameras: ZWO ASI2600MC Pro, ZWO ASI1600MM Pro w/ CFW7, ZWO ASI294MC Pro, 2x ZWO ASI290MM Mini, QHY 10, QHY 8L, QHY 5III-178C
OTAs: 305 mm RC, 108 mm doublet refractor, 152 mm Mak-Newt, 51 mm Redcat
Cameras: ZWO ASI2600MC Pro, ZWO ASI1600MM Pro w/ CFW7, ZWO ASI294MC Pro, 2x ZWO ASI290MM Mini, QHY 10, QHY 8L, QHY 5III-178C
- Yoddha
- Site Admin
- Posts: 16291
- Joined: Thu Apr 17, 2014 3:48 pm
- Reputation: 837
- Location: Bulgaria
- Contact:
Hi Al,
You have nailed the main problem of the unattended focusing. There are different approaches and we are investigating the option to use multiple stars to achieve the goal.
Currently you are using the Focusing Aid. Moving it around the image it selects the star which is measured, so by this way you define which one to use for focusing...
You have nailed the main problem of the unattended focusing. There are different approaches and we are investigating the option to use multiple stars to achieve the goal.
Currently you are using the Focusing Aid. Moving it around the image it selects the star which is measured, so by this way you define which one to use for focusing...
Clear skies,
Ivo
May the weather be with you!
Astro Photography Tool (APT v4.80) - The Imaging Catalyst
My images (6 AAPODs, 1 Published)
Ivo
May the weather be with you!
Astro Photography Tool (APT v4.80) - The Imaging Catalyst
My images (6 AAPODs, 1 Published)
If you can implement the software correctly, multi star focus is a much more robust method to achieve a accurate outcome. In the past , I think the main reason this approach has not been implemented is lack of processing power. I retired after 30+ years of developing and implementing machine vision solutions for the factory. The feature analysis capabilities and speed of today's hardware /software makes multi-point tracking/analysis in near real time a simple task.
I think this feature would be well received and used by your users.
I think this feature would be well received and used by your users.
Interestingly SharpCap has several Auto Focus routines, which include both single star and multi-star FWHM routines.
I've had good success with the single star routine, with it producing nice overlapping "u" curves in the inward and ourward focuser travel direction. It has been so successful that it has given me the confidence to start using APT's native auto-focus function.
However, I've not had any success with the multi-star routine. It seems to just produce a near flat line over the same focusing range as the single star routine.
Now, this difference could just be a reflection of my own skills in this area. So it's going to be interesting to see what Ivo comes up with.
Cheers, Jim
I've had good success with the single star routine, with it producing nice overlapping "u" curves in the inward and ourward focuser travel direction. It has been so successful that it has given me the confidence to start using APT's native auto-focus function.
However, I've not had any success with the multi-star routine. It seems to just produce a near flat line over the same focusing range as the single star routine.
Now, this difference could just be a reflection of my own skills in this area. So it's going to be interesting to see what Ivo comes up with.
Cheers, Jim
I think a big advantage of multi star focusing is, it is more robust to seeing effect - at least in theory. Also star selection should be easier.
I am also very keen on finding out what will show up in APT
I am also very keen on finding out what will show up in APT
Clear skies,
Ruediger
Ruediger
Hi Guys,
Multi star focus could also help to achieve an optimum focus position in case of field curvature when either the center of the FoV or the edges can reach correct focus, but not both at the same time. Obviously this should then be corrected with a field flattener. If such an option is not available then perhaps a multi star focus routine could suggest an optimal mid way value?
Kind regards,
Hans
Multi star focus could also help to achieve an optimum focus position in case of field curvature when either the center of the FoV or the edges can reach correct focus, but not both at the same time. Obviously this should then be corrected with a field flattener. If such an option is not available then perhaps a multi star focus routine could suggest an optimal mid way value?
Kind regards,
Hans
- Yoddha
- Site Admin
- Posts: 16291
- Joined: Thu Apr 17, 2014 3:48 pm
- Reputation: 837
- Location: Bulgaria
- Contact:
Hello Friends,
Definitely the bulk usage of all stars in the image is not a solution. At least the dithering and guiding could change the situation to non usable state.
Just part of the from will be used and also am thinking for using techniques similar to platesolving to be sure that same stars are used when the focus is evaluated.
Definitely the bulk usage of all stars in the image is not a solution. At least the dithering and guiding could change the situation to non usable state.
Just part of the from will be used and also am thinking for using techniques similar to platesolving to be sure that same stars are used when the focus is evaluated.
Clear skies,
Ivo
May the weather be with you!
Astro Photography Tool (APT v4.80) - The Imaging Catalyst
My images (6 AAPODs, 1 Published)
Ivo
May the weather be with you!
Astro Photography Tool (APT v4.80) - The Imaging Catalyst
My images (6 AAPODs, 1 Published)
Hi Ivo,
I am trying to follow your point, but it is not so clear to me. Maybe you can help me please?
1. You do not dither during a focus run. So why it should impact?
2. Guiding brings down HFD, so it is not negative. Vise versa.
For my point of few, the algorithm should work like this:
1. Select a defined number of non saturated stars distributed over the image
2. Measure HFD
3. Move focus
4. Add data point to V-Curve calculation
5. Repeat 2-4 until acceptable convergence criteria of V-Curve met
Only thing required is a reliable star detection algorithm.
Maybe I am overseeing something or see it too simple.

I am trying to follow your point, but it is not so clear to me. Maybe you can help me please?
1. You do not dither during a focus run. So why it should impact?
2. Guiding brings down HFD, so it is not negative. Vise versa.
For my point of few, the algorithm should work like this:
1. Select a defined number of non saturated stars distributed over the image
2. Measure HFD
3. Move focus
4. Add data point to V-Curve calculation
5. Repeat 2-4 until acceptable convergence criteria of V-Curve met
Only thing required is a reliable star detection algorithm.
Maybe I am overseeing something or see it too simple.
Clear skies,
Ruediger
Ruediger
HelloRuediger wrote: ↑Mon Mar 30, 2020 6:30 pm Hi Ivo,
I am trying to follow your point, but it is not so clear to me. Maybe you can help me please?
1. You do not dither during a focus run. So why it should impact?
2. Guiding brings down HFD, so it is not negative. Vise versa.
For my point of few, the algorithm should work like this:
1. Select a defined number of non saturated stars distributed over the image
2. Measure HFD
3. Move focus
4. Add data point to V-Curve calculation
5. Repeat 2-4 until acceptable convergence criteria of V-Curve met
Only thing required is a reliable star detection algorithm.
Maybe I am overseeing something or see it too simple.![]()
![]()
another problem could be to choose a star near the edge of your field of view or in the area where the flattener does not flat: I think more than a star should be choosen but very close to the center of the optical axis where aberrations and flattening is better. What do you think?
Clear skies,
Giovanni.
Hi Giovanni,
That is quite easy to avoid by selecting stars closer to the center. You can use an distribution equation matching your scope.
Moreover to get reliable HFD results at all you have to subtract background anyway, which means subtracting dark at minimum and in case of vignetting flat also.
A field distortion is a topic to any auto focus routine. Hence most of them measure the variance in HFD. by that you can identify such problems since HFD is constant for all stars in a "perfect" image.
A second different approach is: Distortion is no issue as long as you statistically equally distribute the stars and you achieve a overall minimum of HFD. Then automatically you get the optimal focus point.
As you see there are some solutions to the issue mentioned. But you are right, they need to be considered in the algorithms.
BTW: Han (from ASTAP) is working on some interesting theoretical approaches. Definitely worth reading
That is quite easy to avoid by selecting stars closer to the center. You can use an distribution equation matching your scope.
Moreover to get reliable HFD results at all you have to subtract background anyway, which means subtracting dark at minimum and in case of vignetting flat also.
A field distortion is a topic to any auto focus routine. Hence most of them measure the variance in HFD. by that you can identify such problems since HFD is constant for all stars in a "perfect" image.
A second different approach is: Distortion is no issue as long as you statistically equally distribute the stars and you achieve a overall minimum of HFD. Then automatically you get the optimal focus point.
As you see there are some solutions to the issue mentioned. But you are right, they need to be considered in the algorithms.
BTW: Han (from ASTAP) is working on some interesting theoretical approaches. Definitely worth reading
Clear skies,
Ruediger
Ruediger
- Yoddha
- Site Admin
- Posts: 16291
- Joined: Thu Apr 17, 2014 3:48 pm
- Reputation: 837
- Location: Bulgaria
- Contact:
Hi Ruediger,
I'm thinking on general algorithm that can be used to for auto-focusing but also for monitoring the focus and also maybe in future for auto-correction between the plan steps ;)
I'm thinking on general algorithm that can be used to for auto-focusing but also for monitoring the focus and also maybe in future for auto-correction between the plan steps ;)
Clear skies,
Ivo
May the weather be with you!
Astro Photography Tool (APT v4.80) - The Imaging Catalyst
My images (6 AAPODs, 1 Published)
Ivo
May the weather be with you!
Astro Photography Tool (APT v4.80) - The Imaging Catalyst
My images (6 AAPODs, 1 Published)
-
Radcliffe1
- Posts: 192
- Joined: Sat Oct 26, 2019 11:53 am
- Reputation: 0
That would be absolutely brilliant !!!
Yes please Ivo.
Brian
Yes please Ivo.
Brian
Hi Ivo,
do you mean to run an autofocus if the previous frame has a HFD over a threshold in comparison with the one got with the last autofocus routine? ;)
Feel free to ignore my question if this could be a present for us in the next version!
Clear skies,
Giovanni.
- Yoddha
- Site Admin
- Posts: 16291
- Joined: Thu Apr 17, 2014 3:48 pm
- Reputation: 837
- Location: Bulgaria
- Contact:
Many thanks Brian, Giovanni!
Having such infrastructure allows to work both "triggering full auto focus" or to monitor the focus shift and to make small "predicting" changes during the plan execution.

Having such infrastructure allows to work both "triggering full auto focus" or to monitor the focus shift and to make small "predicting" changes during the plan execution.
Clear skies,
Ivo
May the weather be with you!
Astro Photography Tool (APT v4.80) - The Imaging Catalyst
My images (6 AAPODs, 1 Published)
Ivo
May the weather be with you!
Astro Photography Tool (APT v4.80) - The Imaging Catalyst
My images (6 AAPODs, 1 Published)




