Page 1 of 1

ImageMagick and FITS

Posted: 2006-11-01T09:44:14-07:00
by RetroJ
Can anybody show me how to do anything at all with FITS files? Convert and Display treat my files as being completely black.

Here is one of the files I am working with:

http://jjfoerch.com/bitbucket/pluto_1.fts

Here is what it should look like like... I made this image by converting with gcx.

http://jjfoerch.com/bitbucket/pluto_1.png

I am interested in knowing any and all techniques other ImageMagick users are using to work with astronomical images.

Thank you!

(ImageMagick 6.3.0 on Debian)

Posted: 2006-11-01T10:20:15-07:00
by magick
Your FITS image incorrectly sets the DATAMAX to 65535 so ImageMagick does not search for the true min and max value. We fixed this problem in ImageMagick 6.3.0-2 Beta (available by tommorrow) such that the DATAMAX statement is ignored unless accompied with a DATAMIN statement.

Posted: 2006-11-01T13:30:28-07:00
by RetroJ
Actually this file is 16 bit unsigned fits file, so that DATAMAX header is correct. I found the following link that explains how unsigned data types are supported by FITS.

http://heasarc.gsfc.nasa.gov/docs/softw ... ode22.html

So ImageMagick should look at the BSCALE and BZERO headers to determine the signedness of the data.

Here is a link to the DATAMAX entry in the FITS Standard.

http://archive.stsci.edu/fits/fits_stan ... 0.html#876

It is defined as a float giving the maximum valid physical value represented by the array. So 65535 is correct for my file.