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 88c6806 commit cc57ada
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions iop4lib/instruments/dipol.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,6 @@ def get_header_hintobject(self, rawfit):

from iop4lib.db import AstroSource

if rawfit.epoch.night == datetime.date(2024, 10, 20) and "J0211" in rawfit.filename:
return AstroSource.objects.get(name="J0211+1051")


catalog = AstroSource.objects.exclude(is_calibrator=True).all()

#pattern = re.compile(r"^([a-zA-Z0-9]{4,}|[a-zA-Z0-9]{1,3}(_[a-zA-Z0-9]+)?)(?=_|$)")
Expand Down
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 cc57ada

Please sign in to comment.