Login  Register

Re: 16 bit FITS image negative values misinterpreted

Posted by clkotnik on Apr 02, 2024; 11:25am
URL: http://astroimagej.170.s1.nabble.com/16-bit-FITS-image-negative-values-misinterpreted-tp2402p2404.html

Karen,
Sorry for the difficulty with BZ2.  I only used it because it was able to compress the image below the 5MB limit set by this forum.  I have placed the uncompressed image on the anonymous FTP server aavsonet.aavso.org.  Simply drop into the "aij" subdirectory and get it - 240323.0134.fits.  Once there please also find 240323.0134.f32.fits which is exactly the same image stored with BITPIX=-32.  You will see what I hope to be able to have AIJ display and process with the 16-bit image.  Note this image is an extreme case where negative values exist.  

Regarding the header values:
BITPIX      =                                   16
BZERO       =                     4459.62939453125
BSCALE      =                   0.1513604966744362
This image not only has low pixel values, but it also has a narrow range.  Hence the small BSCALE value.  All of these are set by astropy under the covers.

You asked about other programs processing this image.  I am in the process of verifying with various photometry programs.  The AAVSO Vphot, Lesve Photometry and Mira handle it ok.  MaximDL has a very similar issue to AIJ if a special setting is not turned on.  That setting is located under File-Settings on the Files tab.  It specifically mentions 16 bit images with negative values.  Once set it adds a constant to each pixel to make them non-negative.  AIJ is widely used within the AAVSO because of your exoplanet work with us, so I wanted to make sure these images worked in it.  Thanks for the reminder about DS9.  I will add it to my tests.

Thanks again,
Cliff
Cliff Kotnik
AAVSO KCLA