Welcome to iraf.net Tuesday, April 30 2024 @ 04:33 PM GMT


 Forum Index > Help Desk > General IRAF New Topic Post Reply
 FITS bitpix
   
pakuliak
 07/23/2006 10:56AM (Read 9526 times)  
+----
Newbie

Status: offline


Registered: 06/01/2006
Posts: 14
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

 
Profile Email
 Quote
fitz
 07/23/2006 10:56AM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
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

 
Profile Email
 Quote
pakuliak
 07/23/2006 10:56AM  
+----
Newbie

Status: offline


Registered: 06/01/2006
Posts: 14
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 integerLudmila

 
Profile Email
 Quote
fitz
 07/23/2006 10:56AM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
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

 
Profile Email
 Quote
pakuliak
 07/23/2006 10:56AM  
+----
Newbie

Status: offline


Registered: 06/01/2006
Posts: 14
Hi, Mike,RFITS gives
[code:1:7892975ef4]size=3575x3576 bitpix=16 bscale=1. bzero=32768. pixtype=ushort[/code:1:7892975ef4]IMSTAT gives
[code:1:7892975ef4]MIN 0. MAX 65535.[/code:1:7892975ef4]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=8Does 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

 
Profile Email
 Quote
fitz
 07/23/2006 10:56AM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
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

 
Profile Email
 Quote
pakuliak
 07/23/2006 10:56AM  
+----
Newbie

Status: offline


Registered: 06/01/2006
Posts: 14
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

 
Profile Email
 Quote
   
Content generated in: 0.22 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login