[Kstars-devel] Summary of FITS file bugs in KStars
Jason Harris
kstars at 30doradus.org
Sun Jan 29 16:55:21 CET 2006
Hi Soldan,
Thanks a lot for the report. I am posting your message to the
kstars-devel at kde.org mailing list. You should also submit a report at
bugs.kde.org (which you can do directly from the help menu in kstars).
regards,
Jason
On Sunday 29 January 2006 08:52, you wrote:
> Hello,
>
> after trying to understand why my pipeline applications based on
> the CCFits library suddenly crashed I have "discovered" another bug
> inside the FITS files produced by KStars' FITSViewer (see point 2).
> Some applications accept such a bug and properly handle such FITS
> files, but if you want to use CCFits' constructor which
> takes as its parameter reference to the previously created FITS
> object, an exception is thrown...
>
>
> 1) The 16 bit FITS files produced by KStars do not contain
> two important keywords, namely BSCALE & BZERO, so only
> 15 bit image data can be properly stored. The 16 bit
> unsigned short CCD data have to be stored in twos-complement
> format with the keywords: BSCALE = 1.0 and BZERO = 32768.0.
>
> 2) The FITS may contain set of Header Data Units (HDUs). Each HDU
> consists of Header Unit (HU) and optionally data Unit (DU), i.e.
> HDU = HU + DU. Each HDU's length in FITS must be multiple of
> 2880 bytes.
>
> If the DU (this is the case of KStars) does not fill the final
> record (multiple of 2880 bytes), the reminder of the record
> shall be filled by setting all bits to zero.
>
> Example:
> SBIG ST-1603 CCD camera has 1530 x 1020 pixels and produces the
> 16 bit unsigned data. The FITS file from KStars properly stores
> the HU to 2880 bytes, but the DU is only 1530 x 1020 x 2 = 3121200
> bytes long. The total file length is only 3124080 bytes, but
> should be 3124800 bytes. I simply add 720 missing '\0' bytes to
> the end of DU, but the problem should be fixed in KStars.
>
>
> Please see:
> http://fits.gsfc.nasa.gov/fits_documentation.html
>
> Head up, take care and sorry,
> Jan
--
KStars: KDE Desktop Planetarium
http://edu.kde.org/kstars
More information about the Kstars-devel
mailing list