Focuser

Role

The Focuser module provides automatic telescope focusing. It moves the motorized focuser across a range of positions, measures star size (HFR — Half Flux Radius) at each point, then computes the optimal position using a degree-2 polynomial fit.

Focuser module screenshot Focuser module screenshot

Required devices

DeviceRole
CameraImage acquisition for HFR measurement
Motorized focuserFocus position control
Filter wheelOptional — used if configured

Parameters

Devices

These parameters are accessible from the module Parameters menu. A set of parameters can be saved as a profile.

ParameterDescription
ExposureExposure duration in seconds
GainCamera gain
OffsetCamera offset

Focus

ParameterDescription
Start positionAbsolute focuser position to begin the sequence (ignored if Focus around current is enabled)
Focus around currentAutomatically centres the sequence around the current focuser position: current_pos − (step × iterations / 2)
StepGap in focuser units between two consecutive measurements
IterationsNumber of measurement points. With 5 iterations and a step of 2000, the focuser explores a range of 8000 units
Average overNumber of frames acquired and averaged at each point to reduce measurement noise
BacklashOvershoot applied before each movement to compensate mechanical play. The focuser moves back by this value before advancing to the target
ZoningDivides the image into zones (1×1 to 9×9). See dedicated section below

Algorithm

Focusing proceeds in two phases.

Phase 1 — Exploration

  1. The focuser moves to start_position − backlash (mechanical play compensation)
  2. It advances to start_position
  3. For each iteration:
    • Camera frame reset
    • Acquisition of Average over frames, computation of mean HFR
    • Recording of the (position, HFR) pair
    • Real-time update of the polynomial fit
    • Advance by one step

The degree-2 polynomial fit continuously provides the minimum of the HFR curve:

optimal_position = −b / (2 × a)    [for ax² + bx + c]

Phase 2 — Final positioning

  1. The focuser moves back to best_position − backlash
  2. It advances to the optimal position computed by the polynomial
  3. A final frame is acquired to measure the resulting HFR
Return value

The retained optimal position is the polynomial fit result (bestposfit). If the fit could not be computed (fewer than 3 points), the best directly measured position (bestpos) is used instead.

Zoning

Zoning divides the image into an N×N grid and computes an independent polynomial fit for each zone. Results are displayed in the Zone results table.

ZoningUse case
1×1No zoning — single global measurement
2×2Basic tilt detection (4 quadrants)
3×3Finer analysis — centre + edges + corners
Tilt diagnostics

If optimal positions vary significantly from one zone to another, this indicates a tilt or coma defect at the edge of the field.

Live values

ValueDescription
Average HFRHFR averaged over the Average over frames at the current point
Last HFRHFR of the last acquired frame
Focuser positionCurrent absolute position
Best positionBest directly measured position
Polynomial fit positionOptimal position computed by polynomial fit
IterationCurrent measurement point number

Final result

At the end of the focusing sequence, the module publishes:

ResultDescription
Final positionAbsolute focuser position after positioning
Final HFRHFR measured at the optimal position

Actions

ActionDescription
Start focusingStarts the complete sequence
AbortImmediately stops the current sequence