I get errors when loading some of the cutouts with Astropy. It doesn’t seem to happen with every file.
The error comes from this line of code: zooniverse-lsst/src/zooniverse_lsst/generator.py at 29b7914667513336c6233084cb885cada8460dcd · adammcmaster/zooniverse-lsst · GitHub
Here’s an example:
DEBUG:src.zooniverse_lsst.generator:Loading FITS data for key Science from https://lasair-lsst.lsst.ac.uk/fits/170054941865934913_cutoutScience
...
OSError: No SIMPLE card found, this file does not appear to be a valid FITS file. If this is really a FITS file, try with ignore_missing_simple=True
Adding ignore_missing_simple=True produces this result:
DEBUG:src.zooniverse_lsst.generator:Loading FITS data for key Science from https://lasair-lsst.lsst.ac.uk/fits/170054941865934913_cutoutScience
WARNING: non-ASCII characters are present in the FITS file header and have been replaced by "?" characters [astropy.io.fits.util]
WARNING:astropy:non-ASCII characters are present in the FITS file header and have been replaced by "?" characters
WARNING: VerifyWarning: Error validating header for HDU #0 (note: Astropy uses zero-based indexing).
Header size is not multiple of 2880: 1095949
There may be extra bytes after the last HDU or the file is corrupted. [astropy.io.fits.hdu.hdulist]
WARNING:astropy:VerifyWarning: Error validating header for HDU #0 (note: Astropy uses zero-based indexing).
Header size is not multiple of 2880: 1095949
There may be extra bytes after the last HDU or the file is corrupted.
...
OSError: Empty or corrupt FITS file
Am I doing something wrong or is something up with the FITS files?