Autofocus mode: just choose the best sampled point

Issue #1051 closed
Jason Newton created an issue

I have an EdgeHD 11, I use a secondary mirror focuser primarily. I also have my rig balanced against hyperstar as well as F7 and F/10 mode in terms of optical alignments.

Smart autofocus does not work well on the SCTs is what is commonly known from sequence generator pro but I’d have to say it also gives a parabolic etc approach in nina a hard time. So what do I do that gives me pretty good results, all the time? I choose a reasonable step size of 25 on my optec focuser and I do a sweep and just choose the best sample measured HFR and it’s corresponding focus value. Other things do not work. picture attached to demonstrate. Here - 22740 is much better than 22720.

Comments (19)

  1. Jason Newton reporter

    Btw macro sweep and micro sweep could be good fine tuners for more quickly finding the range to get nearly focused, say on filter change or fresh start only, and micro when every n minutes.

  2. Jason Newton reporter

    I think it’s a pretty good step size (25), not too coarse or fine to take forever to do. Keep in mind the secondary mirror focuser has a 5x gain on it so small steps → large changes in focus. Once finding coarse I wouldn’t mind doing a second pass with a step size of 5 but even with picking the absolute best sample I’m almost all of the time doing better and substantially more reliable than parabolic’s results in something like 10 2-6 second exposures.

    +-250 steps or so and you’ll have donuts.

  3. George Hilios

    Can you try the hocus focus star detector too? Try also changing the pixel scale option to long focal length

  4. Stefan B repo owner

    In case the core star detector does not detect stars reliably (as shown in the attachment via the error bars) the plugin hocus focus can be used. There different approaches and more in-depth control is offered for it. With well detected stars the curve fit will also work reliably.

  5. Jason Newton reporter
    • changed status to open

    tried hocus focus, still didn't give me good results - please keep ticket open and consider adding the proposed method for SCT users

  6. Jason Newton reporter

    I’m not going to focus on that (:-) ; it’s great it does for them. Maybe it’s an SNR issue fundamentally but I’ve always had problems with SGP’s autofocus as well as prisms on my SCT rather than my refractor (william optics 103). User getting near good focus and best of sweep though consistently gives good results and fails infrequently…. doing 1 or 2 more sweeps works for anything workable I’ve seen as a process. You saw my plot - what do you think is the issue and do you think it’s not the donut’s influence?

    Seeing definitely affects my HFR zone for the night but on the best nights I’ve still had lots of trouble down in the mid 4.5 I think. If it is seeing - that still says curve fitting isn’t robust and best result at the same time - at least with the sampling done.

    I suppose it could also be scope dependent and near focus something else in the image unfocuses while focus in another zone is achieved… maybe this distribution is very noisy but the best setting in a visual sense is just found easier either visually or looking for best HFR global min without trying to function fit.

  7. Dale Ghent

    Well your assertion implied all SCTs, indicating that this is a general struggle for SCT users. But that doesn’t really seem to be the case because plenty of them appear to be focusing well without this kind of complaint, with both floppy and locked mirror configurations. This leads me to think that your issue is localized to yourself rather than it being a fact-of-life issue for everyone with this type of telescope. So I’m a bit circumspect regarding the idea of introducing a “fix” that, so far, has a relevancy of 1.

    Supporting this, you mentioned having similar problems with SGPro as well, so that creates a lesser degree of certainty that it’s a problem with any one software’s focusing method, of which you’ve now tried several. So I’m not really sold on the idea that we need to rush to implement this additional methodology when perhaps it’s more a mechanical issue with just your setup. Or a settings issue, or a combination of these aspects.

  8. Linwood Ferguson

    I image with a C11 and 80% of its use was with the primary mirror focusing, now using an external focuser. In both cases, especially once HF got the long focal length option added, I just do not have these issues. Curves are fairly smooth. The one graph you posted has too small of a step, so that the HFR doesn’t rise high enough – you need the high sides on the curve to better define it. I’ve used it both in Bortle 3 and Bortle7. Two nights ago I went to a friend with a C9.25, for a first run with it on NINA. We had it focusing on the 2nd try (step size change), and it focused numerous times with no issues.

    If I understand your suggestion, meaning to refocus by running in small steps along the bottom of the curve, I am not mathematical enough to state this definitively, but my understanding is in the CFZ zone that seeing is going to be predominant and not actual focus, and that getting outside the zone and a good curve definition is actually a better indicator, but maybe someone with the math can weigh in.

    But as to the implication this is a general SCT problem – I would say that is not evident by my experience.

  9. Linwood Ferguson

    On a somewhat related note, however, I will say that determining initial focus position (since you have to start mostly in focus to run an auto-focus, ironically), and determining a good step size and count, maybe even backlash, are all a bit mystical to people just starting out (and some not new). I do think it is worth considering something along the lines of (guessing here) what a “Marco Sweep” is, that serves as something of a wizard to both get initial focus and help determine optimum settings. This in turn reduces the time for a “normal” focus run by being as efficient as possible.

  10. Jason Newton reporter

    what change in hfr (y-axis) makes a good step size - this part is probably the same for all edgehd c11 users… speaking of which, especially for SCTs these things are like cars in that alot of people have a few models - settings even for primary mirror focusers in terms of distance should be the same for everybody, a database of this would be good to have recommendations by scope for settings.

    To me for the samples given it looks like a noisy v-shape but a definitive issue with SCTs is that as soon as you get too large off focus - you get little donuts once they’re actual image artifacts you get runaway/complete junk for focuser algorithms. I’ve only got 250 steps before those show up for me on this particular focuser which at 25 ticks per scan step gives me 10 shots in each direction.

    Here’s a note from SGP https://help.sequencegeneratorpro.com/AutoFocus.html - also displayed in the prefs ui as the hover comment:
    ”Disable smart focus: Check this if you want to disable smart focus behavior (automatic continuation and expansion of the focus range in order to try and get adequate data). If your scope has a central obstruction you should most likely disable smart focus. If at all possible you should avoid using this option by using the tuning method found here.” - this generally makes the rounds for SCT users in the settings they use - I believe I’ve seen some youtubers recommend it to, like Ray but I know I’ve seen it in the forums there too.

  11. Linwood Ferguson

    I try to get a factor of 4-5x in HFR generally. Sometimes I can’t get quite that, sometimes I get more. I do know George’s change for long focal lengths helped with HF. NINA was better for SCT’s before that change, with that change I think HF is better.

  12. Jason Newton reporter

    Maximum error in keeping the best sampled x btw is based on the step size and pretty tolerant to backlash if present since you do large sweeps in one direction. It is also a function optimization with characterizable error, but it’s simple and robust and that makes it a very good method to get a pretty good result on very complex functions. Newton raphson also could be tailored here and have an expected error - it’d need to be tuned for dealing with backlash but it’d probably do well and maybe 2x the error in a well performing v-fit - I’m not suggestion to use newton raphson I’m just saying these approaches are mathematically known ways to optimize a function with modelable error bounds.

    Macro/micro step sizes can be interpreted in alot of ways, you’re not off really there - increase efficiency and keep precision by not wasting all your samples where - from coarse step sizes, you have step ranges that won’t do well. So like 5-100 step samples then 5 20 step samples in one of those intervals, and maybe 5 4 step samples in that interval == 15 scans for 500/4 → 125 samples to scan the whole range with 4 step precision.

    I think on edgehd’s it’s also fairly difficult to have all corners without distortion having impact on HFR and this is something to keep in mind for HFR optimization - collumation on these scopes is about choosing the least bad settings since you can’t get perfect - it will be dependent on the specific mirrors you get, aside from donut affects this is also why I think SCT as a design is more prone to giving naive implementation noisy looking data - maybe it’s as simple as limiting the angle==image circle HFR is measured on… I’ll have to look and see HFR as a height map based on star detections at some point.

    http://arksky.org/aso-guides/aso-telescope-performance/838-aso-guide-to-collimating-a-sct-telescope

  13. Stefan B repo owner

    Just choosing the best sampled point is very problematic. If you have backlash, going to the best sampled point will not give you the expected result. If your stars are not detected properly, the best sampled point might not reflect the actual best point. If your image edges are causing a wide spread of HFR detection values, you can use the Crop Ratio parameters to only use the best area of your imaging circle. It even allows for a donut shape.

    Not going to implement this.

  14. Log in to comment