query should not take F1ND filter + masking tape on cdelt

This commit is contained in:
Thibault Barnouin
2023-09-18 16:57:40 +02:00
parent 85cacfdb51
commit 0cdd3723ef
2 changed files with 9 additions and 2 deletions

View File

@@ -74,9 +74,9 @@ def get_obs_data(infiles, data_folder="", compute_flux=False):
# 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)
cdelt = np.array([WCS(head).wcs.cdelt for head in headers])
cdelt = np.round(np.array([WCS(head).wcs.cdelt for head in headers]),14)
if np.unique(cdelt[np.logical_not(is_pol60)],axis=0).size!=2:
print(np.unique(cdelt[np.logical_not(is_pol60)],axis=0).size)
print(np.unique(cdelt[np.logical_not(is_pol60)],axis=0))
raise ValueError("Not all images have same pixel size")
else:
for i in np.arange(len(headers))[is_pol60]: