How the Quality Score Works

FITS Blaster  ·  Last updated: November 2026

The quality score is a single integer from 0 to 100 that summarises the optical quality of a FITS frame. It is a weighted average of up to four individual metrics: FWHM, eccentricity, SNR, and star count. Only metrics for which a value was successfully measured contribute; their weights are renormalised so they always sum to 1.0 regardless of which subset is active. In Geek mode all four are computed for every frame with at least 10 stars; a frame with fewer (thick cloud, dew, a closed cap, a flat) scores 0.

PSF Signal Weight and Sky Background are additional metrics shown in the inspector and session chart, but they are not included in the composite score.

Step 1 — Background Estimation

Before any star is detected or measured, the image background level and noise are estimated using stratified sampling:

  1. 5 000 pixels are sampled at regular stride across the full frame.
  2. The median of those samples is taken as the sky background level.
  3. The median absolute deviation (MAD) of the samples is computed and converted to an equivalent Gaussian sigma:
σ = MAD × 1.4826

The factor 1.4826 makes MAD a consistent estimator of the standard deviation for normally-distributed noise. A floor equal to 0.01 % of the sampled data range is applied to avoid division by zero on pathological data.

Colour (OSC/Bayer) cameras: the background and σ are measured separately for each of the four positions of the 2 × 2 Bayer cell, so the colour of the sky (a red or green cast) doesn't count as noise. The Sky BG value shown in the app is still the background over all pixels.

The detection threshold is set at background + 5 σ (per Bayer position on colour cameras).

Step 2 — Star Detection

Star candidates are the local maxima above the 5 σ threshold. Not every candidate is a star; the next step decides which ones count.

GPU path (default on Apple Silicon)

A Metal compute kernel scans the full frame in parallel. Each thread checks whether its pixel is above the threshold and is strictly greater than all 8 neighbours. Candidates are written to a compact shared buffer with room for 50 000; a frame with more gets a second pass with room for all of them. The GPU step takes roughly 3–8 ms for a 16–50 MP image.

CPU fallback

When Metal is unavailable, a vectorised scan covers a 4 096 × 4 096 centre crop. Each row is pre-filtered; rows where no pixel exceeds the threshold are skipped entirely (~50× faster than a naïve full-scan for typical star fields).

Which candidates count as stars

Every candidate is checked. It counts as a star when:

Saturated stars (clipped tops) count once each, but aren't measured. The number of stars is the star-count metric.

A frame with fewer than 10 stars has no stars to measure: FWHM, eccentricity, SNR and PSF Signal Weight stay empty, and the score is 0.

Step 3 — Per-Star Shape Measurement

The 200 brightest stars (unsaturated, as counted in Step 2) are fitted. Each star's fit window and ring follow its own size, so large stars (long focal lengths, FWHM of 8 px and more) are measured as accurately as small ones.

Sub-pixel centroid

A 5 × 5 intensity-weighted window gives a sub-pixel centroid (cx, cy) and a bilinearly-interpolated peak value.

FWHM and eccentricity — four-direction Moffat fit

A Moffat β = 4 profile (the PixInsight standard) is fitted along four directions — 0°, 45°, 90°, 135° — through the sub-pixel centroid, using a ±10-pixel window (1.5 × the FWHM for stars larger than about 6.7 px) and a linearised weighted regression:

z = (A/I)^(1/4) − 1  =  t²/α²   →   α = √(Σ w·t⁴ / Σ w·z·t²)

The four α values are combined analytically to reconstruct the true principal axes of the elliptical PSF at any orientation. For a Moffat ellipse with semi-axes a (major), b (minor) at angle θ:

1/α(φ)²  =  cos²(φ−θ)/a²  +  sin²(φ−θ)/b²

This gives three independent combinations that can be solved in closed form:

S   =  (1/α₀² + 1/α₉₀² + 1/α₄₅² + 1/α₁₃₅²) / 2   =  1/a² + 1/b²
C   =  1/α₀²  − 1/α₉₀²                              =  (1/a² − 1/b²)·cos(2θ)
S₂  =  1/α₄₅² − 1/α₁₃₅²                             =  (1/a² − 1/b²)·sin(2θ)

D           =  √(C² + S₂²)
1/a_major²  =  (S − D) / 2
1/a_minor²  =  (S + D) / 2

The reported FWHM is the geometric mean of the principal-axis values:

FWHM = √(FWHM_major × FWHM_minor)

Units are pixels. Values below 0.5 px (hot pixels) or above 20 px (galaxy cores, nebula knots, blends) are rejected; in frames whose typical star is large, the upper limit is 2.5 × that size.

Eccentricity follows directly from the same principal axes:

e = √(1 − (FWHM_minor / FWHM_major)²)

Because the four directions span the full 180° range uniformly, elongation is detected with equal sensitivity at any angle — 0°, 45°, or anywhere between. This matches PixInsight SubframeSelector's full 2D PSF ellipse fit.

Colour (OSC/Bayer) cameras: FITS Blaster detects the Bayer pattern from FITS headers (BAYERPAT, COLORTYP, or CFA_PAT). For Bayer files, each star crop is bilinearly demosaicked to a full-resolution single-channel luminance image, and the same four-direction Moffat fit used for mono cameras is then applied. Two luminance variants are computed per star:

Bilinear demosaicking preserves the full crop resolution — eccentricity precision on OSC cameras is equivalent to a mono camera.

SNR — the star's total light

SNR is the star's total light, from the fitted Moffat profile, in units of the sky noise:

SNR = A · π · α_major · α_minor / (β − 1) / σ_sky        (β = 4)

where A is the background-subtracted peak. Because it uses the total light rather than the peak, SNR follows exposure, transparency and sky brightness without repeating the seeing (a sharper star has a higher peak, but not more light). It is the closest equivalent of PixInsight's PSF SNR. The numbers are on their own scale: session medians of roughly 1 000–10 000.

Frame values

The frame's SNR is the median over all fitted stars. Its FWHM and eccentricity are the medians over the bright fitted stars (local contrast of at least 40, or the 20 with the highest contrast when fewer reach it): on faint stars noise makes the fit wider and more elongated.

PSF Signal Weight (PSF-SW)

PSF Signal Weight is computed as a by-product of the Moffat fit — no extra processing is needed. It measures peak amplitude per unit of sky noise, rewarding both good transparency and good seeing.

Formula

For each of the up to 200 fitted stars, the background-subtracted sub-pixel peak amplitude A is accumulated:

PSF-SW  =  mean(A) / σ_sky

where σ_sky is the background sigma from Step 1.

Why peak amplitude?

Good transparency delivers more photons, which raises the peak A. Good seeing concentrates those photons into a narrower PSF, also raising A. PSF-SW therefore rewards both factors simultaneously. This matches PixInsight SubframeSelector's PSF Signal Weight behaviour.

What PSF-SW tells you

PSF-SW is available in the session chart (the PSF·S button), the inspector, and the sidebar sort menu. It does not contribute to the composite quality score — it is a supplemental metric intended to inform integration decisions.

↑ Back to top

Step 4 — Composite Score

Each metric is converted to a normalised sub-score s ∈ [0, 1]:

MetricWeightIdealBad atFormula
FWHM35 %≤ 2 px≥ 7 pxclamp(1 − (FWHM − 2) / 5, 0, 1)
Eccentricity35 %0≥ 0.9clamp(1 − e / 0.9, 0, 1)
SNR20 %≥ 20 000≤ 100clamp(log₁₀(SNR / 100) / log₁₀(200), 0, 1)
Star count10 %≥ 5000clamp(log₁₀(n + 1) / log₁₀(501), 0, 1)

Star count and SNR use a log scale, so a frame with half the stars or half the light loses a fixed number of points rather than most of them. Eccentricity scores 0 only at 0.9, where star trails measure: normal frames measure about 0.4 (mono) to 0.5 (colour cameras).

The weighted average of the available sub-scores is scaled to 0–100 and rounded down:

score = ⌊ (Σ wᵢ · sᵢ) / (Σ wᵢ) × 100 ⌋

If a metric could not be measured for a frame, it is left out and the remaining weights are rescaled. A frame with fewer than 10 stars scores 0.

Sky background and PSF Signal Weight are not part of the score. Because the score is driven mostly by star shape (70 %), haze or thin cloud lowers it less than its SNR and star count. Auto-Flag's SNR and star-count checks, both on by default, catch those frames; the Sky BG and PSF Signal Weight criteria can be added.

Badge Colours

The quality badge on each thumbnail is coloured by the worst detected problem, independent of the score:

ColourCondition
RedEccentricity > 0.65 (trailing), or FWHM > 1.5 × group median (focus failure)
AmberStar count < 40 % of group median (< 30 % for narrowband filters), or fewer than 10 stars
GreenNo problem detected and score is in the top third of the filter group
GreyNo problem detected, not in top third

Group medians are computed separately for each filter group (Hα, OIII, etc.) so that narrowband frames with naturally lower star counts are not unfairly compared against broadband frames. In a group with fewer than 3 frames, the median says too little, so only the trailing and fewer-than-10-stars badges apply there.

Badges appear in Geek mode, where the metrics are measured. With macOS Differentiate without color on, top-third badges also show a ★.

↑ Back to top