0
$\begingroup$

I have a fits image and the header has the keys PC1_1, PC1_2, PC2_1, PC2_2. I want to compute the angle by which my image is rotated so that North will be up. I use the formula below:

angle = np.degrees(np.arctan2(PC1_2, PC1_1)) .

The answer I get is 156.0 deg however when I load the image on DS9 I get the following direction.

enter image description here

Does this mean that the angle is measure from the negative x-axis and so I should use angle_true = 180 - angle or am I using a wrong formula?

$\endgroup$
1
  • $\begingroup$ It depends on how you count and orient your pixel coordinate system. Often its origin is in the top left. $\endgroup$ Jul 20 at 11:32

0

You must log in to answer this question.

Browse other questions tagged .