Focus Algorithm

I was working on my system last night trying to get some data whereby I could determine the auto focusing parameters. My process was to move the focus all the way then step in recording number of stars and the HFR. What the data shows is that as I come closer to focus, as indicated by the HFR, the number of stars went down. I would have expected the number of stars to go up as a result of the fainter stars coming into focus. So, why did it go down and not up?

ZWO focuser, Rokinon 135mm lens (hence a helical focuser) and a Nikon D750 camera.

@DougN

At 135mm, I suspect that as the stars come into focus, they get so small that the star detection routine starts to ignore them. SGPro has an option to say what the minimum star diameter can be. I assume, If this value is set to something like 5x5 (pixels), tiny stars will be ignored.

Charlie