Page 1 of 1

convert tif format to fits format

Posted: 2011-01-26T03:58:58-07:00
by yba
We use Epson V750 scanner to scan our astronomical photographic glass plates (black and white negative plates) to get tif format image files.
The scanner is linked to a computer running Windows XP. For our work we want to use fits format, so we use 'convert' in imagemagic to do it.
For example, we scan a plate to get a 'test.tif' , and use
'convert' to get 'test.fits'.
The 'test.tif' has :
Size: 1600X1586
Bytes: 5075200
Class: uint16

The image header of 'test.fits' has:
SIMPLE = T
BITPIX = 16
NAXIS = 2
NAXIS1 = 1586
NAXIS2 = 1600
BSCALE = 1.000000E+000
BZERO = 6.553500E+004
DATAMAX = 6.553500E+004
DATAMIN = 0.000000E+000
HISTORY ImageMagick 6.6.2-7 2010-06-18 Q16 http://www.imagemagick.org

If we let the pixel value of 'test.tif' be A(i,j),
and the pixel value of 'test.fits' be I(i,j),
According to normal understanding of above image header, it should be:
I(i,j) = (A(i,j) X 1.0 + 65535),
but this is not the case. Using Matlab we can check the pixel value A(i,j),
and running IRAF we can check the pixel vale I(i,j).
The I(i,j) is not equal to (A(i,j) X 1.0 + 65535),
they are very much different.
In addition, the 'DATAMAX" in 'test.fits' is much larger than 65535.

Could experts please tell us: does the 'BZERO' really mean a zeropoint in conversion,
and the 'ZSCALE' really a factor to multiply?
We want to know the real relation between I(i,j) and A(i,j).
Thanks for consideration.