×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Temperature and Altitude (residual) focus compensation

  • Posts: 1309
  • Thank you received: 226
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°.
3 years 6 months ago #61954

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

  • Posts: 398
  • Thank you received: 117
@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.
Last edit: 3 years 1 month ago by Doug S.
3 years 6 months ago #61984

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

  • Posts: 398
  • Thank you received: 117
@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
Last edit: 3 years 1 month ago by Doug S.
3 years 6 months ago #61985

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

  • Posts: 1309
  • Thank you received: 226
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.
3 years 6 months ago #61988

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

  • Posts: 398
  • Thank you received: 117
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
Last edit: 3 years 4 months ago by Doug S. Reason: removal of older graph....updated in OP
3 years 6 months ago #62001
Attachments:

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

  • Posts: 348
  • Thank you received: 69
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.
3 years 6 months ago #62044

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

  • Posts: 398
  • Thank you received: 117
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
The following user(s) said Thank You: Alfred, Frédéric Detienne, Giles
Last edit: 3 years 4 months ago by Doug S. Reason: removed charts as they were updated in the original post for the latest update
3 years 5 months ago #63131
Attachments:

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

  • 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.

Time to create page: 0.466 seconds