Star Detector & FWHM Meter
Find stars in an astro image and measure centroids, FWHM, HFR and roundness.
Try an example: Synthetic star field (16-bit FITS) · Only bright stars, raw RGGB frame
How it works
Upload a FITS, PNG, TIFF or JPEG frame to detect stars above a noise threshold, measure sub-pixel centroids, full width at half maximum, half-flux radius and roundness, and download a star list CSV and an overlay PNG. Useful for focusing, judging seeing and tracking, and checking frames before stacking. Lumina Astro Lab runs the same detector locally.
- Background: the image is split into tiles of about 64 pixels; each tile gets a sigma-clipped median (κ = 3). The tile grid is median-filtered and interpolated bilinearly. Noise σ is the median sigma-clipped standard deviation of the background-subtracted tiles.
- Detection: the background-subtracted image is smoothed with a 3 × 3 binomial kernel; pixels above threshold × σ of the smoothed noise form 8-connected components. Components smaller than the minimum area, touching the border or narrower than 0.9 pixel FWHM (hot pixels, cosmic rays) are rejected. Overlapping stars are not separated.
- Measurement: adaptive Gaussian-weighted moments (Bernstein & Jarvis 2002) give the centroid and the covariance; FWHM = 2.3548 × σ (geometric mean of the axes, corrected for pixel integration), roundness = minor/major axis. HFR is the radius enclosing half of the background-subtracted flux in an aperture of 3.5 σ. On synthetic Gaussian stars with signal-to-noise above 50, centroids are within 0.1 pixel.
- Colour images are measured on the mean of R, G and B; raw one-plane frames with a Bayer pattern are debayered (bilinear) first. Coordinates are 0-based with pixel centres at whole numbers and y pointing down; the CSV also lists 1-based values.
Sources
- Definition of the Flexible Image Transport System (FITS), version 4.0 (IAU FITS Working Group / NASA HEASARC)
- Bernstein & Jarvis (2002): Shapes and shears, stars and smears — adaptive moments (The Astronomical Journal)
Part of Lumina
-
Lumina Photo editor & image toolkit
Bring out what you saw. A free photo studio, right in your browser.
Related tools
- FITS Header & Image Inspector – Read a FITS header, check BITPIX, scaling and Bayer keywords, and preview the image.
- Astro Image Stacker (align & stack) – Calibrate, align and stack astro frames with sigma clipping; download a 32-bit FITS.
How to use the Star Detector & FWHM Meter
Find stars in a FITS, TIFF, PNG or JPEG frame and measure sub-pixel centroids, FWHM, half-flux radius and roundness for focusing and frame selection.
What it is for
Sharp stars are the clearest sign of good focus, steady seeing and accurate tracking. Astrophotographers judge them with two numbers: the FWHM (full width at half maximum, the diameter where a star drops to half its peak) and the HFR (half-flux radius, the radius that holds half of its light). Elongated stars show up as low roundness.
Upload a single frame — FITS, PNG, TIFF or JPEG, up to 16 MB and 1 megapixel — and the tool estimates the sky background, finds stars above a noise threshold, measures each one and returns a star list CSV plus an overlay PNG with every detection circled. Use it to compare focus positions, pick the sharpest subs before stacking, or check whether tracking drifted. Raw colour frames are debayered first. Close double stars are not separated, and it does not identify stars by name (no plate solving).
Worked example
The first example is a synthetic 128 × 96 light frame whose stars are Gaussian with a known width, so the result can be checked. With the default threshold of 5 σ the tool reported:
- 23 stars, median FWHM 3.4062 px, HFR 1.6819 px, roundness 0.9645
- Background 902.5, noise σ 32.50
- Brightest star at x = 83.238, y = 60.347 with FWHM 3.477 px and SNR 395
For a Gaussian star the HFR is almost exactly half the FWHM, and 1.68 × 2 ≈ 3.4 confirms the profile is close to Gaussian. A roundness near 0.96 means round stars — tracking was fine.
The second example is a raw RGGB frame with the threshold raised to 10 σ and the list limited to 50 stars. Only 3 stars passed (FWHM 4.35 px). A higher threshold keeps only bright, reliable stars, which is what you want for focus comparisons.
How to read the result
- Stars counts detections after rejecting hot pixels, objects on the border and blobs that are not star-like.
- Median FWHM / HFR in pixels. Multiply by your image scale (arcseconds per pixel) to get seeing in arcseconds. Saturated stars are flagged and left out of the medians.
- Median roundness is the minor/major axis ratio; values below about 0.8 point to tracking errors, wind or tilt.
- Background and noise σ are in image units. PNG, TIFF and JPEG values are scaled to 0–65535.
- The table shows the 25 brightest stars; the CSV contains all listed stars with 0-based and 1-based coordinates, flux, peak and SNR.
Tips and common mistakes
- Measure linear data (FITS or 16-bit TIFF). Stretched or JPEG images distort profiles; the tool warns about JPEG.
- Compare FWHM only between frames with the same binning and image scale.
- If too few stars are found, lower the threshold to 3–4 σ; if noise peaks are listed, raise it or the minimum star area.
- Undersampled stars (FWHM below about 1.5 px) are measured less precisely.
- For focusing, watch the trend of the median HFR across frames, not single stars.
FAQ
How accurate are the centroids?
On synthetic Gaussian stars with signal-to-noise above 50, centroids land within 0.1 pixel and FWHM within 3 % of the true value (automated tests).
Why is a bright star missing?
Stars touching the image border are rejected, and two overlapping stars are measured as one blend.
What is the difference between FWHM and HFR?
FWHM comes from the star's second moments; HFR from the enclosed flux. HFR is more robust for defocused, donut-shaped stars.
Does it work on colour images?
Yes. Colour images are measured on the mean of R, G and B; raw frames are debayered with the header's or your chosen Bayer pattern.
Guide last updated:
For scripts and AI agents
- JSON API:
POST https://luminastardetector.usefulweb.site/api/v1/calculate(same calculation as this page) - Interface description: OpenAPI 3.1 · AI guide: llms.txt
- MCP server (Streamable HTTP):
https://luminastardetector.usefulweb.site/mcp· tool namelumina_star_detector
Example request
curl -s -X POST https://luminastardetector.usefulweb.site/api/v1/calculate \
-H 'content-type: application/json' \
-d '{…see OpenAPI examples…}'