Using the fact that
[math]\cos{\phi} \equiv \frac{p_x}{\sqrt{p^2-p_z^2}}[/math]
[math]\Longrightarrow \sqrt{p^2-p_z^2}=\frac{p_x}{\cos{\phi}}=constant[/math]
We can simply use the expression
[math]\frac{p_x}{\cos{\phi}}=\frac{p_x'}{cos{\left(\phi+\delta \phi\right)}}[/math]
[math]\Longrightarrow p_x'=\frac{p_x \times \cos{\left(\phi+\delta \phi\right)}}{\cos{\phi}}[/math]
Then, using
[math]\sqrt{p^2-p_z^2}=\sqrt{p_x^2+p_y^2}[/math]
[math]\Longrightarrow p_y'=\sqrt{p^2-p_z^2-p_x^{'2}}[/math]
Starting with a data file of momentum components constructed using awk as described above
A program was written to rotate the phi angle as described above. The changing x and y components for this distribution can be seen with