×

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

Bi-monthly release with minor bug fixes and improvements

Tips for Auto-Focus

  • Posts: 245
  • Thank you received: 56
I know that a lot of people use the Autofocus function with success but I have never got it to give me a sharp focus. I have been using a Bahtinov mask which always works well. Last night it was cold and I thought let's give autofocus another try. It completed successfully and I started imaging. When I took a look this morning (I know I should have checked last night) the images I though looked good we're all out of focus.
Does anyone have any tips?
3 years 3 weeks ago #68262

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

  • Posts: 180
  • Thank you received: 30

Replied by Joaquin on topic Tips for Auto-Focus

I am a beginner with autofocus. Still it has worked well (for my expectations) from the beginning.
Only trick is to perform a manual focus before starting the automatic procedure. The range scanned by the automatic procedure is relatively short so you need to start already close to the minimum.
My two cents.
The following user(s) said Thank You: AstroNerd, Rishi Garrod
3 years 3 weeks ago #68276

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

  • Posts: 171
  • Thank you received: 7

Replied by Miguel on topic Tips for Auto-Focus

I've also purchased recently a motor focus. Could not tried it yet; it's cloudy. But yes, I agree with with jabian and that's one of the things I know I should take into account, to be at least a bit close to the focus point.

m
The following user(s) said Thank You: Rishi Garrod
3 years 3 weeks ago #68291

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

  • Posts: 62
  • Thank you received: 10

Replied by Michael on topic Tips for Auto-Focus

There is no one size fits all.
I like “auto select star” and “ use subframes”
Here is my setup and routine, working with a diy arduino based, 3D printed focuser.
Inherently this little machine has a fair amount of backlash, which is often the reason for failed processes.
Anyway, the linear process, implemented fairly recently deals with the backlash issue the best, IMHO. Starting from a “last good” focus position it drives to *in my case* inside by 300 clicks, measures FMHW every 30 clicks while driving through optimal focus to outside....and establishes a v curve. After return to inside it “walks back” to optimum focus, in about 80% of the time it will complete successfully after 15 steps.
Variables I had to adjust: different filters will require different exposure. For a 125 F6 refractor, with an ASI1600MM I typically use 2 sec for L, and 5 for RGB. Narrowband I found to be tricky, sometimes depending on the target I may get away with just 5, but often I have to bump this up to 10 or even 15 sec,
The value for the initial move from ”last good” to start the establishment of the V-curve is 300 clicks, roughly 10 times the critical focus zone. Narrower than this resulted in failed focus procedures due to inability to establish a good v curve, wider than 300 resulted in inaccuracy...

I spent several evenings playing with these values, and making sure I get a nice V-curve with any filter.

I second Jabians point about starting with a non automatic focus first. I stop the autofocus routine once the first image comes in, select a star myself, and then hit “loop” which now just brings subframes that look pretty identical on the screen. Using the arrow buttons I drive the focus in or out to get the smallest possible star image. There i stop, after a few back and forths, and initiate autofocus,..

Works for me quite well... attached a current screenshot, hope this helps...
The following user(s) said Thank You: Rishi Garrod
Last edit: 3 years 3 weeks ago by Michael.
3 years 3 weeks ago #68321
Attachments:

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

  • Posts: 245
  • Thank you received: 56

Replied by Rishi Garrod on topic Tips for Auto-Focus

Thanks everyone. I do always start with pretty good focus from the previous session. I need to experiment more. I just wish we had more clear nights. As soon as the clouds move out I just want to collect images and it is tough to bring up the discipline to spend some time get everything adjusted.
3 years 3 weeks ago #68325

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

I'll add my 2 cents. First, your last night's ending position isn't necessarily your best starting position for the next night. There's a significant temperature dependence in play. I'll get to that last. Meanwhile, your f-ratio makes a big difference in how sensitive to focus you are. Slow setups (f/10) have a lot of tolerance. Fast setups (f/2) are extremely sensitive. I have an f/2.2, so I'm on the sensitive side of the scale. I recommend measuring your focuser backlash, and setting the INDI/Ekos backlash value for it. If you have a reliable/non-slipping focuser, you have more options available to you than if you can't trust your focuser.

I use linear focus algorithm with a full-field annulus (30 inner, 70 outer) and tolerance of 5%. I use a step size on the order of 1 CFZ. I find linear more stable than the other algorithms, but there's a definite design flaw in that algorithm. It rejects all the work it did in building a V curve, and finishes at the single HFR measurement that rises above a prior HFR reading once in the "tolerance" zone. I nickname this "pulling up short". For f/10, it might not matter. For f/2, it's undesirable. What the algorithm should do when it's taken it's last reading (in the "zone")), is test to see if the polyfit minimum is still "inward". If so, it should set the final focus position at the polyfit minimum. I've changed my own branch of the code to do this, and it works great. I sent the Linear author the code, and asked that he consider it. Not sure if it will move forward and be merged or not as there is a debate about whether the average of many HFR readings (the polyfit) is to be trusted over that single HFR reading at the end.

Finally, the work to reduce (not eliminate) autofocus is bearing fruit. Adaptive Focus Control (AFC) is progressing. Hopefully in the near future, users with reliable focusers and access to ambient temperature readings (focus temp probe or PPB for example), will be able to use autofocus history to polyfit temperature sensitivity (and optionally target altitude angle "residuals"). That will allow an autofocus "seed" for start position (so it doesn't take forever searching). It will also allow focus updates between light exposures so you can spend more time imaging and less time focusing. I have that code running now, and for fast setups (f/2 - f/5) it could be a game changer.

If you are interested in either of the two code sets I mentioned, send a PM and I'll get it to you (or just wait for the merge/release...hopefully in the next official release).
Cheers, Doug
The following user(s) said Thank You: Eric, Avocette, Rishi Garrod, David Tate, Paul Muller, James Barbot JR
Last edit: 3 years 2 weeks ago by Doug S.
3 years 2 weeks ago #68380

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

  • Posts: 245
  • Thank you received: 56

Replied by Rishi Garrod on topic Tips for Auto-Focus

Thanks Doug, this is very interesting.

Currently I am imaging at F10. An Edge 8HD with a Pegasus auto focuser. The cube focuser is described as a "zero backlash motor". It connects with a belt so no backlash there either. So any backlash will be in the SCT focuser mechanism itself. Since it is a completely closed system it is difficult to know exactly how much backlash there is.
I have tried various step sizes. The last time I attempted auto focus I had the step size at 300. The focuser does 5755 steps per revolution.
Last edit: 3 years 2 weeks ago by Rishi Garrod.
3 years 2 weeks ago #68392

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

Your step size is probably too small. Your CFZ (2 arcsecs seeing, 7% focus tolerance) is 240 microns. You've given 5755 steps/revolution of the focus motor. Celestron uses 750 um/thread (focuser screw pitch). So, 750/5755 = 0.13 microns focus travel per motor step. You have 1850 steps in your CFZ! If you use a step size of 750-1000 steps, you won't jump over your CFZ. That size will give you big enough moves to make the V curve obvious. Too small a step size and you just get a flat line, too much and you will jump the CFZ. Your focuser isn't all that different from my own (Celestron RASA11, EAF @ 5760 steps/rev), but I'm at f/2.2. You're at f/10...so you have a huge CFZ and number of steps to play with).
The following user(s) said Thank You: Rishi Garrod
Last edit: 3 years 2 weeks ago by Doug S.
3 years 2 weeks ago #68394

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

  • Posts: 245
  • Thank you received: 56

Replied by Rishi Garrod on topic Tips for Auto-Focus

Thanks again, great to see it worked out logically. I could never find the screw pitch of the focuser. I have been using far too few steps so have never seen the famous V curve. I always felt it was too flat.
Do use any backlash setting?

Now to wait for a clear night, Weather looks bad here for a while.
3 years 2 weeks ago #68396

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

I do use a backlash setting (now). Up to about a month ago, I was ignoring this, but someone clued me in that I shouldn't ignore it (he also has an ASI EAF). I found it to be a fairly straight forward test. You can eyeball it by just watching the coupler setscrew. Move one direction until you see the coupler rotate. Then reverse the motion (using the jog button). Keep track of total steps from start until you see the setscrew just start to rotate. Do the test a few times (forward and backward, each time after you reverse motion from a place where you know you're moving). I have 95 counts +/- in my EAF. Don't be surprised to see something similar at your similar motor scale (since we both have 5760 steps/revolution).

Edit: BTW, it's not the belt drive that matters...it's the internal motor gear mesh to shaft coupling. It's no different from your RA or dec axis. If they don't have some slack, you're left in a bind (pun intended). ;-)
Last edit: 3 years 2 weeks ago by Doug S.
3 years 2 weeks ago #68399

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

  • Posts: 278
  • Thank you received: 17

Replied by S on topic Tips for Auto-Focus

This is golden knowledge with the CFZ :-)

I found this
www.goldastro.com/goldfocus/ncfz.php

Maybe this can be used to estimate a reasonable step size?
3 years 2 weeks ago #68420

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

  • Posts: 171
  • Thank you received: 7

Replied by Miguel on topic Tips for Auto-Focus


That's in fact the link Doug pasted in another post; quite useful!
By the way, please let me ask a question. When all of you talk about step size, do you mean initial step size setting in ekos? If so, as far as I know and read, that number sets the initial step size, only the initial, not the subsequents. I guess that number is quite important, but I thought that it was more imporatant the tolerance setting to get a finer focus resolution. The initial step size, according to ekos help, is the "initial step size in ticks to cause a noticeable change in HFR value". The following step sizes are calculated (and smaller) according to the selected algorithm, and I thought they would be getting smaller until the desired tolerance is reached, or focus procedure get failed. Please correct me if I'm wrong.

m
3 years 2 weeks ago #68433

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

Time to create page: 2.016 seconds