[fitsbits] Re: FITS Format

Peter Teuben teuben at wam.umd.edu
Fri Jun 15 22:52:10 EDT 2001


Acrobat wrote:
> 
> Hello I have a problem to write a program in Visual Basic to read a fits
> file.
> For the header section there are no problem but for the data there a problem
> In the file header  I find a card with the keyword : BITSWAP that it is not
> documented in any my documentation that I found in the web.
> Any idea on this keyword ?
> 
> Do you know a librarry that I can use with my Visual Basic program ?
> 
> Thank you
> 
> Luigi Azario

I've seen this type too, I think it was related to Palomar, or somewhere
on the west-coast  of the US. It was written by a lazy/scared programmer
who was afraid their slow computer would be running into trouble
and not have time to get the data... So they added BITSWAP ...
or was it called BYTESWAP? At any rate, all I had to do was look at
BITPIX/8 (which i think was 2) and swap pairs of bytes. If it's 4,
so the usual 4 byte swap. If it is truely BITSWAP, that would be a bit
odd, as the BITorder in a BYTE hasn't changed for a while from the
current endianism (you could argue on the bit-level in a byte
they are all big-endian)

Anyways, this is from memory, i believe the solution should be pretty
obvious.

- peter



More information about the fitsbits mailing list