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 b9913a5 commit a3b9847
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions iop4lib/instruments/dipol.py
Original file line number Diff line number Diff line change
Expand Up @@ -997,9 +997,9 @@ def estimate_common_apertures(cls, reducedfits, reductionmethod=None, fit_boxsiz
aperpix, r_in, r_out, fit_res_dict = super().estimate_common_apertures(reducedfits, reductionmethod=reductionmethod, fit_boxsize=fit_boxsize, search_boxsize=search_boxsize, fwhm_min=5.0, fwhm_max=60)

sigma = fit_res_dict['sigma']
mean_fwhm = fit_res_dict["mean_fwhm"]
fwhm = fit_res_dict["mean_fwhm"]

return 3.0*sigma, 5.0*sigma, 9.0*sigma, {'mean_fwhm':mean_fwhm, 'sigma':sigma}
return 1.1*fwhm, 6*fwhm, 10*fwhm, fit_res_dict

@classmethod
def get_instrumental_polarization(cls, reducedfit) -> dict:
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 a3b9847

Please sign in to comment.