Jump to content

  •  

CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.

Photo

autofocus tips in NINA

  • Please log in to reply
12 replies to this topic

#1 DRK73

DRK73

    Apollo

  • *****
  • topic starter
  • Posts: 1,035
  • Joined: 08 Mar 2013
  • Loc: Maryland, United States

Posted 05 April 2021 - 07:44 AM

Hey all, 

 

I've started using my ZWO EAF, with NINA, to give myself more time to contemplate life while I'm out imaging instead of using that time to fiddle with my gear. Unfortunately, I'm now spending all of my time fiddling with my gear and getting even less to show for it. 

 

Focus is of course one of those things where "close but no cigar" is just not going to cut it, and at this point autofocus isn't cutting it. 

 

First night out I just accepted the defaults and let NINA do its thing. Stars were *close*, but not good enough to integrate with with previously collected data where I'd focused manually (just using a Bahtinov mask and the ZWO hand-controller for my EAF). 

 

Last night I altered the settings so that the bin mode was 2x2, dropped exposure time from 6 seconds to 3, and had it take two exposures for every point. 

 

I ran the autofocus routine and, while it did seem to take a *VERY*  long time, it seemed to have nailed it (I'd also just installed a filter wheel so everything was put way out of focus, anyway, so I figured that was par for the course). Again, the initial focus it found looked good, so I started my sequence that I'd programmed for the evening (which was already getting frustratingly long due to numerous failed autofocus attempts, having to do field surgery on a new EFW, etc.).

 

My sequence had it do an initial autofocus, followed by doing a refocus at each filter change. 

 

The initial autofocus when the sequence started seemed to throw off the the autofocus I'd it had just performed and it even gave an error message saying something about HFR not changing enough and that I just increase step size. Since it had *just focused*, I determined this to be a nuisance remark, cheerfully encouraged it to go ____ itself, and keep going. Subsequent autofocus attempts...happened...but the results seemed to indicate the stars had all eaten too much and mostly just wanted to sit around in their "fat pants". Since I like stars fit and trim, I rejected them all. 

 

Since autofocus - when it works - takes FOREVER, and kind of doesn't work anyway, then what's the point? 

 

Okay, obviously lots of people get it to work, so any tips/suggestions would be appreciated!


  • Joebean4jp likes this

#2 jonnybravo0311

jonnybravo0311

    Vanguard

  • *****
  • Posts: 2,424
  • Joined: 05 Nov 2020
  • Loc: NJ, US

Posted 05 April 2021 - 08:27 AM

Here's what I've found to help:

  • Use a backlash compensation method of "overshoot"
  • Put a large number in the "OUT" (leave "IN" as 0). I use 350. The idea is to overcome your hardware's backlash by shooting well past it, then coming back in.
  • Use a larger number than you think you should for step size. This is rather counter-intuitive. I use a step size of 50 and an initial offset of 4.
  • You can also try to use an area smaller than your entire frame. This is done by setting the "AF Inner Crop Ratio" to a value less than 1. For example, if you want to use a rectangle 80% the size of your image frame, you'd put 0.8 in there.

One other thing I've found, which is not a setting, is to start with stars pretty nearly in focus. If you're starting with stars way out of focus, especially if you're using the defaults, you're only moving 10 steps at a time. If you've got to go 800 steps... that's a lot of time spent in the AF routine.

 

Hopefully this helps your stars put the fat box back in the closet and gets them into the skinny jeans :p


  • dswtan, DRK73, moonrider and 3 others like this

#3 DRK73

DRK73

    Apollo

  • *****
  • topic starter
  • Posts: 1,035
  • Joined: 08 Mar 2013
  • Loc: Maryland, United States

Posted 05 April 2021 - 09:55 AM

Thanks Jonny! I'll try it out again - but burned a good night on this last night with nothing to show, and have nothing but clouds and rain in the long-term forecast. So it goes...


Edited by DRK73, 05 April 2021 - 09:56 AM.


#4 SnowWolf

SnowWolf

    Mariner 2

  • *****
  • Posts: 281
  • Joined: 21 Jan 2019
  • Loc: Colorado Front Range

Posted 05 April 2021 - 04:16 PM

2 videos that do a good job explaining NINA's autofocus and how to set it up:

 

https://www.youtube....uiv,TheLazyGeek

 

https://www.youtube....uiv,TheLazyGeek

 

By the way, his entire set of NINA tutorials are very good:

 

https://www.youtube....v8apj_eXQ-tkuXG


  • dswtan, cybermayberry, DRK73 and 1 other like this

#5 happylimpet

happylimpet

    Fly Me to the Moon

  • *****
  • Posts: 5,950
  • Joined: 29 Sep 2013
  • Loc: Southampton, UK

Posted 05 April 2021 - 04:21 PM

The system isnt meant to start with stars heavily out of focus. You should manually focus at the start of the night and then let autofocus tweak it. It shouldnt go WAAAY out of focus when it runs through it, just enough to clearly see where the best focus is. So make sure the 'autofocus initial offset steps' is low - i use 3, but might use 4 if i think the focus might change rapidly or some other issue might crop up.

 

You can also bin while focusing, this speeds it up a lot. Unless your images are undersampled of course. Use hyperbolic focus curve fitting.


  • dswtan and moonrider like this

#6 moonrider

moonrider

    Viking 1

  • *****
  • Posts: 618
  • Joined: 16 Nov 2013
  • Loc: Murphy, NC

Posted 05 April 2021 - 09:52 PM

The autofocus routine in N.I.N.A. works very good and reliable with my ZWO EAF and my ES80ED. Follow the above advice and tweak the step size and also check autostretch and black clipping settings especially if in a light pollution site. 

 

That said, I am struggling getting it to work with my SCT and it's Microtouch EAF........



#7 Linwood

Linwood

    Mercury-Atlas

  • *****
  • Posts: 2,523
  • Joined: 09 Jul 2020
  • Loc: Ft Myers, Florida, USA

Posted 05 April 2021 - 10:08 PM

Don't use trends, use Hyperbolic (as opposed to Hyperbolic with trends).  Trends tends to over-estimate the sharpness to expect, then it throws out the result when it can't meet it.  I do not know if the other (non-hyperbolic) are better or worse, but if using Hyperbolic+Trends try without trends.


  • dswtan likes this

#8 dswtan

dswtan

    Viking 1

  • *****
  • Posts: 875
  • Joined: 29 Oct 2006
  • Loc: Morgan Hill, CA

Posted 05 April 2021 - 10:27 PM

Good advice above. Here are my settings. The "use a larger number than you think you should for step size" is key. Yours will vary depending on your exact setup. My example happens to be a Moonlite. It's common for people to think this is 5-10x larger than what "intuition" says. But it works, and works well. At 6s exposures, it takes ~1 min for me. 

 

NINA AF

 


  • DRK73 likes this

#9 jerahian

jerahian

    Surveyor 1

  • *****
  • Moderators
  • Posts: 1,511
  • Joined: 02 Aug 2018
  • Loc: Maine

Posted 05 April 2021 - 10:39 PM

That said, I am struggling getting it to work with my SCT and it's Microtouch EAF........

For me, to get reliable focus on my Edge 8, I set the "Use brightest n stars" to 15, otherwise the larger, brighter star profiles in long focal length OTAs are skipped when selecting stars for AF.  YMMV, but it made my SCT AF runs far more reliable.


  • moonrider likes this

#10 moonrider

moonrider

    Viking 1

  • *****
  • Posts: 618
  • Joined: 16 Nov 2013
  • Loc: Murphy, NC

Posted 06 April 2021 - 11:29 AM

For me, to get reliable focus on my Edge 8, I set the "Use brightest n stars" to 15, otherwise the larger, brighter star profiles in long focal length OTAs are skipped when selecting stars for AF.  YMMV, but it made my SCT AF runs far more reliable.

I tried that after my sequence had ended and low and behold, it worked! I had tried "almost" every tweak to the settings and focus was always soft. It was spot on(checked with the mask) several times even with different filters. 

 

Thanks you!


  • jerahian likes this

#11 Linwood

Linwood

    Mercury-Atlas

  • *****
  • Posts: 2,523
  • Joined: 09 Jul 2020
  • Loc: Ft Myers, Florida, USA

Posted 06 April 2021 - 11:41 AM

Some general ramblings.... 

 

There are some other things to stay aware of.  One is backlash. If the right side of your graph has a flat area for one or a few steps, it implies backlash because the focuser failed to move as it went from the furthest point to the next one in.   Make it go away or small adjustments will not work either and yield an incorrect focus. 

 

The other relates to the brightest N stars and other such tricks. One thing to be aware of is how your optics vary across the frame.  If your field is flat, and stars are round corner to corner, all is good.  If not, you need to take some care.  Brightest N might have you focusing on the edges (e.g. if you had a galaxy in the center).  A very cool feature of nina is the inner/outer crop ratio.  That will let you actually define a donut shaped area (ok, a rectangular donut) in which to focus, avoiding the center and/or the edge.  I find my refractor is a bit off on back focus, but if I do my AF in a donut about half way to each edge, the center is still sharp, but the edge stars are much better -- like finding a happy medium.   But my C11 is happier focusing on the whole frame, especially in narrow band where frequently the stars are fewer and dimmer so want to have all I can find.

 

I also recommend setting the "Number of attempts" to 2 at least.  This way if one run fails, it will try again.  If you are in a sequence running while you sleep, this improves your odds of the sequence not having a whole run of bad focus.  Conversely I have not found "Number of frames" to be very helpful, since two shots taken in short succession (think clouds) rarely make a difference.  But if you find your focuser a bit imprecise the multiple samples may improve the odds. 

 

Final thing to be aware of -- what makes the precision in the curve fit focus is not the bottom of the curve but the outside.  It's those big fat out of focus stars that provide the overall shape and precision to the curve.  You do not need an obscene number of points or width, but do not try to short cut by avoiding the badly out of focus points entirely.  They are what actually drives your final focus moreso than the points near the bottom.


  • moonrider likes this

#12 cucubits

cucubits

    Viking 1

  • *****
  • Posts: 551
  • Joined: 20 Jul 2020
  • Loc: Dallas, TX

Posted 06 April 2021 - 12:05 PM

+1 on using Overshoot feature in NINA. I put 100 there and it's enough for me. Any value should be fine as long as it's more than your actual total backlash.

 

+10 on Cuiv's videos. He really does an awesome job showing how to use NINA. Having watched his videos in advance, when I got my first focuser, I set it up in a few minutes and everything was just working.

 

@cuivienor - https://www.youtube....CuivTheLazyGeek


Edited by cucubits, 06 April 2021 - 12:07 PM.

  • moonrider likes this

#13 moonrider

moonrider

    Viking 1

  • *****
  • Posts: 618
  • Joined: 16 Nov 2013
  • Loc: Murphy, NC

Posted 06 April 2021 - 07:28 PM

Some general ramblings.... 

 

There are some other things to stay aware of.  One is backlash. If the right side of your graph has a flat area for one or a few steps, it implies backlash because the focuser failed to move as it went from the furthest point to the next one in.   Make it go away or small adjustments will not work either and yield an incorrect focus. 

Yeah, I'm fairly experienced with the autofocus routine. Before Culv added the overshoot option, I had already had the ZWO EAF dialed in. Using the OS option just makes it easier now.

 

The other relates to the brightest N stars and other such tricks. One thing to be aware of is how your optics vary across the frame.  If your field is flat, and stars are round corner to corner, all is good.  If not, you need to take some care.  Brightest N might have you focusing on the edges (e.g. if you had a galaxy in the center).  A very cool feature of nina is the inner/outer crop ratio.  That will let you actually define a donut shaped area (ok, a rectangular donut) in which to focus, avoiding the center and/or the edge.  I find my refractor is a bit off on back focus, but if I do my AF in a donut about half way to each edge, the center is still sharp, but the edge stars are much better -- like finding a happy medium.   But my C11 is happier focusing on the whole frame, especially in narrow band where frequently the stars are fewer and dimmer so want to have all I can find.

Using my 9.25 with the cor/flat, I use .8 on the crop ratio just to be absolutely cleared of the slight comet snaps in the outer edges. When doing NB, will most likely have to use the whole frame.

 

I also recommend setting the "Number of attempts" to 2 at least.  This way if one run fails, it will try again.  If you are in a sequence running while you sleep, this improves your odds of the sequence not having a whole run of bad focus.  Conversely I have not found "Number of frames" to be very helpful, since two shots taken in short succession (think clouds) rarely make a difference.  But if you find your focuser a bit imprecise the multiple samples may improve the odds. 

I will change thet NOA to 2, that's a good idea. My ZWO on the APO works very good, never thought of using that option.

Final thing to be aware of -- what makes the precision in the curve fit focus is not the bottom of the curve but the outside.  It's those big fat out of focus stars that provide the overall shape and precision to the curve.  You do not need an obscene number of points or width, but do not try to short cut by avoiding the badly out of focus points entirely.  They are what actually drives your final focus moreso than the points near the bottom.




CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.


Recent Topics






Cloudy Nights LLC
Cloudy Nights Sponsor: Astronomics