×

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: 33
  • 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: 3 years 4 months ago by Brian Davis.
3 years 4 months ago #63411

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

  • Posts: 398
  • Thank you received: 117
@bdavis: I don't think refraction is the major residual driver. Educated guess is that refraction comes into play only for the last several degrees above the horizon. As you can see in the residuals chart, the effect is from 40 degrees downward (but also to a lesser degree in opposite sign above 50 degrees). Regardless, elevation is sufficient (if not perfect) to map and counter the impact. If the desired goal is to seed an autofocus run, then temperature and elevation are fine. Even If the goal is more ambitious (like auto-updating focus position between each subexposure), a temp+el approach should still be sufficient. The focus log provides position, elevation, and temperature for doing the characterization (i.e. deriving the function coefficients). Ekos runtime knows the temperature (when a focus or weather sensor is known) and elevation. So, with a characterized focuser and added GUI control(s), a user could either autofocus with a better starting seed, and/or autoupdate focus position after each subexposure. Simply running with an updated starting seed would be significantly more effective/efficient than doing a blind autofocus after a slew, especially when the new target is below 40 degrees elevation and the prior target is higher.
3 years 4 months ago #63427

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

  • Posts: 33
  • Thank you received: 15
@dmsummers, I'm theorizing only, but given the data you presented, I'm going to bet on refraction being your main residual driver below 40 degrees elevation angle. My logic is as follows: 1. The focuser is mainly using HFR, which is a measure of the size of the circle encompassing the star in the image. 2. Refraction directly effects the measured size of the circle, mainly beginning at 40 degrees above the visual horizon, as illustrated below:



3. Changes in the HFR outside the expected due to step movement show up as residuals (error) in the measured HFR, forcing the measured points to fall outside the polynomial used to determine best focus.
4. Temperature, pressure, humidity. dust, in the air volume the light passes through, all change the refraction of received light, with temperature and density (pressure) being the primary factors in changes in refractive index (and thus changes to the measured radii of stars)

What I don't know, is the size of the HFR errors produced by refraction at 40 degrees and below, or their stability and how they compare to the data you've gathered here, or the extent to which the programmer factored it into to the focuser tools, but given the parameters you've listed, I'd be surprised if it wasn't the main driver.

None of this argues against what you're suggesting. The data gathered might be useable for determining a "calculated delta focus from polynomial prediction" factor which could in turn be used to produce a better seed guess, step size guesses, etc. A feedback loop to improve accuracy is what you're suggesting, correct?.
Last edit: 3 years 4 months ago by Brian Davis.
3 years 4 months ago #63430

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

  • Posts: 398
  • Thank you received: 117
@bdavis:

The refraction graph is about as I expected. The change from 40 to 25 degrees is on the order of an arcmin POSITION. Colors refract differentially, so we'd expect HFR to increase perpendicular to the horizon. Whether refraction or airmass is the major driver, I consider elevation to be a good proxy for modeling/controlling the effect (and it's readily available).

re: "A feedback loop to improve accuracy is what you're suggesting, correct?"

The original post was intended to get folks thinking about temperature and elevation focus compensation as an approach to more robust focus management. I suggested that minimally, temperature would be an improvement, and that temp and elevation residuals would be an even better improvement. A GUI control might be as simple as allowing pre-seeding the focuser position before autofocus, or as complicated as allowing autoupdating of focus position before each subexposure. Having manually updated the seed for ~200 autofocus runs myself, I know this approach is better than blind autofocus runs (especially at the start of night when temps are moving fast, and at any time during the night when big changes in elevation are made as a result of slews). There's a good reason why many large observatories employ "active optics control". Temp and el focus compensation are a big part of that concept. There's no reason why we shouldn't have access to this concept too. For slow configs, it might not matter much, but for fast configs, it keeps efficiency high.
3 years 4 months ago #63434

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

  • Posts: 33
  • Thank you received: 15

It's not a position graph, it's a graph of the Index of refraction versus the elevation angle at standard temperature and pressure (STP). It is a number representing the angular displacement of incident light rays through the atmosphere showing the effect of thickness of the transited airmass between the observer and the celestial target. The calculated index is directly influenced by temperature and pressure (among other things, but these are the two largest factors), Elevation angle is a scalar value, and it's change due to earth rotation, is based on the location data, which doesn't change (or shouldn't)., so it has no mathematical relationship to temperature, and isn't a proxy value for anything. Unless your mount is on a moving object, it will not have have a direct impact of tracking error, unless .

Temperature has several effects. It causes the materials in the mount or gear to expand or contract, which can change the elevation angle slightly, and the error it produces will be relatively constant, and always in the same direction relative to the direction of the temperature change. So you wouldn't expect to see a lot of tracking error scattered about the regression line, instead you'd see the directrix of the parabolic regression line move up or down the Y axis, but the parabola itself doesn't change its shape.

The principle effect of temperature changes is that they change the index of refraction (RI), and thus change the apparent size of celestial objects. If the atmosphere were still and well regulated, then this wouldn't be a problem, but it isn't. It roils, changes density, and the stratification of the air changes, and this produces inherent error in the RI, and that translates directly to focusing, tracking and guiding errors, and those will be randomly scattered about the calculated RI.

In your post, you refer to Temperature Compensation as though it is a single term, but it's not. It's an ephemeral value calculated specifically for each value modified. There is no one "Temperature Compensation" value. Theres one for refraction, one for expansion/contraction, and probably others. A programmer would have to discuss how they used temperature in the various processes, to discuss it in more specific terms, but the main takeaway, is that temperature compensation is only a meaningful term when it includes the process or value being compensated. It will be different for every process.

It's not. The elevation is fixed (or should be) and does not change during a session. It is used for the initial calculation of the RI (and alignment, etc), but thereafter is constant, and so has no further effect on focusing or focus error. RI, on the other hand, continuously changes, and has a direct and pronounced effect of focus error.
Last edit: 3 years 4 months ago by Brian Davis.
3 years 4 months ago #63489

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

  • Posts: 163
  • Thank you received: 26
With elevation is meant the altitude of the object (as if using an alt-az mount), this -does- change during a session.

Also, if you take refraction into account, will you then -not- take it into account when using narrow band filters? There the effect isn't measurable.

Now a question, would you consider to focus during imaging or quickly adjust the focus in between lights?
Personally, I don't use very long exposure lights, especially with Starlink up and screwing up our images.
3 years 4 months ago #63496

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

  • Posts: 33
  • Thank you received: 15

Elevation usually refers to the geographic distance from the earths center, most often expressed as altitude above sea level. What you're referring to is most often called the zenith angle, or the angular displacement from zenith.

The Refractive Index applies to all electromagnetic radiation. It is usually calculated for yellow light for use in astronomy. However, the actual energy (frequeny and amplitude) of a received photon is an independent variable in the calculation for angular deflection produced by the refraction index.

I refocus on every 2 degree change in temperature, or guider crapout, or at the start of any sequence. Focus while taking lights isn't critical to the process, but shouldn't be changed between exposures.
3 years 4 months ago #63497

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

  • Posts: 398
  • Thank you received: 117
Hi BDavis. Ok, we've come well off the intended scope of my post, and we disagree on too much in your latest posts for me to comment further. FWIW, I'll hold the line that Bennett's graph definitely plots refraction (in this context the true position offset) vs apparent altitude (in units of arcminutes). Refractive index is dimensionless, and is a term itself dependent on other terms (temp, pressure, humidity, etc). Main takeaway: I accept that you believe refractive index is the driving function changing focus. We just need to disagree amicably.

My original post is simple: Two readily available variables in Ekos (temperature, (target) elevation=altitude) can be used to dramatically improve focus control. I've shown a relationship of temperature to focus. I've also shown that once factored, residuals of a temperature function can be correlated to target elevation. The data speak for themselves. Anyone who wishes can verify or refute the suggested relations by characterizing their own focus behavior via the focuser debug log. I am not stating that these two functions are the perfect and complete academic explanation. Rather, these two variables are readily available in Ekos, and serve particularly well to prevent poor auto-focus starting position, offset focus position between exposures, or prevent poor focus position after slews of large elevation difference. We're trying to remain close to the focus caustic. KISS can work well here. Cheers, Doug
Last edit: 3 years 4 months ago by Doug S. Reason: clarification
3 years 4 months ago #63503

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

  • Posts: 398
  • Thank you received: 117
@Bart: Re: "would you consider to focus during imaging or quickly adjust the focus in between lights?"

Well, the data for my fast (f/2.2 setup) indicate that I "could" change the focus by 55 counts per degree F change, and ~21 counts per degree elevation change. It's tempting to think about an experiment with this and do a build where an auto update is done between exposures (but never during an exposure). I also do short (30-40 second) subs, so an autoupdate might keep me from having to do an autofocus run (expensive!) so often at the start of the night. Whether I'd trust it for a big elevation difference slew is debatable without a clipped higher order polynomial (to fit the low el data better), but it would be an interesting test. Eventually, and assuming a stable focuser with well controlled backlash, it might be quite effective at minimizing the need for autofocus runs. Right now, if I want to image for two hours on a target at the start of the night, I NEED to run autofocus every 20-40 exposures (or use the deltaT function). Would be nice to avoid that hassle....
Last edit: 3 years 4 months ago by Doug S. Reason: minor clarifications
3 years 4 months ago #63505

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

  • Posts: 33
  • Thank you received: 15
Let me simplify then. For the telescope you used to generate this graph, calculate the width of the CFZ , and the focal length change of a single step (in microns). Now, in your graphic, how many CFZ widths error are contained in the extreme spread (roughly 1000 steps) of the values you generated?

Thus, estimating a step position based on that graphic, is statistically more likely to produce an out-of-focus image, than one in focus.
3 years 3 months ago #63739

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

  • Posts: 33
  • Thank you received: 15
Giving this a little more thought, I can visualize a "predictive focus tool" that could set the correct initial position and step size based on local conditions and the parameters of the rig being measured, by using a feedback loop created by logging the values of the independent variables (that have a significant enough effect to bother with) of each focus attempt, including the available weather data, into a text file database. This would need to be performed against the same starfield for some base number of repetitions at different weather conditions. You'd need to input the measured step distance of your focuser assembly, and the tool would use the telescope parameters configured elsewhere to calculate things like step-width of the CFZ and use the curves generated by the data set at each variable point to build a mesh of actual resulting values, that could be used as a predictor for focus setting(s) that should be pretty accurate once it has enough training runs in it. So as a user, you'd do the measurement, configure the tool with it, and select a reliable and non-variable star (like polaris, for example), run "Train Focuser" (autofocus that saves values to training file). Then, every time you set up, point to Polaris, and run "Train Focuser" again. Do it enough times, and it should get pretty good at predicting focus position for a given set of conditions. The mesh generated, likely might have value elsewhere in the software as well, since it effectively models the performance of your rig at a given location over time.
Last edit: 3 years 3 months ago by Brian Davis.
3 years 3 months ago #63746

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

  • Posts: 398
  • Thank you received: 117
Hi bdavis. I think you're driving toward a much more complicated automation regime than what I've suggested (i.e. elimination of existing autofocus loop). I fear that would be very unlikely to ever get implemented (unless you write and test it yourself). What I have suggested in this thread HAS been implemented at multiple large observatories. I know this because I personally worked on the temperature and elevation compensation model at the Large Binocular Telescope, and a similar strategy (lookup tables) was employed at Keck where I worked before LBT. I have used the data I posted for my own f/2.2 RASA 11 (highly sensitive to focus) and it works great. Whether I can convince you of the suggested approach is moot. The proof is in the results and is available to everyone. For the unbelieving, a better question might be: "how and why could this improvement approach possibly work?". So let me try and address that just a bit more.

The temperature component works because the dominant error we're beating down is structural (shift of optics due to changing temp of the OTA). The next component (residual of the temp function) has complex / multiple underlying reasons, but airmass (target el) empirically correlates with the residual to help beat it down. Together, these two available variables get us within the ball park to improve focus management. The key to why this simplicity works is that we're NOT doing a one-time blind position update. We're not replacing the closed loop autofocus routine. We're only "seeding" the autofocus loop's start position. The autofocus loop is still responsible for resolving best focus position. Therefore, all the discussion about spread and CFZ size is misdirected. Ok, now to the next suggested higher automation level (updates between exposures). In that scenario, any position update would use the function outputs as integration OFFSETS from the base position determined by prior autofocus. Those offsets are small and driven by trendline direction. Here, the spread isn't as important as having the trend SWAMP the spread uncertainty so the direction and magnitude keep us within the CFZ and REDUCE our need for another autofocus run. I mentioned to Bart that I'm not sure I would trust a blind update for a large elevation difference slew (and I still believe that). Bottom line: The work needed to do a one-time blind offset and ELIMINATE autofocus runs is well beyond the scope of this thread. So, whether or not I've convinced you, I hear you. I suggest if you want to discuss a "predictive focus tool" that eliminates the autofocus loop, please open a new thread for that topic. I'd like to keep this thread within the bounds of improving and reducing the existing autofocus loop interface (as opposed to eliminating it). Cheers, Doug
The following user(s) said Thank You: Jasem Mutlaq
Last edit: 3 years 3 months ago by Doug S.
3 years 3 months ago #63766

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

Time to create page: 0.323 seconds