I recently shifted from uncompressed FITS files to FITS files compressed using the Rice algorithm. Although AstroImageJ (3.4.0.25) appears to read the compressed files (no warnings are generated), the resulting uncompressed pixel values in AstroImageJ don't match the original uncompressed file. This seems to happen in all my compressed FITS files. To illustrate and debug, I've been using a dark file that was originally created as a 32-bit integer FITS file, then written in Rice-compressed form using the cfitsio library. In this
example 512x512 file that I've provided, the center 8x8 pixel subarray has the following (original) values (using FITS pixel coordinates):
However, AstroImageJ seems to round and set the low-order 7 bits of each pixel value to zero during decompression, so that the entire 8x8 center pixel subarray has the value 128 when this image is read by AIJ. This really messes up photometry. Both ds9 and the cfitsio library read and write this file preserving all the bits in each pixel; it's only AIJ that does it differently.
Am I wrong for expecting AIJ to handle this file cleanly? Is there some switch or option I need to set to get AIJ to read this the same way that ds9 does?
- Mark M (AAVSO: MMU)
Celestron C14, GM2000 mount, SBIG ST-9 & QHY-268M cameras
Rhode Island, USA