Bullet-proof auto focus with platesolving

Would love to see SGP autofocus use platesolving to select known stars. This is how the Planewave folks do it. It works all the time for any target. No need for initial calibration.

Not sure what you mean by initial calibration in this post. SGP auto focus, at least the version I am using (I have not gone to the newer 3.1 versions because of QSI driver issues) does not require any calibration.

SGP Auto Focus requires you to select a minimum star size to help select “stars”. But you can still pick up very small objects like globular clusters or galaxies. This skews the calculated HFR and makes for a less than perfect focus. Platesolving resolves this my guaranteeing you always use stars. When I compare SGP focus results to those done by Planewave, the Planewave results are far more precise and repeatable.

There is a focus target feature in SGP but it is often overlooked

Even if a small galaxy or globular is included, the HFR average value over the whole FOV from one autofocus sample to the next should be “relatively” valid for that FOV. Thus the focus setting for the minimum HFR point found should still be a valid “best focus”. It there is bad seeing or scope motion from one sample to the next, then the results might be skewed.

I’m interested in K_G’s finding that the Planewave focus results are “far more precise and repeatable”. Do you mean better accuracy such that your imaging results are superior? Is the SGP result jumping around so much that you have low confidence that the imaging results will be good? I have this problem from time to time but it is typically due to bad seeing or wind blowing the scope during autofocus.


Hi Kent, with the Planewave platesolving focus technology I see focus vary from ideal +/- 50 micron. This is +/- 200 micron with SGP. I’m guessing this is due to using non-star objects, but I’m not 100% sure.

Hi K_G,

With SGP's new least-squares parabolic fit, the vertex should be

fairly accurately determined depending on step size and number of
steps. With my setup, when the seeing is good and no wind, the
best-focus determination seems to be within +/- 3 steps or so from
one run to the next immediate run. If I’ve done my arithmetic right,
a rough calculation based upon the Robofocus stepping motor rotation
(3600 steps / rev) and diameter of my Crayford-style focuser roller
(3.18mm) says that the precision (not necessarily the accuracy) is
on the order of +/- 3 microns run-to-run. BTW, I had to change my
step size when the new algorithm came out as the results were
inconsistent. I have an F/4.2 Newtonian which requires more accurate
focusing than, say, an F/8.

You should still get good focus even with a field of fuzzy objects

as you would just get higher HFRs but the minimum should still
represent good focus. Unless, of course, the curve turns out flat
due to the fuzzies. Good focus also presumes stable conditions
during the autofocus run.

I'm always looking to improve focus/tracking on my system, although

it seems to work quite well, thus my interest in your experiences.


Whiskey Creek Obs Logo 7.jpg

I’m similar - I monitor the autofocus and I’m within +/- 5 steps of optimum, each one being 4 microns. Tracking and seeing conditions have more effect on actual exposures.

Here’s a typical result from my setup on a very steady night. I belieive the small galaxies skew the results.

What ‘mean’ HFR did this image give?

From a look at the values most of them are in the range 1.0 to 1.7, mostly around 1.3. There are a few that are significantly below 1 and three that look like extended sources and a HFR of over 2.

Using the median HFR instead of the mean could help to ensure that the outliers at both ends aren’t involved.

Here’s a new one with the results. What do you recommend?

I should add this particular focus was off. Planewave calculated a more precise focus of 5853. Planewave is ALWAYS very precise. SGP varies. In this case SGP was almost 100 microns off. In the above example, SGP mistakenly used at least one galaxy and a “double” star. The Planewave platesolving algorithm never lets this happen. It ALWAYS uses single stars.

Outlier rejection may help in some cases. But platesolving always works.

Obviously wrong.

Hi K_G,

Regardless of the HFR value, the most important thing is that the focus curve is represented with good quality. That being the case, the minimum HFR value should give an accurate focus point. What does your focus curve look like?

The focus curve is occasionally non-symmetrical due to the problem identified above. For example, depending on seeing and focus position, a “double” star is measured as one star during one focus step and 2 stars during another focus step. Many other “non-stellar” objects cause distortions to the focus curve. These are subtle, but in my case can lead to a +/- 100 micron (or more) focus deviation from optimal. The Planewave focus technique always achieves nearly perfect focus by using platesolving to guarantee only single stars are measured. As Chris mentions above, an outlier rejection algorithm may help in most cases, but IMHO, selecting known stars is the ultimate solution.

In the example focus graphs above there are a few double stars included as a single star. For those specific graphs I would guess that maybe 5% of the flagged stars are double stars. That is not going to change the results of the focus routine by one iota. Most importantly, the same set of stars/double stars are going to be selected at each focus point, mostly. I say mostly, because they are not exactly the same set of stars at each focus point. When there are this many stars in the image it hardly matters.

Where it really matters is for really challenging focus situations, such as very long focal lengths, or small sensor at small resolutions, or in star poor regions, and particularly if the target is a globular cluster. In those cases where only a few stars are found by the routine, the inclusion of double stars dilutes the sensitivity of the result. Over a normal focus range where an individual star HFR will go from 2 to 8, a double star treated as a single star will have its HFR go from 10 to 13, a 10 to 1 difference in sensitivity. This will also be a significant factor in a very star rich field where a very large percentage will be double stars.

I have proposed a very simple fix for this which has never been implemented. Only include in the final average HFR the 50% of the stars with the lowest HFR values. This will eliminate almost all the double stars with insignificant processing overhead. The developers have stated that they tried some code that did eliminate the double stars, but it was too cpu intensive to use. Why not try my suggestion. Probably ignoring the largest 20% or 30% would do the job nicely.

Making sure to use exactly the same stars at every focus point is important for really difficult, star poor images.

There is also a serious need for an improved star detection routine. The current routine fails to recognize any stars on my Televue NP127is refractor at an HFR around 10, even through there are many quite distinct, perfectly formed stars in the field. Other products I have tried can identify these stars well past HFRs of 20+. This deficiency severely limits the ability of the focus routine to recover from badly out of focus situations.

About the focus routine used by Planewave, of which I know nothing. But surely there is something it is doing very differently than just the identification of stars that is giving you better results. What do we know about how it operates, beside using a platesolve to identify the stars?

I agree with all except the “one iota”. Measurement of double stars (and other objects) come and go with seeing and focus among the exposure steps. This causes a significant distortion (bias) in the fitting curve.

IMHO, an algorithm that 100% guarantees only single stars will be used in the best solution. This is probably best done with platesolving and smart star pattern detection logic to ensure you’re only using one star. I don’t know the details of the Planewave algorithm, but I can tell you it’s very good.

I would also like to see something like this implemented. The solution suggested by jmacon (or even a median instead of a mean would really help in these challenging cases).
My autofocus has been working great so far but today I had an issue with M42. There are few stars around and the core is been picked up, biasing the results. I think the bright core also biases the star detection threshold so fewer stars are pick up.

There is something else to consider, that potentially has a bigger bearing on the final result. The minimum star size at 1x1 can cause issues if it is set too high. I have seen instances where stars are consistently measured until they get close to focus and then they are ignored, as they become too small. It causes oddball results close to focus.