query should not take F1ND filter + masking tape on cdelt
This commit is contained in:
@@ -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]:
|
||||
|
||||
@@ -86,6 +86,13 @@ def get_product_list(target=None, proposal_id=None):
|
||||
results = divide_proposal(results)
|
||||
obs = results.copy()
|
||||
|
||||
### Remove single observations for which a FIND filter is used
|
||||
to_remove=[]
|
||||
for i in range(len(obs)):
|
||||
if "F1ND" in obs[i]['Filters']:
|
||||
to_remove.append(i)
|
||||
obs.remove_rows(to_remove)
|
||||
### Remove observations for which a polarization filter is missing
|
||||
polfilt = {"POL0":0,"POL60":1,"POL120":2}
|
||||
for pid in np.unique(obs['Proposal ID']):
|
||||
used_pol = np.zeros(3)
|
||||
|
||||
Reference in New Issue
Block a user