A few additional thoughts which might be folded into the larger thread on improved autofocus in SGP4:
Minimal request is for single line for each successful autofocus in log file containing
Timestamp Filter Temp FocusPosition HFD
Users can then extract just those lines from many logfiles over time build a robust focus model for each setup.
The reason we need HFD is to use as a “weight” when running a linear regression of foes position against temperature. Better-focused images “count more” in computing the temperature coefficients. Might also include some kind of metric from the autofocus routine like goodness of fit of the v-curve.
A much better solution that would be a bit more work for developers would be to accumulate these data in a separate database or file which would be used by SGP4 itself to build and improve a robust focuser model over time (weeks or months).
I’ve attached my own focuser model built with a OSC camera (ASI094c) over the past few weeks. This is with a Borg 125SD f4, and Optec FocusLynx with temperature probe taped onto the OTA. Focus steps are 1.2 microns and the CFZ is just 38 microns = 32 steps!
Notice that the temp range is about 25 C! (temp range of 45 Fahrenheit) I could never have gotten such a wide range of successful autofocus temps over a single night. That’s key to getting a robust estimate of the temperature response of the focusing system.
Also notice the wide scatter in focus positions around -8 to -9 C. This was due to passing high clouds that interfered with the SGP autofocus routine (different sets of stars averaged for each focus exposure as clouds passed by). Other sources of error include mechanical issues in the extreme cold and differential expansion of different components during periods of rapid temperature change. Just grabbing a pair of these measurements would potentially get the temp compensation factor wrong by a factor of 10!
All of the above-mentioned issues give the impression that the temperature response is nonlinear or unpredictable/inconsistent when performing the recommended procedure of just taking two focus measurements a few degrees apart. Yet those impressions are WRONG as shown by the remarkable fit over many nights explaining almost 90% of the variance in focus and nailing the temp coefficient within a few steps.
This simple example is for a one-shot-color imager. For LRGB or any filter wheel setup, we also need to record which filter is used for every successful autofocus event (and we need lots more data!). The procedure is then to obtain separate regression lines for each filter. Temp comp is the average slope of those regression lines, and filter offsets are the differences in intercepts (each filter intercept minus Luminance).
I use a sophisticated “robust linear model” routine in R to iteratively obtain a slope and intercept that are not sensitive to outliers. With enough data spread over a wide enough range of temperature this wouldn’t be a problem, but you’d need to collect a LOT of data, especially if you also wanted to get 4 to 8 filter offsets!
In summary:
1) please give us [filter timestamp temp focusPosition HFD] on a single searchable line in the log file following every successful autofocus; and
2) consider saving these data yourselves over weeks or months and having SGP’s focus module build and improve a robust linear model of focuser behavior that can be reliably used to interpolate focus positions between widely-spaced autofocus runs