Skyglyph Guide Star

0xFun CTFby smothy

Skyglyph I: Guide Star - Misc

Points: 220 | Flag: 0xfun{st4rs_t3ll_st0r13s} | Solved by: Smothy @ 0xN1umb

stars

what we got

a tracker_dump.csv with 13,555 star centroid detections from a star-tracker camera (1024x1024 sensor). each row has pixel coords (x_px, y_px), flux, and timestamp. 10 of them are labeled guide stars with known RA/Dec sky coordinates (Vega, Deneb, Altair, Sirius, etc.)

challenge says there's a hidden message visible once you calibrate the camera and project everything back to sky coordinates. tangent-plane projection + mild radial distortion.

the solve

classic astrometry camera calibration problem. the camera warps the sky with rotation, scale, translation, and radial distortion. gotta undo all that.

1. fit the camera model

used the 10 guide stars to fit a 9-parameter model:

  • boresight (RA0, Dec0) - where the camera center points
  • affine matrix (a11, a12, a21, a22) - handles rotation + scale
  • pixel center (cx, cy) - translation
  • radial distortion (k1) - the "mild" warping

forward model: sky coords → gnomonic tangent-plane projection → radial distortion → affine to pixels

python
from scipy.optimize import least_squares

def sky_to_tangent(ra, dec, ra0, dec0):
    dra = np.arctan2(np.sin(ra-ra0), np.cos(ra-ra0))  # handle RA wrap
    cos_c = sin(dec0)*sin(dec) + cos(dec0)*cos(dec)*cos(dra)
    u = cos(dec) * sin(dra) / cos_c
    v = (cos(dec0)*sin(dec) - sin(dec0)*cos(dec)*cos(dra)) / cos_c
    return u, v

# fit with least squares against the 10 guide stars
result = least_squares(residuals, initial_guess, args=(guide_stars,), method='lm')
# RMS residual: 0.43 pixels - sub-pixel accuracy, nice

2. invert the model for all 13,555 stars

go backwards: pixel → undo affine → undo radial distortion (newton's method) → tangent plane (u, v)

python
A_inv = np.linalg.inv(affine_matrix)

def pixel_to_tangent(x, y):
    u_d, v_d = A_inv @ [x - cx, y - cy]       # undo affine
    r_d = sqrt(u_d**2 + v_d**2)
    r = newton_solve(r_d, k1)                   # undo radial distortion
    return u_d * r/r_d, v_d * r/r_d

3. orient the sky plane

README said use Deneb to define +X axis and Altair for +Y sign. rotated the whole tangent plane so Deneb points right, flipped Y if Altair ended up negative.

4. filter and plot

filtered by flux > 120 to cut background noise, plotted the (u, v) sky-plane coordinates and boom - the stars literally spell out the flag:

flag

0xfun{st4rs_t3ll_st0r13s}

ngl this was a cool challenge. stars telling stories fr fr

flag

0xfun{st4rs_t3ll_st0r13s}


smothy out ✌️