×

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

Bi-monthly release with minor bug fixes and improvements

New Focus Algorithm in Ekos

  • Posts: 39
  • Thank you received: 9

Doug, my English is propbably bad. I didn't say pixel size is necessarily part of the equation: given that you can find CFZ equations that take pixel size into consideration when sensors are involved, I only said that, if needed we know pixel size; the whole point was to say that CFZ should be calculated automatically by code, not entered by the user (maybe you already said that and I missed it). If that equation is better than another one, I can't say and I won't debate about it.
About microns per motor step, we agree. Again, I was only saying that user should be encouraged to measure the focuser travel over the highest possible number of steps, to minimize the inevitable measure error.

Matteo
1 year 10 months ago #82738

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

  • Posts: 398
  • Thank you received: 117

Replied by Doug S on topic New Focus Algorithm in Ekos

Hi Matteo, ok, I understand now why you suggested max steps to reduce the measurement error. We agree that more is better in this regard. I think a tool-tip on the entry field could be useful for explaining that. The fields might be better named "focuser motor steps" and "focus travel (mm)" or similar. Then the alg should calculate microns/step, compare to calculated CFZ (based on the other params), and set the proper step size. CS Doug
1 year 10 months ago #82743

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

  • Posts: 992
  • Thank you received: 155
Wow, maybe my backfocus amount was too little. I'll try again next night my skies are covered in smoke :(
1 year 10 months ago #82746

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

  • Posts: 593
  • Thank you received: 274

Replied by John on topic New Focus Algorithm in Ekos

Hi Ron,

Hi Ron, I debugged my ASI EAF through the hokey-cokey to see how it coped with the outward then immediately afterward, inward movement. The code is event driven with a user defined "polling" period (say 500ms). So an outward motion is started and every 500ms the focuser is queried to see what's happening. If the focuser is still moving then the system waits; if the focuser has completed the motion then the system starts the inward motion.

I don't have a Celestron focuser so I can't do the same thing with that. The only things I can suggest are:
1. Make sure you're on the latest version of Indi and the drivers to ensure you have the latest bug fixes.
2. If the Celestron driver works like the ZWO EAF, then there will be a polling period in the Indi tab that you can set. You could try upping the value and see if that fixes your problem.
3. If the above don't work you could raise an issue and hopefully someone with knowledge of the Celestron driver would be able to take a look.

Regards,
John.
1 year 10 months ago #82784

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

  • Posts: 593
  • Thank you received: 274

Replied by John on topic New Focus Algorithm in Ekos

Hi Doug, Matteo, Jim and Bernd,

I reached out to Jeff Winter at GoldAstro to see if he would be willing to collaborate. He's currently busy on a project but said he'd get back to me, so I'll let you know how things go. I'm sure you've seen the calculator on the GoldAstro website:
www.goldastro.com/goldfocus/focus_calculator.php

So as we started off discussing, as a way to ensure Step Size is set to a "sensible" value this could have some merit. Don't forget though that we should be able to do better than just "somewhere in the NCFZ" by curve fitting the datapoints.

So for the inexperienced user it should provide some assistance during setup but I'm not sure it provides anything to the experienced user who has spent time working out his/her setup and has arrived at values that suit their equipment. Or am I missing something? What would your workflow be if this feature was available?

TIA

Regards,
John.
1 year 10 months ago #82785

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

  • Posts: 225
  • Thank you received: 16
Thanks John. Yes, there is also a polling period setting in the Celestron focuser and it is set at 500ms. However, as I listen to the focuser move it is clearly not pausing between the move out and move in. Looks like I need to submit a ticket to Jasem!

Thanks!

Ron
1 year 10 months ago #82787

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

  • Posts: 398
  • Thank you received: 117

Replied by Doug S on topic New Focus Algorithm in Ekos

Hi John, I wouldn't think collaboration is required. The calculator is interesting, but unnecessary. The formula from www.goldastro.com/goldfocus/ncfz.php should suffice:

CFZ = 0.00225 · θFWHM · √τ · A · f 2

CFZ - Critical Focus Zone (micrometers)
θFWHM - total seeing (arc seconds)
τ - focus tolerance as a percentage of total seeing (unitless)
A - telescope aperture (millimeters)
f - effective imaging system f/ratio (unitless)
0.00225 - constant (micrometers per arc second per millimeter)

Given a user estimate of seeing, and their acceptable tolerance (both of which could be defaulted), and capturing system info (or having user provide) for aperture & f/ratio, the CFZ pops out. Step size is then just a fit of CFZ on the translation of motor counts/revolution and focuser travel (mm->microns) as discussed previously.
1 year 10 months ago #82790

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

  • Posts: 145
  • Thank you received: 15
Hi,

any news on the one-pass linear algorithm? :)

Maybe a simple version with all manual parameters instead of automatically calculated step sizes will be fine as a first version? „MVA“ - minimum viable algorithm ;)

CS, Bernd
The following user(s) said Thank You: JuergenN
1 year 9 months ago #83359

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

  • Posts: 992
  • Thank you received: 155
Agree 100%. I hope there is some movement on this much needed autofocus system. Two years on, and I still cant use unattended autofocus with the current system.
1 year 9 months ago #83371

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

  • Posts: 593
  • Thank you received: 274

Replied by John on topic New Focus Algorithm in Ekos

I'm in the process of rewriting the code for the original release of Linear1Pass to fit in better with the kstars codebase. One of the more experienced developers is helping me.

The first release will have the existing functionality as per the document at the top of the thread.

I intend as a phase 2 to look at the topics raised in this thread along with some other things. My idea is to include a "helper" function to suggest values for some of the parameters, like step size. GoldAstro haven't as yet got back to me, but neither have I as yet chased them. It would be good to collaborate if they are interested but if not I can probably do something without them (obviously I wouldn't just take their algorithm without permission).

Since I'm not a professional developer there are no timescales for any of this. Its ready when its ready.
The following user(s) said Thank You: Tim, R Dan Nafe
1 year 9 months ago #83374

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

  • Posts: 1009
  • Thank you received: 133
Oh, an interesting thread that I somehow missed so far :ohmy:
So far, I'm using Linear, and get good results with it. I did, however', also notice that it has a slight tendency to overshoot a tad (by doing another step when I would say it's already at the best position). However, those last steps are (with the latest versions) a quarter of the initial step size.

I did have a look at this NCFZ article. Very informative. Maybe some input here from my side: I used the formula, and my setup and site details, to compute a value of 31μ. My step size of the EAF is 2.8μ, so that is 11 steps. For comparison, my initial step size is 20, i.e., 2 times the NCFZ. In good conditions that allows a very good estimate of the focus from the first pass. I don't think setting the initial step to 1 NCFZ (or even less) will improve things, and for less good conditions (variable seeing) the (only?) solution anyhow is to do more than one measurement per position, and average.

I do quite sometimes see that the first pass produces an (almost) perfect curve, and then also think 'now you should just go to the computed value, and be done'. Sometimes it's obvious (to me....) that the first pass isn't great, and the second one will improve things. So ideally I'd like to see a combination of both approaches, in finding some criterion on how well the first pass is, and then having an option in Linear to stop after that if it is good enough.
I'm not sure that always only doing one pass is as stable as the current Linear method.
My current setup will do the first pass in about 11 positions. It typically finishes the whole AF run in 15-20. More only in very variable conditions, but there I wouldn't trust a 1-pass run much, either. This means for me, I could save maybe 1 minute per AF run in good conditions. I would do rather 'pay' that as an insurance in case of bad conditions. But as you already mentioned in the first post, those that don't have issues with focus as it is can skip.
So my post isn't there to discourage the new method - the contrary! I just thought maybe my view on this is of some use :)
I do still wonder why the current Linear isn't working for some, and extremely well for others..... :blink:
1 year 9 months ago #83392

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

  • Posts: 145
  • Thank you received: 15
Hi,

John, thanks for the update! :)

Peter, that‘s indeed an interesting point. My observation is that I have a very smooth and plausible V curve in the 1st pass in most cases, and often a bad and jumpy 2nd pass curve. Never saw it the other way round, which is of course strange and doesn't make much sense, but that's the way it is. Maybe a mechanical issue of my Crayford focuser (backlash? slip?). Have to investigate more.

CS, Bernd
Last edit: 1 year 9 months ago by Bernd Limburg. Reason: typo
1 year 9 months ago #83395

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

Time to create page: 1.107 seconds