Hi again,
Hope I'm not being a pain but I picked this up from the Maxim Group. It is a reply to a question regarding File saving from Douglas George of Maxim.
"The FITS standard does not include support for unsigned numbers. As defined by
the standard, 16-bit integers run from -32768 to + 32767. Not very convenient
for saving 16-bit CCD images that run from 0 to 65535! At first glance you
would need to save in 32-bit mode, which would double the disk space required.
The value of a pixel is defined to be (NOST FITS Standard Equation 5.3) as:
physical_value = BZERO + BSCALE * array_value
As you can see, choosing a value of 32768 results in a physical pixel data range
from 0 to 65535. So we set BZERO to 32768, and *subtract* that number from
every pixel as we write it to the file. When a program that correctly
implements the FITS standard reads the file, you get the correct numbers.
This is what you need to save a 16-bit CCD image in a 16-bit FITS file.
Some programs violate the FITS standard and save unsigned data. There are
compatibility features for this, see:
http://www.cyanogen.com/help/maximdl/SettingsFiles.htm"
Regards,
Paul
London, UK