NINA Autofocus Curves: Step Size, Backlash, and What a Good V-Curve Looks Like
A guide to setting up NINA's autofocus routine for remote operation: how to pick step size and offset, why the overshoot method eliminates backlash, and how to read the curve to catch problems before they cost you a night.

When you operate a telescope remotely, nobody stands next to the focuser with a Bahtinov mask. The focus has to find itself, every time, without anyone looking at the screen. That is what NINA's autofocus routine does, and when it works it feels like magic. When it does not, you wake up to a night of defocused subs and a session to redo.
The difference between those two outcomes is the autofocus curve. A well-tuned curve produces sharp focus from the first run to the last. A curve with the wrong step size, uncorrected backlash, or too few data points will fail intermittently, and intermittent failures are harder to diagnose than total ones because they look like equipment problems.
This post covers how NINA builds the focus curve, what each parameter controls, how to find the numbers that work for your rig, and what to monitor when the telescope is miles away.
How NINA Measures Focus: HFR and the Curve
NINA does not use a Bahtinov mask or a focus score. It measures the Half Flux Radius (HFR) of every star in the selected region of the frame. HFR is the radius of a circle that contains half of the star's total flux. In focus, HFR is at its minimum. Out of focus, HFR rises as the star expands.
The autofocus routine moves the focuser through a range of positions, takes an exposure at each step, measures the HFR of the stars in that frame, and plots the values against focuser position. The result is a V-shaped or U-shaped curve. NINA fits a hyperbolic function to the data points and moves the focuser to the position that minimizes the curve.
The shape of the curve tells you everything. A clean, symmetric curve means the parameters are correct and the focuser is behaving. A curve with a flat bottom, a W shape, or a missing side tells you exactly what needs to change.
The Parameters That Control the Curve
The autofocus settings in NINA live in the Options panel under Auto Focus. Four parameters define the quality of the curve.
Auto Focus Step Size. This is the distance in focuser steps between consecutive data points on the curve. It is the most important parameter because it sets the resolution of the entire scan. Too small, and the HFR change between steps is lost in the noise from the camera readout and the atmosphere. Too large, and the curve becomes steep and coarse, and the fitted minimum lands between the real optical focus and the nearest data point.
For a ZWO EAF on a RedCat 91 or 51, the manufacturer recommends values between 5 and 20 steps as a starting window. In practice, many users land between 10 and 30 depending on their precise focuser travel. The correct value is the smallest number that still produces a visible HFR change between adjacent steps when you are off focus. If you see no HFR difference between two consecutive points on the slope, the step size is too small. If the curve has only three data points on each side before the HFR shoots to the maximum, it is too large.
Auto Focus Initial Offset Steps. This is how many step-size increments NINA moves away from the starting position before it begins the sweep. A value of 4 means the routine moves 4 x step size outward, then starts collecting data on the way back through the focal plane. The offset ensures the scan captures the full curve on both sides of the minimum. Stay with the default of 4 for most setups. Drop to 3 only if your focuser travel is limited, and never go below 3 or you risk starting on the wrong side of the V.
Number of Points. This is set by the combination of offset steps and whether the sweep goes toward inward, outward, or both directions. By default, NINA scans in both directions and collects 8 to 12 data points total. That is the right range. Fewer than 6 points and the hyperbolic fit becomes unreliable, especially if one side has a noisy measurement. More than 14 points and the run takes too long, increasing the chance that the seeing changes mid-scan and distorts the curve.
Exposure Time. The autofocus exposure needs to be long enough to measure HFR on the stars in the field, but not so long that the run drags. On most deep-sky targets with a bright enough star field, 3 to 5 seconds is sufficient. With a narrowband filter like the Optolong L-Extreme, you may need 6 to 10 seconds because the signal is fainter. If the curve is noisy or the fit fails repeatedly, increase the exposure before changing the step size. A noisy curve from insufficient exposure looks random; a noisy curve from wrong step size looks consistent but flat.
Backlash: Why the Overshoot Method Works
Every focuser with a geared motor has backlash. When the motor reverses direction, the gear train has to take up slack before the focus tube moves. If NINA does not account for this, the focuser position reported by the controller does not match the actual optical position, and the curve develops a flat spot or a step on one side.
The NINA community has converged on a single reliable solution: the overshoot method. Do not set backlash values in the ZWO driver. They do not integrate well with NINA's autofocus routine and often produce inconsistent curves. Instead, go to the Auto Focus options and use only one of the two Overshoot fields, either IN or OUT, with a value that is larger than your focuser's actual mechanical backlash.
How to find that value manually. Mark your focuser position. Tell the motor to move inward by 50 steps. Then tell it to move outward by 50 steps. If the final position differs from the starting point by 10 steps, your backlash is about 10 steps. Double it for safety and enter 20 as the overshoot in the direction opposite to gravity on your focuser. If you cannot measure it, start with 100. An overshoot of 100 steps adds roughly one second to the autofocus run and eliminates the problem completely on most EAF setups. Users on CloudyNights report values from 50 to 500, depending on the focuser, and all of them work because the overshoot is additive and does not require precision.
Set the overshoot in one direction only. Using both IN and OUT at the same time can produce a curve with a step or a second minimum. Pick the direction that ends the overshoot moving toward the position you want the focuser to be in when data collection starts, typically outward.
What a Good Curve Looks Like
A successful autofocus run produces a symmetric V or U shape. The minimum is clearly defined. The HFR values on the left and right sides rise at a similar rate. The fitted hyperbola passes through all data points within a reasonable tolerance, and the residual between the fit and the measurements is small.
Open the NINA autofocus window after a run and look at the graph. The points should form a single smooth arc. If you see a distinct dip at the top on one side, the focuser stepped over a backlash gap and the position reading drifted. If the bottom is wide and flat, the step size is too small and multiple positions produce the same near-minimum HFR. If the left side and the right side have a different number of points, the starting offset was too small and the scan did not capture the full curve on one side. If there is a W shape with two minima, the overshoot is set in both directions or the backlash is not fully compensated.
A clean curve also depends on the star field. If the autofocus region contains a bright star with a saturated core, the HFR measurement becomes unreliable because the peak flattens. Reduce the region with the AF Inner Crop Ratio or increase the exposure time so that the fainter stars in the field dominate the measurement.
Monitoring Autofocus in a Remote Session
When the telescope is at a remote site, you are not watching every autofocus run. But you need to know when one fails, because a failed autofocus at the start of a sequence produces defocused subs for the rest of the night.
NINA logs every autofocus attempt. The log file records the fitted minimum position, the HFR at that position, the number of points collected, and whether the fit succeeded. Check the logs in the morning. A sudden jump in the focuser position between consecutive runs suggests a mechanical shift or a temperature change that the autofocus compensated for. A series of runs where the fitted HFR slowly rises across the night means the curve is still symmetric but the minimum is drifting, which is normal with temperature and can be addressed by scheduling autofocus every hour or every 2 degrees C of temperature change.
The metric to watch is not the absolute HFR value, which depends on target and seeing, but the stability of the fitted minimum position. If the minimum position changes by more than a few percent of total focuser travel between runs on the same target and filter, there is an issue that needs investigation. On a stable rig like the RedCat 91 with a ZWO EAF at a remote site with controlled temperature, the focuser position for a given filter should change by less than 50 steps between consecutive runs, and the HFR at focus should stay within 10 percent of the initial value.
For remote sessions, configure NINA to trigger an autofocus before the first sequence of the night, after every filter change, and every hour or every 2 C of temperature change, whichever comes first. This cadence catches thermal drift without wasting time on unnecessary runs. If you are imaging with a dual-band filter like the L-Extreme, expect longer autofocus exposures and slightly higher HFR values because the signal is restricted to two emission lines and the star field appears dimmer.
Getting It Right Before You Go Remote
The autofocus curve is the easiest thing to tune on a clear night at home, and the hardest thing to diagnose remotely. Take the time to run a dozen autofocus tests in NINA while you can still see the screen. Vary the step size and watch the curve change. Introduce a known amount of defocus and confirm that the routine returns to the same position. Once the parameters are stable, you can trust the autofocus to work night after night without supervision, and that is when remote imaging stops being stressful and becomes productive.