[fitsbits] Strange FITS File

Chris Lawton clawton at moguls.dhcp.mathworks.com
Wed Mar 26 11:25:08 EST 2003


Steve Allen <sla at ucolick.org> writes:

> On Tue 2003-03-25T11:12:35 -0500, Chris Lawton hath writ:
> > 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?
> 
> This seems to be compliant with the FITS standard.  The final
> 2880-byte block would correspond to a "special record" as permitted in
> the standard.
> 
> I don't know if it is common, but I would not be surprised if our
> software has had off-by-one errors of the sort that would result
> in an extra FITS block.
> 
> --
> Steve Allen          UCO/Lick Observatory       Santa Cruz, CA 95064
> sla at ucolick.org      Voice: +1 831 459 3046     http://www.ucolick.org/~sla
> PGP: 1024/E46978C5   F6 78 D1 10 62 94 8F 2E    49 89 0E FE 26 B4 14 93

Thanks for the reply Steve. I hadn't thought about the "special record". The
new fitsverify tool does give a warning about the extra bytes.

Don Wells helped me better understand the file.  He said it was created by
FCREATE but since there is no "DATE" keyword or version code for the FCREATE
program there is no way to known which version created the file.  He suspects
it was created in an early version of the code.  I don't know enough about
FCREATE to know if it supports writing special records.  Regardless, someone
could have re-opened the file and written a special record after using FCREATE.

I think my plan will be to make my reader more robust so that it can handle
this situation.

Thanks,
Chris





More information about the fitsbits mailing list