[fitsbits] Strange FITS File
Chris Lawton
clawton at moguls.dhcp.mathworks.com
Tue Mar 25 11:12:35 EST 2003
I have a FITS file with an unexpected file size. The file has a Primary HDU
with 5 Card Images and no data. It also has a Binary Table with 1024 rows, 3
fields in each row, and 2 bytes per field. So I calculate the file size to be:
Primary Data
5 Card Images 400 bytes => 2880 bytes
No Data 0 bytes
Binary Table
45 Card Image: 3600 bytes => 5760 bytes
1024 Rows, 3 Fields, int16: 6144 bytes => 8640 bytes
Expected File Size = 17280 bytes
However, the actual file size is 20160 (2880 more than expected).
Is it common for fits files to be padded like this?
FV can read this file. I've compared the card images read by my reader to the
cared images read by FV - no difference. The problem my reader has is after it
reads the Primary HDU and then Binary Table (and reads the values correctly),
it tries to read another extension because the file pointer is is not at the
end of the file. However, no extension exists, just padding. I've been
through the fits standard and can't find anything obvious that I've missed. Any
thoughts?
I'd be happy to share the file. I can't recall exactly where I got it, but it
may have been a sample image with FitsView or another file reader (the file
name is rti_gis_1024_040693.fits).
Thanks,
Chris Lawton
clawton at mathworks.com
More information about the fitsbits
mailing list