×

INDI Library v1.8.9 Released (01 Mar 2021)

INDI monthly update. In addition to driver improvements, major code refactoring is in progress by @pawel-soja to modernize and improve INDI aging code.

New forum users, please go here first: indilib.org/forum/new-forum-users.html

Temperature and Elevation focus compensation

  • Posts: 332
  • Thank you received: 96
FYI, new code was submitted last night that adds the mount altitude angle to the existing kstars log and autofocus log. After merge, the altitude will now be at the end of each line:
autofocus log (located in .local/share/kstars/focuslogs/):
date, time, position, temperature, filter, HFR, altitude
2020-09-01, 22:35:46, 50100, 15.0, Red, 1.692, 37.5
kstars log has a similar, but different formatted entry:
Autofocus values: position, 50100 , temperature, 15.0 , filter, "Red" , HFR, 1.69168 , altitude, 37.4758

The prior version of the log entry already facilitated plotting temperatures against focuser positions. The new code provides users with info needed to find the altitude residuals trend.

For those that don't know how to process the data (but want to), do the following: (Note that your focuser should be well behaved...no major slipping or out-of-control backlash or your trendline functions will be suspect)
a. Import the autofocus log into your favorite spreadsheet or charting app and plot all temperatures against corresponding focuser positions. Set a linear or quadratic trendline for the data and display the equation.
b. Create a new column that subtracts the above equation from each focuser position (on the same row). This is the residual of the measurement after factoring the temperature trend.
c. Plot the residuals column (from b above) against altitudes, set a trendline, and display that equation. This is the elevation residual function.
You can now calculate your autofocus "seed" position for any temperature and elevation. Add the two functions together using the input temperature and elevation. I've provided a sample spreadsheet clip below that hopefully helps folks understand the setup a bit better. The top line shows the seed position calc for my gear (partial data). In my case, indications are that I must adjust my focuser ~75 counts for each degree (C) change, and also ~21 counts (+/-) for each degree change in target altitude angle. Running the focuser seed calc after a slew and setting the focuser position to the seed before running autofocus allows tighter parameters, keeps autofocus runs short, and increases successful outcomes. Automation (future) is certainly possible, but for now, I hope this info helps folks get a better handle on focus performance. Cheers, Doug

RASA11, Celestron CGX-L, ASI183mc Pro, 60mm guider + ASI290mm mini, ASI EAF focuser, PPB, Rpi4-4Gb+SSD, Powered USB3 hub, hardwire Ethernet.
Last edit: 1 month 1 week ago by dmsummers. Reason: Updated temperature & target altitude charts
7 months 1 week ago #59280
Attachments:

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

  • Posts: 245
  • Thank you received: 26
Is there a trick to enabling the focus logs? I did have some older ones, but I don't seem to be generating them at the moment.

Thanks
120 MM Skywatcher Esprit on Celestron CGX, ZWO ASI 224MC guiding, Pegasus FocusCube v2
Nikon Z7 8256 x 5504, 35.9 x 23.9mm 4.34 um. Triad Ultra Quad NB Filter
1) Odroid-N2 Ubuntu-mate 20.04 2) StellarMate on RPI4 8G
The good, the bad, the ugly at sciencedowneast.no-ip.ca/zenphoto/
7 months 1 week ago #59337

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

  • Posts: 332
  • Thank you received: 96
After selecting the main Ekos tab (wrench), the configure Kstars popup will have the settings. Set verbose, and focus. Cheers, Doug

RASA11, Celestron CGX-L, ASI183mc Pro, 60mm guider + ASI290mm mini, ASI EAF focuser, PPB, Rpi4-4Gb+SSD, Powered USB3 hub, hardwire Ethernet.
Last edit: 7 months 1 week ago by dmsummers.
7 months 1 week ago #59341
Attachments:

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

  • Posts: 504
  • Thank you received: 126
I was just looking at trying to implement temperature compensation as well. I've been looking closely at my data, graphing FWHM and frame quality over time, and it varies a lot with my EdgeHD 11. But once I have this data and plot it, how do I get the information into EKOS to utilize it? I don't see anything obvious for inputting the temperature focus parameters. There's a refocus if temperature changes, but that seems like a brute force method. I'm looking to have something that will adjust automatically throughout the night.
-Andrew
––––––––––
Mac Observatory - All about using the Mac for Astrophotography: www.macobservatory.com
Astrobin: www.astrobin.com/users/Lead_Weight/
5 months 3 weeks ago #61926

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

  • Posts: 1071
  • Thank you received: 186
Does this not calculate atmospheric refraction vs altitude in a linear relationship? Surely that is not the reality, as the atmosphere is more substantial at lower altitudes Especially below 30°.
INDI/KStars on Raspberry Pi 4, 4gb
Raspbian Buster with AstroPi3 script configuration
Skywatcher HEQ5 Pro Mount
Canon 600D Camera
Orion SSAG/ASI120mm @280mm Guide Scope
PHD2
Waveshare Stepper Motor Board - DIY Focuser
Adafruit GPS Module
Generic Bluetooth Joystick.
Startech 7 port powered USB Hub.
5 months 3 weeks ago #61954

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

  • Posts: 332
  • Thank you received: 96
@Andrew: There's nothing automated currently except the log entries (to help figure out the functions). I was hoping the idea would spark greater interest so automation could go further, but alas, it just didn't seem to extend beyond a few people. What I envisioned after logging was the ability to define the focus function terms (config file or gui update), and then have ekos auto-update the "seed" focuser position after slew so that a subsequent autofocus run would take advantage for efficiency. For my rig, having a temp function helps, but having both (temp and alt angle) makes autofocus runs really efficient. This idea may be implemented in the future if more interest develops. For now, not ideal, but I just manually update the focus position before running autofocus. It's much better than just running a blind autofocus and potentially having it wander.
RASA11, Celestron CGX-L, ASI183mc Pro, 60mm guider + ASI290mm mini, ASI EAF focuser, PPB, Rpi4-4Gb+SSD, Powered USB3 hub, hardwire Ethernet.
Last edit: 1 month 1 week ago by dmsummers.
5 months 3 weeks ago #61984

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

  • Posts: 332
  • Thank you received: 96
@ihoujin: The example I initially used was simplified so that those who might not otherwise enjoy any discussion of math, would understand the basic concept of temperature and altitude angle focus compensation. It is definitely true that airmass (which is the function of alt angle we're most interested in), is non-linear. Temperature is most likely going to be linear for everyone. Fitting a linear function for alt angle would work better than nothing, but a 2nd order polynomial would likely work better than linear for folks who expect to "go low" often. Most folks won't go to the trouble to capture both temperature and altitude angle functions (even though it's easy enough to do...I gave the receipe in the OP). If you're one that want's both (as I do), then just trend the data and fit a polynomial you feel works for your data. cheers, Doug
RASA11, Celestron CGX-L, ASI183mc Pro, 60mm guider + ASI290mm mini, ASI EAF focuser, PPB, Rpi4-4Gb+SSD, Powered USB3 hub, hardwire Ethernet.
Last edit: 1 month 1 week ago by dmsummers.
5 months 3 weeks ago #61985

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

  • Posts: 1071
  • Thank you received: 186
It is a wonderful idea, certainly the next logical step ahead of refocus on temperature change. And an elevation criterion on its own would also be applicable to most astronomers, since a majority probably don't monitor temperatures.
INDI/KStars on Raspberry Pi 4, 4gb
Raspbian Buster with AstroPi3 script configuration
Skywatcher HEQ5 Pro Mount
Canon 600D Camera
Orion SSAG/ASI120mm @280mm Guide Scope
PHD2
Waveshare Stepper Motor Board - DIY Focuser
Adafruit GPS Module
Generic Bluetooth Joystick.
Startech 7 port powered USB Hub.
5 months 3 weeks ago #61988

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

  • Posts: 332
  • Thank you received: 96
FWIW, structure expansion/contraction as a function of temperature should be the dominant function, especially given that most folks will want to image in the lowest airmass (highest elevation) possible. This reduces the importance of elevation residuals to low south observations (northern observers) or low north observations (southern observers). For the greedy ;-) , I'm not sure I'd trust only having an elevation function (desert locations will have huge temp swings that should be factored), but the recipe would be essentially the same (swap el for temp, and just ignore the residuals).

Edit: I've updated the charts for my setup (updated in the OP). There are ~300 autofocus sequences captured from July to Nov. Based on the results, I've altered the elevation residual function to a 2nd order poly (still not quite powerful enough...but sufficient). The temperature function dominates (5 degree change drives ~400 focuser count shift), while elevations above ~40 degrees do not really drive noticeable offsets. Observations below 40 degrees elevation do drive significant offsets. Your gear & results will differ, but the trends will likely be similar.
Cheers, Doug
RASA11, Celestron CGX-L, ASI183mc Pro, 60mm guider + ASI290mm mini, ASI EAF focuser, PPB, Rpi4-4Gb+SSD, Powered USB3 hub, hardwire Ethernet.
Last edit: 4 months 2 weeks ago by dmsummers. Reason: removal of older graph....updated in OP
5 months 3 weeks ago #62001
Attachments:

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

  • Posts: 226
  • Thank you received: 29
This is really cool analysis capability, can it be added somehow to Ekos internally without the need to export and load into a spreadsheet?

It's excellent as it is, but always thinking of better. I know the team are making loads of commits to get 3.5.0 stable, but this would make a worthy future feature.
__
I blog my progress: www.coochey.net
5 months 3 weeks ago #62044

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

  • Posts: 332
  • Thank you received: 96
Another update: I've now got ~300 on-sky linear focus runs analyzed (see chart in original post). I've driven my gear 3K miles over bumpy roads to setup/teardown in remote observing locations, so if there were a problem with focuser stability, I would have seen it. Data presented here were collected over several months this year, and represent 100+ images (10K+ subs). There is a 40 degree F temperature spread and a full set of elevations in the dataset. Any further updates wouldn't significantly change the findings.

I'll make the bold statement that temperature and elevation focus compensation could benefit everyone who takes the time to characterize their gear (via the existing focus log entries). This is especially true for faster focal ratio setups. I've seen the difference, and it's appreciable. Updating the focus position (seed) before starting autofocus always results in a minimized,symmetric V curve. I no longer worry about donuts or run-away anomalies, and focus updates are more efficient. For scheduled or remote/unattended observations, I would think this would especially add robustness and less overhead.

So, I'd like to ask if there's someone from the core developers who might want to partner with me to resolve final details, and modify the focus code for a future release. I've never been a GUI developer. I can definitely drive requirements and help with coefficients file logic and seed update logic. The GUI work should be minimal (enable switch for compensation seed auto-update). A minimalist approach now could be followed later with more sophisticated automation. Comments? Any takers? Thanks, Doug
RASA11, Celestron CGX-L, ASI183mc Pro, 60mm guider + ASI290mm mini, ASI EAF focuser, PPB, Rpi4-4Gb+SSD, Powered USB3 hub, hardwire Ethernet.
The following user(s) said Thank You: Herrhausen, gilesco
Last edit: 4 months 2 weeks ago by dmsummers. Reason: removed charts as they were updated in the original post for the latest update
4 months 3 weeks ago #63131
Attachments:

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

  • Posts: 30
  • Thank you received: 15
Very interesting data. It would be interesting to map the two curves against the calculated refraction coefficient , since I think that's probably the largest part of the differentials you are seeing. Assuming a weather source is configured, Ekos should have that data somewhere, perhaps a script could be genned up to log the calculated R, temp, pressure, humidity, current step, elevation angle, and current HFR. This could be used by the focus module to maintain a quadratic that could be used to auto-configure R and the the focuser at runtime, and perhaps condition other activities as well.
Last edit: 4 months 3 weeks ago by bdavis.
4 months 3 weeks ago #63411

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

Time to create page: 0.789 seconds