×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Temperature and Altitude (residual) focus compensation

  • Posts: 398
  • Thank you received: 117
Hey Pit, FWIW, I'm not using the 10/1 either. The EAF instructions for the Celestron were to remove that part of the focuser assembly and use the main focus shaft. So, all should be well, although I will watch to see if I need to be more careful about how I position before powering down so I won't screw up my focuser dataset going forward. Hopefully my dataset will tighten up a bit now and give my elevation residuals a better fit.
The following user(s) said Thank You: Peter Sütterlin
3 years 2 months ago #66376

Please Log in or Create an account to join the conversation.

  • Posts: 398
  • Thank you received: 117
I have been busy implementing what I'm now calling Adaptive Focus Control (AFC) in kstars/ekos in the last few weeks, and I'm happy to report that a version of this is now running! I have tested this both on a laptop Ubuntu setup (with remote INDI on Pi4), and also on a standalone Pi4 development env. My test focuser (ASI EAF) is absolute, but all currently supported focusers should work. I've tested this with real HW, but only off-sky thus far (cold box conditions). A multi-night on-sky test is planned in early March.

This message is a heads-up for anyone interested in Autofocus "seed" start positions or "between exposure" focus updates to turn on verbose level focus logging to collect needed temperature and elevation focus sensitivity characterization data (already implemented - see OP for details). That data, and a reasonably well-behaved focuser (possibly with backlash setting if needed?), is all that will be required to take advantage of the new AFC features.

I could use some beta test feedback from a volunteer or two who have their own kstars/ekos development environments. I am already testing very short f-ratio (f/2.2), but could use feedback from longer setups (f/4, f/7 preferred, but even f/10 would be of interest). The new code is compatible with all current focus capabilities (e.g scheduler switches for autofocus constraints, etc.). If interested, please send me a private message and I'll forward the new files and build / test instructions. The integration is just a simple replacement of a few existing files plus 2 new files. Hopefully, after some beta test feedback, this can be merged with the kstars/ekos baseline in the not too distant future. Stay tuned!...

Cheers, Doug
The following user(s) said Thank You: Jasem Mutlaq, Ken Self, Andrew Burwell
3 years 1 month ago #67520

Please Log in or Create an account to join the conversation.

F7.5 here, would be happy to test this.
3 years 1 month ago #67528

Please Log in or Create an account to join the conversation.

  • Posts: 269
  • Thank you received: 53
I'm happy to give it a try. I am F5.5 with an Optec TCF focuser. I'm interested to see how it goes with a non-linear temperature compensation, between images corrections and altitude correction. I can compare with the built-in linear, continuous corections.
The Optec has a temperature probe. Can I read the temperature from that probe and does the temperature property need a specific name to be usable?
3 years 1 month ago #67532

Please Log in or Create an account to join the conversation.

  • Posts: 398
  • Thank you received: 117
I can't say whether the Optec's probe will work or not (I suspect it will, but the only way to know for sure is to turn on the focus verbose logging and look at the result as given in the OP). You'll need that information as it's the basis for AFC. I'd be very interested in having an f/5.5 test point! Please send me a PM and I'll bring you up to speed on what's required. First....the focus log to be sure your focus temperature probe is being recognized.... Cheers, Doug
Last edit: 3 years 1 month ago by Doug S.
3 years 1 month ago #67534

Please Log in or Create an account to join the conversation.

  • Posts: 1309
  • Thank you received: 226
Is it possible to use a temperature probe on a Raspberry Pi via GPIO for this? And if so, are there any recommended probes to use?
3 years 1 month ago #67547

Please Log in or Create an account to join the conversation.

  • Posts: 398
  • Thank you received: 117
Hi Ken, FYI, I sent you a PM (in case you haven't noticed it). Please take a look and reply via the PM reply interface. Cheers, Doug
3 years 1 month ago #67569

Please Log in or Create an account to join the conversation.

  • Posts: 269
  • Thank you received: 53
Reply sent by PM
3 years 1 month ago #67601

Please Log in or Create an account to join the conversation.

  • Posts: 398
  • Thank you received: 117
FYI, I released AFC code today to a few "alpha" testers with their own development environments. There's still some room for additional people who might be willing to receive and check out this code. If you're interested in temperature and altitude focus compensation (autofocus start position seeds and/or "between exposures" focus adjustments), please send me a PM and I'll get you the code and bring you up to speed on how to build/run it.

For everyone else who might be interested in using this feature in the future, this is a second heads-up that you should enable verbose focus logging now to start storing successful autofocus summary (CSV) data needed to create a model for AFC. The needed data currently is logged to a file in CSV format here:
~.local/share/kstars/focuslogs/autofocus<date>.txt.

You don't need to save kstars/ekos logs if you don't want them for other purposes, but save those autofocus<date>.txt files! A good set of autofocus logs containing a spread of temperatures and (optionally) target altitudes will make for progressively better models. Getting a leg up on collected data before it's needed is a word to the wise. Cheers, Doug
The following user(s) said Thank You: jiberjaber
3 years 1 month ago #67730

Please Log in or Create an account to join the conversation.

  • Posts: 398
  • Thank you received: 117
FYI, automation of coefficient calcs has been added. No more need for spreadsheets. To achieve this, an AFC analyzer function needed to change how autofocus<date>.txt files are created/stored. It also needed to change the CSV file format to include a filter offset. This implies that old autofocus<date>.txt files, while still very valuable, need to be pre-processed before AFC can analyze them. Old files will need to be concatenated into a single file with filter offset values added. If anyone out there is good with awk/sed scripts (and might be willing to help write a simple concat/conversion script), let me know. It probably took me longer to type this than a good script developer would take to write a script to convert the old files! FWIW, AFC could just start over collecting data for analysis, but it would be a shame to ignore anyone's precious historical data. The old & new autofocus CSV file formats are below:

Old format (one file per date; "autofocus<date>.txt"):
date, time, position, temperature, filter, HFR, altitude
2021-02-19, 7:24:37, 54295, 15.1, Luminance, 1.382, 52.0
2021-02-19, 8:32:02, 53949, 14.4, Red, 1.791, 74.2
etc., etc., ....

New format (all dates in one "autofocus.txt" file, plus added filter offset for each row):
date, time, position, temperature, filter, offset, HFR, altitude
2021-02-19, 7:24:37, 54295, 15.1, Luminance, 0, 1.382, 52.0
2021-02-19, 8:32:02, 53949, 14.4, Red, 100, 1.791, 74.2
etc., etc., ....

Be aware that unless a script/tool is provided to convert old files, if you want to analyze your historical data, you'll have to convert these (or just let AFC start over collecting data to be analyzed for coefficients calculation).

Also FYI: A modification to the focus GUI (new tab) is in the works. It replaces the "gen-1" AFC configuration file. Consistent with the config file, separate controls for enabling/disabling autofocus start position ( the AF "seed"), updating focus between Light frames, <optional> altitude residuals compensation, and performing historical analysis (calculating coefficients) are anticipated. A focuser move control will suppress sending move commands until a threshold value is crossed. A couple of buttons will allow updating analysis (coefficients update) and saving settings.

Finally, a git branch was created for the first code revision (updated last night for the latest kstars/ekos release). While usable now by those with development environments (via config file control), this branch hopefully will be updated with a GUI in the coming days/weeks. A hearty thanks to the volunteer alpha testers who provided early support as AFC progressed! Hopefully in the near future, all who have reasonably stable motorized focusers and an ambient temperature sensor will enjoy more sophisticated focus control(s). I hope to have good weather for several nights remote testing on-sky this coming week and will report findings afterward. Until then, Cheers, Doug
The following user(s) said Thank You: Alfred, jiberjaber
Last edit: 3 years 3 weeks ago by Doug S.
3 years 3 weeks ago #68029

Please Log in or Create an account to join the conversation.

  • Posts: 147
  • Thank you received: 12
What happened to this?
1 year 5 months ago #87512

Please Log in or Create an account to join the conversation.

  • Posts: 398
  • Thank you received: 117
Long story short, this functionality was fully implemented, but was never migrated and released. Focus logging enhancements needed for characterization were released, but the remaining code (automation of trendline coefficients, and the config file / control code) were only sent to Jasem and a few others for testing. Jasem thought a GUI based control would be nicer than the implemented config file, but no developer was found to do that (not my skill/desire). I subsequently offered to give the code to anyone who wanted it, but there were only a few takers. Old habits die hard, and most people don't mind running focus repeatedly on a target during the night (especially if it's automated, regardless of whether those runs waste a lot of time).

For me, I could never go back to "standard" Ekos focus methods. An initial "seeded" focus run per target, followed by apriori trendline based focus adjustment between exposures, keeps emphasis on imaging, avoiding a lot of wasted time "re-finding" focus. For a while I tried to keep pace with new Ekos versions, but IMO there was too much "tinkering" and a bit too much instability being added to justify continuing that. Once I found a stable, non-crashing Ekos version that I could trust and served my purposes, I stayed out of the fray. The reality is that until folks care more about the amount of time being wasted on focus, there's no need for this feature. The hobby's gear is heavily biased at f/5 and longer, and as a result, those of us who are super-sensitive to focus (f/4 and shorter) are in the minority and need to fend for ourselves. If interested in the code, send me a PM. cheers, Doug
Last edit: 1 year 5 months ago by Doug S.
1 year 5 months ago #87517

Please Log in or Create an account to join the conversation.

Time to create page: 0.531 seconds