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

check for target scan

parent 3cb21670
Pipeline #2944 passed with stage
in 3 minutes and 11 seconds
......@@ -1755,9 +1755,12 @@ class VFISVpackage:
# get the time of the first file
_, self.header = fits.getdata(self.filenames[0], header=True, memap=True)
# check if proper fits
self.check_fits(self.header)
if self.header["OBS_TRGT"] == 'USAF':
print("Looks like a target scan")
print_fail(f"Aborting.")
sys.exit()
self.date_beg = datetime.fromisoformat(self.header["DATE-BEG"])
self.date_obs = datetime.fromisoformat(self.header["DATE-OBS"])
......@@ -1766,6 +1769,14 @@ class VFISVpackage:
_, header_end = fits.getdata(self.filenames[-1], header=True, memap=True)
self.date_end = datetime.fromisoformat(header_end["DATE-BEG"])
self.headerlist = []
if self.header['INSTRUME'] == 'GRIS-IFU':
for ifiles in range(len(self.filenames)):
_, ifileheader = fits.getdata(self.filenames[ifiles], header=True, memap=True)
self.headerlist.append(ifileheader)
def get_pixel_bounds(self):
"""Get the +/- width Angstrom bounds centered at the line"""
......
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