ImageMagick and FITS

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
RetroJ
Posts: 108
Joined: 2006-10-25T08:12:50-07:00

ImageMagick and FITS

Post 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)
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post 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.
RetroJ
Posts: 108
Joined: 2006-10-25T08:12:50-07:00

Post 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.
Post Reply