# Invalid cutout FITS files?

**URL:** <https://www.rubin.community/t/invalid-cutout-fits-files/11626>\
**Category:** Lasair\
**Created:** [February 25, 2026, 8:43am UTC](https://www.rubin.community/t/invalid-cutout-fits-files/11626 "2026-02-25T08:43:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![adammcmaster](https://avatars.discourse-cdn.com/v4/letter/a/5daacb/32.png) [@adammcmaster](https://www.rubin.community/u/adammcmaster)\
**Post date:** [February 25, 2026, 8:43am UTC](https://www.rubin.community/t/invalid-cutout-fits-files/11626/1 "2026-02-25T08:43:36Z")

</div>

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](https://github.com/adammcmaster/zooniverse-lsst/blob/29b7914667513336c6233084cb885cada8460dcd/src/zooniverse_lsst/generator.py#L56)

Here’s an example:

```auto
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:

```auto
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?

---

<div class="post-metadata">

**Author:** ![roy](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/roy/32/1254_2.png) [@roy](https://www.rubin.community/u/roy)\
**Post date:** [February 25, 2026, 9:03am UTC](https://www.rubin.community/t/invalid-cutout-fits-files/11626/2 "2026-02-25T09:03:35Z")

</div>

Adam

- Please provide the `diaObjectId` for this cutout, i.e. the URL link to the object.
- The other id is the `diaSourceId`. I’d like to look at the wider picture  
Thanks  
Roy

---

<div class="post-metadata">

**Author:** ![roy](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/roy/32/1254_2.png) [@roy](https://www.rubin.community/u/roy)\
**Post date:** [February 26, 2026, 1:36pm UTC](https://www.rubin.community/t/invalid-cutout-fits-files/11626/3 "2026-02-26T13:36:59Z")

</div>

Adam – OK I found and fixed the problem, the cutouts should be good now. As an extra bonus, there is a [new notebook](https://github.com/lsst-uk/lasair-examples/blob/main/lsst_notebooks/api/cutouts.ipynb) that fetches and a displays all the cutouts for a given object. – Roy
