Having FITS

In Astronomy by Brian Koberlein1 Comment

Images on the web are typically in a portable format such as .gif, .jpeg or .png. They have the advantage of being relatively small (and therefore easy to download) as well as being viewable in any common web browser.  For scientific purposes, however, these file formats are awful.  One major disadvantage is that they are compressed to reduce their size, and the way in which they are compressed is “lossy.”  This means that part of the image is approximated, which loses some of the information in the image when it’s compressed.  Normally the approximation is not noticeable, so for standard digital photography these formats are just fine.  This is why your standard camera phone, for example, converts the image to a .jpeg before saving it.  Most people aren’t worried about compression or small image distortions; they just want a picture they can easily post on Facebook.

For scientific imagery, however, you want the data your camera gathers be “raw.” In other words, you don’t want the image to be compressed or manipulated in any way.  For this reason a different image format is used, known as the Flexible Image Transport System, or FITS.  The FITS format is raw and uncompressed.  It is also stored in a text (ASCII) format, so you can even go through the file by hand if you want to look at a particular feature.  The other advantage is that it can also contain metadata, or information about how and where the image was obtained. This is particularly useful when you need to combine data from multiple sources, as is often the case in astronomy.

There are two disadvantages to the format.  The first is that they tend to be much larger than your typical image file.  The images below are .png versions of an original .fits file, and they are about 50 kB in size.  The original file is over 600 kB. The second disadvantage is that the raw images typically need to be manipulated to show anything.  In the images of the whirlpool galaxy below, the first is the type of image you are likely to see on a web page.

galaxy2 The second image is what the raw file looks like before you enhance the brightness and contrast.  Neither of these are big disadvantages, and the are greatly outweighed by the benefit of having raw, unmanipulated data.

galaxyWhile the images you see online are typically heavily manipulated, many of them are free available in their original .fits format.  You just have to look for them a bit. There is also a free application known as ImageJ, which can view and manipulate FITS files, so you can have your own fun with raw astronomical data.

With a little practice, you too can be having FITS.

Comments

  1. I wish there was a way to explain why FITS is so wonderful. I mean, you can write the words and people can understand them easily enough, but it’s a far cry from handling the data itself and experiencing the difference between, say, a 16-bit color image and a FITS dataset consisting of multiple raw exposures of various band passes for some distant astronomical object. It is like the difference between a postcard and actually being there like some intrepid explorer in some distant land.
    FITS or GTFO. 😀

Leave a Reply