'Old' issue with the 'new' AF routine


I am curious to know if other people have the same issue with the new AF routine.

As you can see in the screenshots, the ‘new’ AF dos not work very well with my setup compared to the old routine : star detection is not very good, multiple stars are detected as big star and thus produce erroneous HFR, the final result is more or less random focusing…
The camera used is an Atik 414ex, with binning and 3 sec exposure with L filter (very sufficient in this case). Changing the minimum star size detection or increasing the exposure time do not produce better results.
The ‘old’ SGP produces more reproducible focusing with exactly the same setting (and the same star field in these tests).
I do not use the new SGP versions since the change in the AF routine because of this problem.
I already submitted this issue some month ago but I do not get very clear answer.
Solutions or ideas are welcome.

Old and New Auto Focus Method
Old and New Auto Focus Method

Hi Pascal,
I had same issue until i found perfect settings and now autofocus works perfect each time for every filters.
What focal length you are and what focuser? I have the same camera, maybe I can suggest you my settings.


focal length is about 1100mm and the focuser is an ‘home made’ model (Jolo focuser type) with 0.7 µm per step (works perfectly with older SGP and other software).
I use the L filter (and filter offset) for AF.
What are your miraculous settings?


I image at 1058mm, so almost the same FL.
Use bin 2x2 and at least 10 seconds of exposure. 3 seconds is simply not enough.
Min star size 3.
About focuser, you have to measure it your self again for 10 seconds of exposure.
With moonlite i have 7 data points with step size of 153.
Try to cool down the camera to -10 if you can.

Strong wind and bad seeing can also quickly ruin the autofocus.


I also had issues with the new routine, in fact I reverted back to an earlier ver: because that appeared to work better.
However, I have persevered and followed the instructions, it has worked o.k now…but I do now get the erroneous warning about my hfr when with the earlier ver…I did not.



Tank you for your comments.
AstroScience, I think exposure duration is not the problem (number of stars are already saturated with 3sec, I also tested 7 sec without improvement in star detection) but of course I could try 10 sec in the next imaging cession. Other parameters are very close from mine.
Do you have the same star detection behavior in your frames? (I upload a partial AFpack if you want to try)AFPack_85.zip (979.8 KB)
In think it could be the core of the problem, in some dense star field the percentage of erroneous HFR is very important and could cause the observed variation in focusing (as the measured stars change during the AF).


Pascal, yes, the detection seems works the same way with your data. But I noticed that your background is 2000 adu in 3 sec, you are in very light polluted area?
I think you can try to add some darks to substract it from AF frames to improve SNR. Or maybe use one of the RGB filters to focus and use offsets from them? Or even try not to bin AF frames.


I have just switched from my 10" RCT to a FLT132 refractor (924mm FL). I’m using 8-second exposures through the L filter and getting very good results with perfect V-curves using KAF8300 sensor, without binning. I disable autoguiding during the AF routine. I think my star detection is set to 4. I will double check tonight. I also use more than 7 steps. Your first group were already perfectly focused but if they were out, it would struggle with only a few points on one side too.


Thank you for the test and comments, yes my background is hight because the moon was full, without moon my background in about 500-600.
Normally I use darks, but I have not verified if these darks are effectively applied.
Just in case, other frames from the AFpack (limited upload size …)
AFPack_85_2.zip (981.7 KB)
AFPack_85_3.zip (980.3 KB)
AFPack_85_4.zip (981.3 KB)

I could try with an RGB filter and offset and/or unbinned frame, may be the next night.


I use a DSLR, and for auto focus I use 10s at 3200 ISO. I use an exposure this long to even out the seeing, because bad seeing and short exposures can cause variable HFR readings, and jagged looking v curves. While the old routine worked well for me with both my Tak refractor and Edge, the new routine is even better, allowing me to start from a lot more out of focus position at the beginning of the night without the auto focus getting confused. I did increase my step size by about 25% with the new auto focus routine. I get beautiful, repeatable v - curves with both scopes, and for me the auto focus routine could not really be improved.



I tested binning 1x1 and longer exposure time and the result seems to be better, not perfect but better.
With my setup, definitively 3 to 4 sec exposure is enough as it produces good signal (saturated and unsaturated stars), increasing the exposure time do not improve the star detection (more saturated stars but always false ‘big stars’ ), low background level (black night or filter) do not change that.
The AF woks but, in my humble opinion, can be improved by eliminating these multiple stars detection (false high HFR stars), may be filtering by maximal star size in order to take in account only a more or less narrow star size class.
Thank you


Hi Pascal,
I think it is possible to have the stars detected well and still have the seeing have a negative effect on the readings for auto focus. Even if a star saturates in one second, if the seeing is bad that well detected star can still be moving around from the seeing during the auto focus exposure. I found with my setup at 2350 mm and f10 that 10 seconds at 3200 ISO with a DSLR is enough to even out any seeing fluctuations. Three seconds would not be long enough with my Edge 9.25 if the seeing was bad.



thank you Dean for these advices, 6 sec seems to be better for me, but I found another related problem : guiding seems no to be stopped during AF

Guiding corrections are applied during AF (green cross remains active and corrections bar are visible in the PHD graph).
This produces some erratic guiding movements during AF that affect the HFR and the V curve.
Of course I checked the appropriate option in SGP.



Hi Dean,
I too was getting the weird focus graphs with my auto focus. Getting very frustrated I turned to the forum to see if there were others having the same issue. After getting exact focus numbers with a Batinhov I still could not get autofocus to perform the way it had prior to my upgrade of SGP. Then I saw your suggestion about increasing the step size by 25%…right on the money!!! Perfect v-curves every focus run with all filters!

Thanks so much for the insight.



Hi Bob,

Fantastic! I’m very happy to hear that helped! Getting auto focus working really well is so satisfying. Frustration level goes down, and your image quality goes up! Win - win. I actually enjoy watching the SGP auto focus runs. The resulting v - curves are almost always close to perfect for me with both my Edge and Tak. Very satisfying. Amazing job, Ken and Jared!



Hi Pascal,

Yes guiding while focusing is sure going to cause some problems! Let us know how it goes next time out.



Hi Headdown,
sorry for this late answer, the explanation about the guiding during AF was that I used the ‘run button’ to manually start de AF, in this mode the ‘pause guiding during AF’ option does not work, I asked to the developers in another thread and the answer I got is something like : you are right, that’s how it is.
So, actually the guider can be paused only during a sequence.
I am not very satisfied with the new AF routine, although it seems to work for most of SGP users, I do not understand how it is possible with the poor star detection I observe, but, apparently, here again there is nothing do to, that’s is how it is…