How to create an image from FITS-files

If you want to create an image from telescope data, you might see data in the FITS format, which you cannot open without the right software. FITS-files end with .fits, .FITS, .fit, .FIT, .fts, .FTS …

First you have to download it from a service. For Infrared Images you should use IRSA (like 2MASS, Spitzer, WISE, Planck, Herschel).
For a wide selection of survey data you can use SkyView (not Hubble, Spitzer, Herschel) and very useful is that the FITS-file does rotate depending on the coordinate system you use!
If I want to use Hubble data, you can use the MAST portal, which has a lot of data, but you have to enter coordinates in RA and DEC. In MAST you can enter the search radius after the coordinates in degrees, for example select “All Virtual Observatory Collections” enter Alf Cen r=0.5, and it will search 0.5° around Alpha Centauri for images, catalogs and spectra.
For ESO data you can use the ESO archive, but you need an account, which is free for everyone. Only the DSS data is avaiable without a login, but you can also use SkyView for searching DSS images.
There are all kind of other image archives, like IPHAS or Akari and sometimes you have to read a bit about the filters, before you can begin.


footer-si After you have downloaded the files, you need a software. I use SAO Image DS9, which can be used for a lot of cool things. SAO does stand for Smithsonian Astrophysical Observatory.

DS9 is a standalone application, so you can start it after the installation. It should look like this:

SAO_0

As you can see there is a top menu, below a info frame and two small image frames, a menu in the middle and finally on the bottom a large frame with a brightness scale.

You can download the FITS-files I used by entering 25.29 0.29 ga in the coordinate field of GLIMPSE, with 0.25 cutout-size.

You can open a FITS-file via File->Open…

SAO_1

I did open a Spitzer 3.6 μm (I1) file from IRSA and you should see that the scale on the bottom did change. Also the info frame does show something:

  • File – File name
  • Value – A value for the brightness
  • fk5 – The coordinates in a chosen coordinate system (WCS)
  • Image – Pixel Coordinates of the image

The both coordinates change if you move your curser. The small frame with coordinate axes show the entire image. The cyan box shows the area shown in the large main frame below, the green coordinate axes (x, y) is the image coordinate system and the yellow is the chosen coordinate system (North, East).

But you cannot see much in this image. Now you have to scale the image. For this you can either use the top menu, which is more detailed, or you can use the bottom menu, which is faster. The default is “linear” and “min max”, change this to “square root” and “ZScale”:

SAO_2

With the zoom-menu you can change the zoom, or you can use your mouse-wheel (does not work always). If you want to change the center of view, you can either click and drag the cyan box or you change Edit->pan, then the main frame will center to the position you click on.

Now we want to open other images. Before you open a new image, you should choose Frame->tile frame. This way you can look at both images at the same time. After choosing Frame->New Frame a new frame will appear and you can open a new image with File->Open…

SAO_3

You might find useful to select Frame->Lock->Frame->WCS, because if you pan or zoom one image, the other image will pan the same way.

Now we want to create a RGB image (image with colours). If you have photoshop you can crop the images and export them as PNG, but I want to show you how to do this without photoshop:

First reopen SAO ds9 and choose Frame->New Frame RGB. A small window will open:

SAO_4

For a RGB (Red-Green-Blue) image you should always choose the shortest wavelenght for blue and the longest wavelength for red. So first choose the 8.0 μm FITS and open it.

SAO_5

You should scale the image right for every colour: use again “square root” and “ZScale” and then scale it manually by coosing Scale->Scale Parameters, until every detail is visible, bright structures are bright and faint structures are black. You can do this by dragging the red and green line. Then you choose “green” for “current”, unselect “view” for “red” and do the same after opening the 4.5 μm image. At last you choose “blue” for “current”, unselect “view” for “green” and do the above after opening the 3.6 μm image.

If you are done, you can select “view” for all RGB and it should look like this:

SAO_6

Now you can choose File->Export->PNG and there is your coloured image!

GLIMPSE2

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s