How the Quality Score Works

FITS Blaster  ·  Last updated: October 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 always computed, so all four always contribute.

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.

The detection threshold is set at background + 5 σ, so only genuine stars (5-sigma detections) are considered.

Step 2 — Star Detection

Stars are detected as local maxima above the 5 σ threshold.

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 (capped at 50 000 entries). 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).

The detected star count is what is reported as the star-count metric.

Step 3 — Per-Star Shape Measurement

Up to 200 of the brightest candidates are selected for shape fitting. Because the median is used to summarise each metric, occasional saturated stars at the top of the brightness ranking have negligible effect on the result.

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 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 (pathological blobs) are rejected.

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 — aperture photometry

A circular aperture of radius r = 2 × FWHM is placed at the centroid. The background-subtracted flux inside the aperture (I_net) and the pixel count (n_ap) are summed:

SNR = I_net / √(I_net + n_ap · σ²_sky)

This is the standard simplified CCD equation (Merline & Howell 1995). Without a known camera gain, the result is a proportional proxy that correctly ranks frames relative to each other within a session on the same camera.

The median FWHM, eccentricity, and SNR across all accepted candidates are used as the frame values.

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] using a piecewise-linear mapping:

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

Star count uses a log scale so that a frame with 50 stars is not penalised as harshly as a frame with 0 stars.

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. If none could be measured (for example, no stars were detected), the score is 0.

Sky background and PSF Signal Weight are not part of the score. Because the score uses fixed thresholds and is driven mostly by star shape, haze or thin cloud may lower it only slightly. To catch those frames, use the Sky BG or PSF Signal Weight criteria in Auto-Flag, or sort or chart by those metrics.

Badge Colours

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

ColourCondition
RedEccentricity > 0.5 (trailing), or FWHM > 1.5 × group median (focus failure)
AmberStar count < 40 % of group median (< 30 % for narrowband filters)
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.

↑ Back to top