FITS bitpix
pakuliak wrote on Jul 23, 2006
Hello, everybody!
How can I keep bitpix number when converting from fit-file into imh-image?
I have bitpix=16 in fit and after rfits I've got bitpix=8.
Ludmila
How can I keep bitpix number when converting from fit-file into imh-image?
I have bitpix=16 in fit and after rfits I've got bitpix=8.
Ludmila
Mike Fitzpatrick wrote on Jul 23, 2006
I'm not quite sure how that could happen considering there is no 8-bit datatype for IMH image files. Does IMHEAD show the datatype as 'short' (or 'ushort')? Is there a BSCALE/BZERO in the FITS header? What is the pixel range in the original FITS image?
-Mike
-Mike
pakuliak wrote on Jul 23, 2006
Hello, Mike!
If in FITS there are no BSCALE/BZERO IMHEAD gives datatype as 'short' .
If BSCALE/BZERO are present IMHEAD gives 'ushort'.
But in both cases bitpix is 8.
Pixel range in original image is 0-65535 (negative star field with very bright stars and several bad white pixels), in FITS it is shifted by subtracting an 32768 offset into a range of signed 16-bit integer
Ludmila
If in FITS there are no BSCALE/BZERO IMHEAD gives datatype as 'short' .
If BSCALE/BZERO are present IMHEAD gives 'ushort'.
But in both cases bitpix is 8.
Pixel range in original image is 0-65535 (negative star field with very bright stars and several bad white pixels), in FITS it is shifted by subtracting an 32768 offset into a range of signed 16-bit integer
Ludmila
Mike Fitzpatrick wrote on Jul 23, 2006
So far that sounds normal: The BITPIX keyword isn't retained however it is printed out when you run RFITS. So, if may well be BITPIX=8 in the FITS file, but afterward the .imh image is a (unsigned) short with the scaling applied. Having a BITPIX=8 and scaling in the FITS is allowed, it just means there will be 256 quantized levels in the pixel values.
Are the resiults of an IMSTAT on the converted image what you expect?
-Mike
Are the resiults of an IMSTAT on the converted image what you expect?
-Mike
pakuliak wrote on Jul 23, 2006
Hi, Mike,
RFITS gives
IMSTAT gives
that is absolutely that I expect.
But when I open the FITS file in ds9 window, it's appearance is qiute different from that of the imh-image displaying and the FITS-file header writes bitpix=16, and the imh-image one gives bitpix=8
Does it mean that the problem is in ds9?
And no any problem with image at all, and I can go on with image processing without loss of grey scale depth?
Ludmila
RFITS gives
size=3575x3576 bitpix=16 bscale=1. bzero=32768. pixtype=ushortIMSTAT gives
MIN 0. MAX 65535.that is absolutely that I expect.
But when I open the FITS file in ds9 window, it's appearance is qiute different from that of the imh-image displaying and the FITS-file header writes bitpix=16, and the imh-image one gives bitpix=8
Does it mean that the problem is in ds9?
And no any problem with image at all, and I can go on with image processing without loss of grey scale depth?
Ludmila
Mike Fitzpatrick wrote on Jul 23, 2006
Ludmilla,
I'm having a hard time picturing exactly what this image contains. Could you possibly put an example in the anonymous ftp /pub directory on ftp://iraf.noao.edu? I assume you're just using RFITS to convert the image and loading it standalone from DS9? FITS images can be used directly in IRAF, does doing that give you the expected results?
-Mike
I'm having a hard time picturing exactly what this image contains. Could you possibly put an example in the anonymous ftp /pub directory on ftp://iraf.noao.edu? I assume you're just using RFITS to convert the image and loading it standalone from DS9? FITS images can be used directly in IRAF, does doing that give you the expected results?
-Mike
pakuliak wrote on Jul 23, 2006
Sorry, Mike
and thank you,
don't waste your time any more , I know that FITS used directly in IRAF.
The point was that I just start to use IRAF and do not understand quite well what the DS9 make with images, but this is not a question to discuss here.
L.Pakuliak
and thank you,
don't waste your time any more , I know that FITS used directly in IRAF.
The point was that I just start to use IRAF and do not understand quite well what the DS9 make with images, but this is not a question to discuss here.
L.Pakuliak
Last post on Jul 23, 2006