Commit e4e1f207 authored by Vigeesh Gangadharan's avatar Vigeesh Gangadharan
Browse files

add porper check for translate

parent ace63b47
Pipeline #2945 passed with stage
in 4 minutes and 7 seconds
......@@ -1755,12 +1755,9 @@ class VFISVpackage:
# get the time of the first file
_, self.header = fits.getdata(self.filenames[0], header=True, memap=True)
# check if proper fits
if self.header["OBS_TRGT"] == 'USAF':
print("Looks like a target scan")
print_fail(f"Aborting.")
sys.exit()
# check if proper fits
self.check_fits(self.header)
self.date_beg = datetime.fromisoformat(self.header["DATE-BEG"])
self.date_obs = datetime.fromisoformat(self.header["DATE-OBS"])
......@@ -2074,11 +2071,21 @@ class VFISVpackage:
fits header
"""
if header["NAXIS"] <= 3:
# if header["NAXIS"] <= 3:
# print("Fits format problem: gris_translate_header not applied.")
# print_fail("Aborting.")
# sys.exit()
if not ([s for s in header['HISTORY'] if 'gris_translate_header' in s]):
print("Fits format problem: gris_translate_header not applied.")
print_fail("Aborting.")
sys.exit()
if header["OBS_TRGT"] == 'USAF':
print("Looks like a target scan")
print_fail(f"Aborting.")
sys.exit()
return None
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment