Solution (source code)

= Solution

Let $\theta$ describe the direction \i[towards the star], measured from the Earth's positive direction of motion. The arriving <photon> propagates in the opposite direction, so in the stellar frame its <four-momentum> has
$$
p_x=-\frac{E_\gamma}{c}\cos\theta,\qquad p_y=-\frac{E_\gamma}{c}\sin\theta.
$$
A <Lorentz transformation> into the Earth's frame, moving at $\beta c$ along $x$, gives
$$
E_\gamma'=\gamma E_\gamma(1+\beta\cos\theta),\qquad p_x'=-\frac{\gamma E_\gamma}{c}(\cos\theta+\beta),\qquad p_y'=p_y.
$$
The observed stellar bearing is opposite to the transformed photon <momentum>. Since a <photon> satisfies $|\mathbf p'|=E_\gamma'/c$,
$$
\boxed{\cos\theta'=\frac{\cos\theta+\beta}{1+\beta\cos\theta},\qquad\sin\theta'=\frac{\sin\theta}{\gamma(1+\beta\cos\theta)}.}
$$
This is <relativistic aberration>. For small $\beta$, $\theta'=\theta-\beta\sin\theta+O(\beta^2)$: stellar directions shift towards the direction of the observer's motion. Keeping the distinction between stellar bearing and photon propagation direction explains the plus signs.