Back Home Up Next

Subchapters:

Plots

Images


You can load an image from the Ueb, for example fits images of a planetary nebula. The fits readers are not normally distributed by IDL, but there is a lot of libraries you can easily add to expend the performances of IDL. You received image.fits, now read it with IDL and view it:

        IDL> add_path,/astro
        IDL> fits_read,'scm_92_131.fits',image,header
        IDL> help,image
              IMAGE           FLOAT     = Array[317, 500]
        IDL> tv,image

I prefer using the esrg package to look at images:

        IDL> add_path,/esrg
        IDL> tvim,image,/sc

Well, it's nice, but we don't see anything excepting the central star! Let's cut at 500:

        IDL> tvim,image,/sc,range=[-60,500]

Nice, here is the nebula... You can change the table of colors with:

        IDL> xloadct

And obtain such images (if you have a 24bit monitor, you will have to redo all the commands leading to your plot to see the effect of changing the color table):

 Now suppose you want to draw a cut over the image. Lets consider the vector with y=270:

        IDL> oplot,image[*,270]*0+270 ; Horizontal line
        IDL> oplot,image[*,270]/2.+270 ; slice 

 

IDL courses C. Morisset © 2004 IA/UNAM V 2.2

Back Home Up Next