[fitsbits] Images getting shifted and wrapping on themselves...?

William Pence William.Pence at nasa.gov
Wed Aug 27 09:33:39 EDT 2008


A phase shift like you describe in the image could be caused if the byte 
offset in the file to the start of the image bytes is calculated 
incorrectly.  The image always starts at the beginning of a 2880-byte 
FITS block, e.g., at byte 2880, 5760, 8640, ..., etc.  and is the first 
FITS block following the header block that contains the END keyword.

Bill Pence

gberz3 wrote:
> Hi All,
> 
> I have written an application to read FITS files.  I now have an
> anomaly where some images have a "split" in them.  Basically it
> appears that the image is shifted to the right or left by so many
> pixels and "wraps" around.  This doesn't happen, however if I open it
> in GIMP using the FITS plugin, or with various other FITS Viewers.
> I'm curious as to what could be happening.  Is there some type of
> "key" in the data that would tell me about a particular offset?  I've
> checked headers between "good" files and the "split" ones and there
> seems to be no relevant differences.  In fact, most of the split
> images only have SIMPLE, BITPIX, NAXIS, NAXIS1, NAXIS2, and no other
> data.
> 
> Any input would be most appreciated.



More information about the fitsbits mailing list