Autofocus range expansion simplification suggestion


#1

Continuing the discussion from Focus extension - simplification?:

My autofocus routines start with a good approximate position but the new algorithm would sometimes have the answer on the graph but choose to re-do the AF, with a starting point much further out.
I normally use 7 points and I took on board Ken’s suggestion to use 9 points with slightly smaller step sizes. That did not cure the problem and I still (occasionally) have a very extended focusing sequence, when the range has to be extended outwards:
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.
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 as well, to get past the optimum focus position. (I have captured it on video if you need to see it in action.) At a first glance, it looks like the newly computed start point (furthest extension) is shifted about twice as far as it should be. The extreme long setting really is out of focus and the lower intensity also tends to confuse the HFR calculation (artificially 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.

My suggestion is to either, if backlash is enabled, just add more points at the ‘long end’, rather than repeat the whole sequence or if this causes issues for some (say mirror shift etc), assume the new midpoint of the sequence is the minimum of the prior sequence and not something completely out of the initial range. This may have to be conditional on a sensible minimum HFR value of say less than 2 or 3. I’m guessing your current strategy is to have no over-lapping ranges that can overlap if required by adding more points inwards?


#2

Archiving. We’d like to look at your other suggestion. This behavior can currently be disabled and use a weighted average method and avoid extended or runaway AF runs.


www.mainsequencesoftware.com