FlaredetectorWidget: handle K2 no QUARTER in header

This commit is contained in:
2024-11-28 10:03:39 +01:00
parent 53fcdc541e
commit 208e619ce7
@@ -66,7 +66,10 @@ class FlaredetectorWidget(QtWidgets.QWidget):
print(f"Plotting: {fitsFilePath}") print(f"Plotting: {fitsFilePath}")
self.currentLC = lk.read(fitsFilePath) self.currentLC = lk.read(fitsFilePath)
if(isinstance(self.currentLC, lk.lightcurve.KeplerLightCurve)): if(isinstance(self.currentLC, lk.lightcurve.KeplerLightCurve)):
try:
print(f"Kepler Quarter: {self.currentLC.hdu[0].header['QUARTER']}") print(f"Kepler Quarter: {self.currentLC.hdu[0].header['QUARTER']}")
except:
print("K2 Data, no QUARTER in header")
self.currentLCCollection = None self.currentLCCollection = None
self.currentMainName = mainName self.currentMainName = mainName
self.updateFit() self.updateFit()