[fitsbits] Clarification of EXTEND, please
Stephen Walton
stephen.walton at csun.edu
Fri May 14 13:59:55 EDT 2004
On Fri, 2004-05-14 at 10:31, Thierry Forveille wrote:
> > the presence of the EXTEND keyword in the primary HDU as meaning it
> > should check for extensions, tried to fseek() beyond the end of the
> > primary HDU and data array, and died.
> >
> The second piece did wrong, twice :-) EXTEND indicates only that the file
> may contain an extension, not that it does, and then only when set to T.
> It looks like they took two unwarranted shortcuts...
Time to name names. The offending piece of software is the fitsread.m
which The Mathworks distributes with MATLAB. In addition to above
problem, Mathworks's FITS software contains another bug, this one in
fitsinfo.m: it seeks 2880 bytes past an HDU which is exactly n*2880
bytes in length before trying to read data, and thus skips the first
2880 bytes of actual data. I have a patch for the second problem which
I'd be happy to share; I haven't tried to fix the first one yet, but it
is probably a simple matter of checking for EXTEND = T rather than the
mere existence of EXTEND.
Thanks to all.
--
Stephen Walton <stephen.walton at csun.edu>
Dept. of Physics & Astronomy, Cal State Northridge
More information about the fitsbits
mailing list