×

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

Bi-monthly release with minor bug fixes and improvements

Tips for Auto-Focus

  • Posts: 398
  • Thank you received: 117

Replied by Doug S on topic Tips for Auto-Focus

Hi Peter, to make a long story short, this fix for the polynomial minimum in the linear algorithm did not move into the baseline code, but I have been using it in my code baseline very successfully ever since it was developed. I also have been using Adaptive Focus Control (AFC) which minimizes need for autofocus runs (it only requires a temperature sensor). I have the code up-to-date as of the nightly 3.5.6 from a week ago.

The pain trade here is that because the code never became part of the Ekos baseline, you need to merge it for any update you want to pull. It's not horrible, but there's that to consider. For me, I probably wouldn't even have updated to 3.5.6 if it hadn't been the case that 3.5.4 Indi had a problem with the Celestron GPS driver (swapped axes senses which thwarted polar alignment). To get that bug fixed, I needed to update & merge. So, never say never, but unless something very important comes out in future releases, I probably will give up on Ekos upgrades from here forward. I can do all I want with the latest baseline. From what I've seen as I merged my code this last time, there's at least some question as to whether changes being made are necessary, or if there's just developer "tinkering" happening. Tinkering is normal for aging code, but eventually it makes code less stable IMO. Regardless, if you want the code as of 3.5.6, send me a PM with an email contact and I'll send you both the AFC code and the fix for linear focus completion. CS Doug
The following user(s) said Thank You: Sonny Cavazos
2 years 6 months ago #75755

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

  • Posts: 239
  • Thank you received: 38

Replied by Sonny Cavazos on topic Tips for Auto-Focus

Yes, I have the same issue. I hope the fix gets integrated into the main code.
2 years 6 months ago #75767

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

  • Posts: 992
  • Thank you received: 155

Replied by Peter Kennett on topic Tips for Auto-Focus

That's strange that it isn't being adapter by the rest of the EKOS team. Are we the only ones who have this issue?
Right now, it makes auto focus completely unusable. I have to stay up all night and monitor the focus manually.

Anyway, I would LOVE to have your fix, but as I am not a programmer I am afraid that I would have no idea how to install it. If you have step by step baby instructions - I could manage though.

Peter
2 years 6 months ago #75771

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

  • Posts: 398
  • Thank you received: 117

Replied by Doug S on topic Tips for Auto-Focus

Sorry Peter....I thought you had a development environment. Unfortunately, I think you and Sonny (and whomever else) will need to try to convince Jasem to finally address this bug. I thought for a minute I had convinced him, but nothing changed. The developer doesn't understand basic principles of polynomial function development over many seeing impacted HFR measurements. He actually strongly believes that a last (defective) measurement in the set should outweigh all prior measurements! Too hard to argue with logic formed like that. I wish you better luck in convincing otherwise (if you want to see progress). In the worst case, if nothing changes, you might consider biting the bullet, getting a spare PI, and then using Jerry Black's script to build your own code baseline. You'd then be able to get the simple fix and put the whole misery behind you... Send me email if you get to that point. Until then, I feel your pain.... (-:

Cheers, Doug
Last edit: 2 years 6 months ago by Doug S.
2 years 6 months ago #75772

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

  • Posts: 472
  • Thank you received: 165

Replied by Jarno Paananen on topic Tips for Auto-Focus

Jasem does have quite a lot on his plate as is so having him hunt for magic patches with disparaging comments added doesn't help. Preparing a merge request at invent.kde.org/education/kstars and having discussion there would be the easiest way to get it merged.
2 years 6 months ago #75803

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

  • Posts: 398
  • Thank you received: 117

Replied by Doug S on topic Tips for Auto-Focus

Hi Jarno, To be fair, what you suggest is exactly what happened. In the end, this wasn't decided by technical discussion/merit, but by politics. The developer (not Jasem) couldn't understand the interplay between error bars on the HFR measurements, and the polynomial regression being developed by those measurements. There *was* technical discussion, but rather than rock the boat, Jasem let the developer do as he pleased. Not the best result for the community IMO (in this specific case of focus control), but it did keep the developer happy. Sometimes (hopefully not too often), politics will dominate technical discussions. It is what it is.
Last edit: 2 years 6 months ago by Doug S.
2 years 6 months ago #75806

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

  • Posts: 472
  • Thank you received: 165

Replied by Jarno Paananen on topic Tips for Auto-Focus

Oh, that's unfortunate then, people can be defensive of "their" code after working hard on it and depending on the timing and way of presenting the issue can be crucial as we are all human after all.

I'm interested in taking this further along if you like, autofocus does work quite well with my setup after quite a bit of tuning, but more reliability never hurts. Now with 3.5.5 out the door would be a good time to get new code in and I don't have any other on going Ekos things pending. So if you have the code available somewhere already or could send me preferably a diff or just changed source files either here as PM or at This email address is being protected from spambots. You need JavaScript enabled to view it. I could take a look.
2 years 6 months ago #75808

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

  • Posts: 398
  • Thank you received: 117

Replied by Doug S on topic Tips for Auto-Focus

Hi Jarno; I'll send you a PM to consider. Thanks, and cheers, Doug
2 years 6 months ago #75809

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

  • Posts: 992
  • Thank you received: 155

Replied by Peter Kennett on topic Tips for Auto-Focus

I wonder if the original programmer doesn't use a long focal length scope.  The issue seems to be with seeing effecting very local lengths.   With my C11 I have NEVER been able to get consistent HFR values - even when I don't move the focus and just keep repeatably hitting the button to recapture and measure the HFR.  I typically get values like 2.56, 2.35, 2.61, 2.4..   it jumps around 0.20 t 0.40 points constantly.  I have tried fir two years with every suggestion, but unless I take 30 second exposures, or average 10 images - the values are never stable.  Thus, the current routine is not usable as it simply stops at a spot is 90% of the time off from the perfect polynomial calculated spot.   NINA is MUCH better as it ONLY selects the calculated spot.  

I have to wonder why EKOS goes through the trouble of calculating the perfect ficus spot - only to toss it out and use the last HFR change value instead.  In my system that is virtually always wrong, so I have to go back in and manually move the focuser back to the calculated value is always correct.  I have tested this many many times by looking at enlarged images taken after several minutes and the difference between a calculated focus spot and the selected one is very noticeable.

I am so glad though that I am not the only one that has seen this.  It is a consistent flaw in the system in regards to my optical setup and the ESATTO, and prevents any automation being

On a side note - while INDI allows me to set the ESATTO's backlash to a value over 1000 steps, EKOS rejects that value and limits me to only 1000 or less.  The Esatto has 420,000 steps - so a value of 1000 is not too large to consider.  Maybe whoever limited EKOS to only 1000 steps of backlash may be using a different focuser - where 1000 seems excessive.   In the ESATTO, I cannot see any focus difference within 1000 steps.
2 years 6 months ago #75813

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

  • Posts: 239
  • Thank you received: 38

Replied by Sonny Cavazos on topic Tips for Auto-Focus

Same here. When I use my 10" RC or my 9.25 EdgeHD I get HFR values that are larger than my lower F number scopes. HFR is directly related to Focal Ratio. The larger the Focal Ratio the bigger the HFR values.

But I do get inconsistent HFR values, I end us using the 2 or 3 frame average, this makes focusing 2 or 3 times longer, but at least I get somewhat good focus.

I do agree that the Focus routine works much better at 200-600mm Focal Lengths, once you start going deep, focus becomes more problematic.
2 years 6 months ago #75814

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

  • Posts: 992
  • Thank you received: 155

Replied by Peter Kennett on topic Tips for Auto-Focus

Yes it is problematic, but the calculated values are virtually always spot on. EKOS does a great job at calculating that curve and identifying the best focus spot. It just refuses to use it! And the really annoying part is that it can get that calculated value in about 6 exposures, but then goes on for 15-25 more exposures to only end up choosing the wrong one! What should have taken a minute now takes 10 minutes and then I have to go back in and manually move it anyway.
2 years 6 months ago #75815

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

  • Posts: 1309
  • Thank you received: 226

Replied by Andrew on topic Tips for Auto-Focus

I would like to try your code. Where can I find it?
2 years 6 months ago #75880

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

Time to create page: 0.733 seconds