Focus extension - simplification?

#1

I was watching my focusing routine of 7 points and I could see the optimum focus was almost smack on the third position. The routine carried to the end and then started over, as I assume it needs three standalone points to determine a slope, using a larger (further out) value as the starting point. It went out a bit too far and after 9 or 10 points found the focus position.

If the focus routine needs to be extended inwards, it just adds a few more points at lower figures.

My idea is, if backlash is enabled, can the focus routine simply add more points at the ‘long end’, rather than repeat the whole sequence? It saves some time. I may have asked this before but I do not recall the answer.

#2

I like that idea. (I think once asked for it too but I don’t remember the answer either )
Andy

#3

Seems reasonable and we may consider it in the future. This late in the beta process, a change like that is too invasive and too likely to introduce regression.

In the meantime, I would highly recommend using 9 steps and a smaller step size (whatever equals the span of your 7 steps). This may take a little longer, but you have less chance of SGPro rewinding to find the V its after (which right now, takes far longer than just 2 more points).

#4

I have also seen this exact sequence, and more than once. 7 points and the 3rd was perfect focus. It then does several more to the left, more than it needs to, and then shifts too far to the right. This caused it to continue shifting to the right and getting steadily more out of focus, at which point I stopped it and reset the correct focus point.
I think an easier fix to avoid this problem is to assume the low point is actually the correct focus (which it is) and just start over by adding to the right and extending the range.

#5

I don’t mind a bit slower so tend to use 11 steps with the appropriate smaller step size.

#6

I had the very same experience as jmacon - I took on board Ken’s suggestion - I had a sequence whose starting position was 6830 and at the end of the day focused at 6867, with an AF setting of 9 steps of 25, rather than 7 of 20.
There were only two points to the right of the best focus position - but when the focuser re-ran, it moved so far out that it had to extend further inwards to get past the minimum. I have captured it on video. At a first glance, it looks like the newly computed start point (furthest extension) is shifted about twice as far out as it should be. The extreme long setting also tends to confuse the HFR calculation (lowers it) and skews the linear fit of the v-curve:

In my example, the initial state is 6830, the first starting point is 6830+4*25 = 6930.
The focusing algorithm realised it had run out of steam at the shortest focuser extension and started again.
It assumed 6980 as the mid point and then moved to 7080. 12 steps later, it worked out the focus. I think the assumed midpoint should have been the minimum of the prior sequence and not something completely out of the initial range? Does that seem sensible?

#7

yup, I get this same behavior. Your idea of starting with the lowest point as the assumed minimum sounds very promising. I think the current scheme of moving 1/2 the range (?) really only makes sense when the graph looks like / or \ in which case moving a relatively large amount is warranted. But if there’s a V it seems to make sense to assume the minimum is near the final focus point. Not trying to design this for Ken and Jared, but I think you may be on to something there.
Andy

www.mainsequencesoftware.com