I only just noticed this because I am implementing a .fits file library in C# when I was using my own .fits produced through INDI /EKOS for testing.

The fits file standard specifies, that the file always contains blocks of 2880 in length, meaning the file size should be a multiple of 2880.
Now I noticed that something was off when testing my library using fits files produced by EKOS / Kstars.

The file I was using for testing, only had the Primary HDU, however, the file still had bytes after the last 2880bytes block from the images content.
So my library went ahead and thought "oh nice, here comes more data / a new HDU" but the remaining block was less than 2880bytes in length.

I then uploaded some fits files from EKOS / kstars to the online validator found here: fits.gsfc.nasa.gov/fits_verify.html
And sure enough it throws an error:

*** Error:   File has extra byte(s) after last HDU at byte 32803200.

Now I can simply do a check in my own fits reader to check if the remaining file bytes are not of at least the length of a new 2880 byte block but this seems kind of strange.

Read More...