[Kstars-devel] Summary of FITS file bugs in KStars

Jan Soldan Jan.Soldan at obs.unige.ch
Mon Jan 30 11:49:28 CET 2006


Hi Jasem,
I have checked it once again to be sure the problem is inside the 
FitsViewer and not
in my INDI driver.

If you open the proper FITS file and then simply save it again with 
KStars, the file is shorter,
there is no zeros trail to the next boundary of 2880 bytes.

This is nothing horrible and some applications like ds9, fv, etc. simply 
ignore this problem.
If I open this shorter FITS with ds9 for example and then save it once 
again, the ds9 adds
these missing zeros to the end of the file.

The solution is very easy, after saving the image data I do the following:

// write ccd data here
...

 long nbytes = sizeof(unsigned short) * ccd_width * ccd_height;
// FITS_RECORD_SIZE == 2880 and is defined in fitsrw.h

 // write FITS tail:
 if((nbytes = nbytes % FITS_RECORD_SIZE)){
        while(nbytes++ < FITS_RECORD_SIZE) putc(0, fp->fp);
 }

// close fits file
...
 
Cheers,
Jan


Jasem Mutlaq wrote:

>Hi Jan,
>
>I'm already aware of problem #1, but #2 is new to me. I'll add it on my TODO 
>list for KDE4.
>
>Btw, does everyone get very large icons for Stars/Constellation/..etc on/off 
>pixmaps?
>They are taking a lot of space here. I also noticed that skymap navigation 
>is extremely slow (with antialising).
>
>Cheers,
>Jasem 
>
>_______________________________________________
>Kstars-devel mailing list
>Kstars-devel at kde.org
>https://mail.kde.org/mailman/listinfo/kstars-devel
>  
>



More information about the Kstars-devel mailing list