Fix wrong orientation in some cases

This commit is contained in:
2024-05-02 12:36:17 +02:00
parent b79c591ad7
commit 845c6c30da

View File

@@ -67,7 +67,7 @@ def get_obs_data(infiles, data_folder="", compute_flux=False):
new_wcs.wcs.cdelt = new_cdelt new_wcs.wcs.cdelt = new_cdelt
for key, val in new_wcs.to_header().items(): for key, val in new_wcs.to_header().items():
header[key] = val header[key] = val
header['orientat'] = princ_angle(float(header['orientat'])) # header['orientat'] = princ_angle(float(header['orientat']))
# force WCS for POL60 to have same pixel size as POL0 and POL120 # force WCS for POL60 to have same pixel size as POL0 and POL120
is_pol60 = np.array([head['filtnam1'].lower() == 'pol60' for head in headers], dtype=bool) is_pol60 = np.array([head['filtnam1'].lower() == 'pol60' for head in headers], dtype=bool)