Chris.
Perhaps I named it poorly, I would be open to renaming it when I remove the "experimental" in the name--so suggestions are welcome. I called it linear, I guess to contrast it to the polynomial algorithm.
The main characteristics of the algorithm (mirroring much of what Jo said) are:
- It takes regularly sampled HFR values, i.e. (mostly) moving the position inward by a fixed amount--step size in the 1st pass of the algorithm, and 1/2 step size in the 2nd pass. The polynomial algorithm varies the change in position.
- It hardly ever changes direction, and mostly moves inward. It takes a number of samples inward to establish an approximate minimum-HFR position, then makes a 2nd inward pass looking for that minimum. The polynomial algorithm can move in and out often.
- It only samples the HFR after an inward move. When it needs to move outward, e.g. in between the the 1st and 2nd passes, it moves outward much further than needed, and then back in before capturing an image. Polynomial has no such constraint.
I like to think of this algorithm as "slow and steady". It will hopefully be less sensitive to backlash and measurement noise, but will likely take more samples to achieve its minimum HFR than a successful polynomial search.
The polynomial that is displayed is used to help find the minimum position, and stopping position, and, for example, as a check to see if there will be a minimum at all for the current sampling plan. A red polynomial means a failure (no minimum, just a maximum). The polynomial is only computed after several samples.
There are some details that may violate the above principles (e.g. it may skip some samples if it thinks it's far from the minimum), but in general that's the way it works.
Hy