I have a large number of fits files that I'm unable to open becuase of a missing SIMPLE keyword. When I try to open them using astropy
's fits.open()
it gives the following error:
OSError: No SIMPLE card found, this file does not appear to be a valid FITS file
I tried adding the ignore_missing_simple=True
option to fits.open()
, but this still gives an error:
OSError: Empty or corrupt FITS file
I'm not sure what to do here. My first thought was to edit the fits header to add a SIMPLE
keyword, but if I can't open the file I don't know how to deal with this. I'm wondering if theres more going on than just the missing SIMPLE
keyword given the second error.
If it matters, I've downloaded the fits files, I did not generate them myself.