V-curve and best position

V-curve and best position

Workshop · 10 / 17

Focus

autofocus and its hyperbolic V-curve

An autofocus routine that measures how sharp your stars are, fits a hyperbola to the V-curve and puts the focuser at the sharpest point.

Focus is the focusing workshop. It runs autofocus on demand, triggers it by itself during the night when sharpness degrades, and shows live the curve that justifies the position it picked.

In short

Focus corrects itself.

Temperature, time, degrading HFR, flip: focus is corrected during the night, between two frames.

You see why.

The V-curve with its hyperbola, best point and iterations shows what autofocus measured and why it picks that position.

A failure doesn't break the night.

15% validation, exposure cap, starless sky, focuser dropout: the routine goes back to the last good position instead of chaining blurry images.

Measurements you can check.

Every measurement and every result is logged, with the trigger cause and the outcome.

What the workshop does

Focus drifts: temperature changes, the tube contracts, stars bloat. Refocusing by hand in the middle of the night costs frames and attention.

Focus automates the gesture. It takes a reference exposure, sweeps the focuser on either side of the point, measures the HFR (star sharpness) at each position, fits a hyperbola to the measurements and aims for its minimum. A validation exposure confirms the result; if it is worse than the reference, the routine fails and the focuser goes back to its last good position.

What sets it apart

Manual focusing or a plain fixed-step sweep burns exposures for little information. Here the routine relies on a hyperbolic fit, the physical shape of the sharpness curve, and knows when not to trust its measurement.

A standalone autofocus module is launched by hand. Focus also triggers itself, by rules you choose, and fits into the night's plan.

The measurement rests on the HFR of many stars rather than one: it rejects saturation, trails and elongated objects.

All features · 28

Run focusing

  • Runs autofocus in one clickA complete routine: reference exposure, sweep, curve fit, move to the best point, validation exposure.
  • Sets the step and the starting offsetFocuser step size and the number of steps out before the sweep; current and target positions are displayed.
  • Stops a running autofocusA Stop button cuts the routine if it runs too long or diverges.
  • Uses its own exposure settingsDuration, gain, offset, binning and filter of the measurement exposure belong to autofocus, not to your lights; the measurement exposure is never saved as a light.
  • Doesn't move the mountAutofocus acts on the focuser only.
  • Requires being masterOnly one station commands; the controls are greyed out for the others.

Measure and visualize

  • Measures HFR over many starsStar detection above the background, centroid, rejection of saturated stars, trails and over-elongated objects; the HFR kept is the median, robust against outlier stars.
  • Plots the V-curveHFR in pixels against focuser position, with the fitted hyperbola, the best point, the calculated value and the initial → final shift.
  • Shows the running iterationEach exposure of the sweep is added to the curve as it is measured.
  • Logs every measurement and every resultPosition, HFR, star count, temperature, then best point, fit quality, number of exposures, trigger cause and outcome.

A routine that protects itself

  • Compensates focuser backlashThe final approach is always made in the same direction, with one overshoot and return per routine.
  • Validates before acceptingIf the HFR at the point it found is at least 15% worse than the reference, the routine fails and goes back to the last good position.
  • Caps the number of exposuresSixteen at most; beyond that, the routine stops on the last good position.
  • Rejects a doubtful curveIf the hyperbola fit isn't good enough, the routine fails rather than inventing a point.
  • Copes with a starless skyTwo measurements in a row with no star and the routine stops with a message, without crashing; the last good position is kept.
  • Flags a focuser that drops outAn inconsistent position is reported as a device offline and no science exposure follows.
  • Stops cleanly on abortThe focuser returns to the last known good position.
  • Reads back a replayable night journalFocus measurements are used to verify the best point and the number of exposures.

Trigger it during the night

  • Autofocus before the first lightOne routine when the sequence starts (on by default).
  • Refocus every N minutesA time interval of your choice.
  • Refocus on a temperature changeWhen the focuser temperature has moved by more than N °C since the last accepted autofocus, if the probe is present.
  • Refocus when HFR degradesWhen a light's HFR is N% worse than that of the last accepted routine, checked every N lights (10% by default).
  • Refocus after a meridian flipA checkbox of the flip, set with the Sequencer.
  • Slots in without spoiling a frameAutofocus runs between two exposures, never during one; the queue then continues.
  • Doesn't loopA trigger launches a single routine, then the queue continues; a routine that crashes stops the queue cleanly, with no new light taken at a bad focus point.

Drive the focuser by hand

  • Moves the focuserTo a target position or step by step, through the interface, never straight on the hardware.
  • Forbids competing gesturesDuring a sequence, manual focuser moves are refused; Stop remains available.

Comfort

  • Speaks French and English

All Heimdall workshops