Autofocus Question


I am new to this forum. I really enjoy SGP, and have been obtaining good results. However one issue I have is with the auto focus routine. I seem to be able to get good “V” curves and proper focus is identified, however about half the time, the routine does not terminate, and the auto focus keeps going until eventually it fails. Even though the “V” curves look good, and the quality reads in the mid 90’s the routine will sometimes keep going.

I am wondering if there is a setting that I might be missing?



It’s hard to say, just too many variables to consider. The best way to proceed is to run SGPro as normal and when the issue occurs, use the in-app reporting tool to send us those logs and we can take a look (assumes SGPro 3.2 or higher).

More information here

1 Like

Thanks Ken. Will do.


Paul Shulins
Shulins’ Solutions

Broadcast Consultant

Hi. Happens for me also - annoying (version 3). The Focus runs, says 100% done, the only selection enabled in the dialog is ‘Cancel’. If you’re not fast enough, 4-10 seconds, it starts again. It sometimes finishes, but other times will continue for several iterations. In one case I recall, it found a good focus, then tried again and the subsequent focus was way off and I had to start again. I’m using the Moonlite Hi-Res Crayford Stepper. I really haven’t taken the time to understand it because it would take time away from imaging.


Thanks for your reply Steve. Glad this problem is not unique to me.

Perhaps we can come up with some logs to give the developer some clue as to how it is happening.

I usually just stop it and note the best focus number and manually command the focuser to that value.

Kind of takes away from the automation.

Because there is little point in continuing if focus cannot be achieved, SGPro will continue to re-attempt hoping that focus was just affected by some transient condition (clouds, vampires, etc.). What I suspect is happening, but need logs to confirm, is that the quality of the fit is not high enough to qualify as a valid focus run. Right now, SGPro uses a value that is OK for most rigs, but if the focus run looks good to you and SGPro says it’s not, I can tell you how to lower that threshold so SGPro will continue. We will probably end up exposing this value to the interface, but more settings is always a last resort.


Thanks. I will try anything to allow it to continue. However I do notice that the V curve usually has a quality in the mid 90% range so I am not quite sure why it fails so often. At first I thought it was a mechanical issue with the focuser, however if the v curve looks good then I would expect it to succeed.


Could be backlash in the focuser ? ie the focus quality (HFR) at a focus position may not always be the same (within tolerance) when the focuser is racked in our out and returned back to that focus position, taking into account seeing conditions as well.

I think that SGPro is meant to handle backlash by moving out beyond the desired position and always stepping to that position in one direction, so I don’t think backlash is the issue. I wonder if focusing could be improved by taking a small stack of images so that any variation might be averaged out - this is an approach adopted in NINA for example.

1 Like


You don’t say what camera type you are using, or filters if applicable. I suggest you take a look at how many stars are being detected at the extremities of your V curve. If you are down to a handful, I suggest you try increasing your AF exposure times somewhat. If you achieve greater success then you can always reduce exposure time later to save on AF overhead.

I assume also that you have followed the advice that HFR at the ends of the curve should be around 3x the HFR at near best focus. If not I suggest using the In/Out buttons on the Focus Control tab until you achieve this 3x ratio and then adjust your step-size to get to this when starting from a good focus position.

Also if your AF curve is flattened out on the right hand side (it should be moreorless symetrical) then you shoud also check that you have backlash compensation configured and maybe also increase the value.