Focus - Quit when good enough

This happens quite a bit so figured I would suggest it. Due to temp change the focus curve often looks like this:


Since it starts on the right and has good data on that side, the extra exposure/data on the left does not contribute much. Could we have an option not to continue past a good fit?

It would also be nice to have an option to skip the confirming exposure at the end since when it is operating unattended, this also does little.

t would also be nice to have an option to skip the confirming exposure at the end since when it is operating unattended, this also does little.

This is not true. When a strong deviation between minimum HFR of the AF run and HFR of the validation frame is detected, the result of the AF run is invalidated. The current behavior is absolutely correct, it might e.g. indicate a wrong focuser backlash setting. Therefore it should not be changed, not even as an option.


1 Like

Perhaps you should re-read my post. The confirming exposure is totally irrelevant in real automated imaging sessions (which is kinda the point of using SGP in the first place). I have been using SGP for over 5 years and 20 years of imaging before that and never once used this feature in the middle of the night during an automated run. That probably has something to due with the fact that I am sleeping! What you say is technically correct but irrelevant in unattended automated runs.

Once again, I am not asking to eliminate the feature, just to be able to disable it because it does no good whatsoever to pop up a message when one is sleeping - which is almost the whole point of automation.

In fact, a feature to enable it only for manually triggered runs and maybe for the first run in a sequence would be even better since those are the times when the operator is actually watching the run.

I think one method SGP uses to find the best focus is the intersection of the left and right side lines. This would imply that the left side data points are as important as the right side ones.

Yes, of course, but not really my point. If both sides already are giving solid data, there is no point to adding more on one side.

In essence, you are saying that if 3 points are aligned (within some tolerance), no need to add a fourth. That is not unreasonable although not a big deal.

Correct, plus optionally not doing the confirming exposure when no-one is watching to see the results.
This would not save a lot of time for LRGB but could save quite a bit for narrowband.

I’m imaging unattended all the time these days. In good conditions, with a good curve, your assertion makes sense, especially the bit about automated AF, rather than manually triggered AF. The only thing I would concern myself with is with those curves that have a rogue point or two and a few more points make a statistically better slope calculation? My RCT, if it is even slightly out of collimation will have dodgy intra focus results.

Agreed! I would not want this option to be used except with a system you know is well behaved. Both my FSQ system and my 200 mm system almost never act flaky so for that sort of system it would be appropriate, IMHO. My TOA, being longer F.L. - not so much - so would use the present options there.

Which is why you should be able to turn it on/off.

yes, I think if the fit is good we can skip the validation frame. The trick is determining what good is.


There is a really easy way to determine good focus. I have suggested this in several other posts, but I will repeat it here since you have mentioned it.
You are already calculating the least square fit best lines for both the left and right sides of the, hopefully, V curve. Just sum the deviations of each data point from the value on the best fit line. You would want to ignore the lowest values in the center of the V that are not on either line. Suitably normalized, that is an excellent measure of the quality of the focus.

If you allowed the user to specify a minimum acceptable value, and allowed some corrective action to then be taken if the focus fails, you will have accomplished a MAJOR IMPROVEMENT in the focus routine. The current behavior of the program to move my focus from a perfectly good position due to a disastrously bad focus run resulting from clouds, has caused me to lose large portions of many nights imaging.

I observed this behavior as well and support this suggestion (evaluate deviations from linear fit) for judging the quality of the of the focus. An even better criterion would be the coefficient of determination, R², of the quadratic fit (parabola) of the focus curve (see Proposal of a "Quadratic Fit" Auto Focus evaluation method).

And an additional request:
I observed that when no HFR can be determined in the first image of an auto focus run, currently the value zero is used for the linear fit! This is absolute nonsense. Of course such a result has to be discarded. Either (failure due to clouds) repeat the image at the same focus position or (failure due to a starting focus position too far from best focus) proceed normally with the auto focus run.