Category: Misc
Difficulty: Easy
Download Skyglyph I Guide Star.zip - Try to solve it yourself before reading the writeup!
This challenge is a star-tracker calibration puzzle. You are given tracker_dump.csv containing many detections:
x_px, y_px — pixel coordinates of detected star-like blobsflux — brightness proxyname, ra_h, and dec_deg are presentThe trick is: use those guide stars to calibrate the camera, then map all detections back into a 2D sky plane. When plotted, the stars form a readable message/flag.
Guide-star rows give you a correspondence between:
(x, y)(RA, Dec)RA is given in hours — convert to degrees: ra_deg = 15 * ra_h, then to radians.
Pixels are 2D. RA/Dec live on a sphere. We project RA/Dec to a local 2D tangent plane using a gnomonic projection.
Pick a projection center (ra0, dec0) — a deterministic choice is:
ra0 = circular mean of guide-star RA (handles RA wraparound)dec0 = mean of guide-star DecFor each guide star:
Δra = wrap(ra - ra0) into [-π, π]
cosc = sin(dec0)*sin(dec) + cos(dec0)*cos(dec)*cos(Δra)
u = (cos(dec) * sin(Δra)) / cosc
v = (cos(dec0)*sin(dec) - sin(dec0)*cos(dec)*cos(Δra)) / cosc
Model how the tangent plane maps to pixel coordinates:
r² = u² + v²
f = 1 + k1*r² + k2*r⁴
(u_d, v_d) = (u*f, v*f)
[x, y] = s * R(θ) * [u_d, v_d] + [tx, ty]
Fit parameters p = (s, θ, tx, ty, k1, k2) by minimizing the reprojection error on the guide-star correspondences using a robust Gauss-Newton optimizer with Huber-like weighting.
After fitting p, recover plane coordinates for all detections:
(u_d, v_d)r_d = r * (1 + k1*r² + k2*r⁴) for r using Newton iterationsThe recovered plane can be rotated or mirrored. The challenge defines a deterministic convention:
+X+YPlot the recovered plane coordinates. To reduce clutter, render only the brightest detections (keep points above a flux quantile, default: top 10%).
The solver writes a zoomable SVG: recovered_full.svg
Open it in a browser and zoom until the message is clear. If it’s too dense, raise the quantile:
python3 solver_skyglyph1_fullsvg.py --dir . --q 0.95