Skip to content

Commit

Permalink
Fix check of FLIP in DIPOL images in get_angle_from_history (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
juanep97 committed Oct 29, 2024
1 parent 36b734b commit 5133fea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion iop4lib/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ def get_angle_from_history(redf: 'ReducedFit' = None,
# Calculate the rotation angle in degrees
angle = np.degrees(np.arctan2(pc_21, pc_11)) % 360 # wrap angles at 0,360 (-180 = 180)

if 'FLIPSTAT' in redf.rawfit.header:
if 'FLIPSTAT' in redf.rawfit.header and redf.rawfit.header['FLIPSTAT'] == 'Flip':
angle = - angle

angle_L.append(angle)
Expand Down

0 comments on commit 5133fea

Please sign in to comment.