Lab exercise 2, due right before the class on Feb. 4, 2005
ES6973: Remote Sensing Image Processing and Analysis, UTSA
http://www.utsa.edu/eps/programs/EnvSci/HXie.htm

 

Student name: ______________

 

 

Use IDL to calculate temperature from ETM+ image

 

Purpose

 

            This lab is the first part of two labs about deriving temperature from  ETM+ image and comparing it with MODIS temperature. In the remote sensing class last semester, the instructor found all the images and did some preprocessing for your lab exercises. However, in this image processing class, you are required to find the image, download the image, preprocess and process the image, and analyze and report your findings. This is the only way to prepare you to do an independent study without too much help.  In this lab alone, you will use IDL code I prepared for you to derive the Temperature from ETM+ image. You will find some background information from Lab4 and 6 of the ES5053 (fall 2004) where ENVI's Band Math is required to do this, and you will find it is much easier using IDL than Band Math.

 

Step 1. Preparation

 

            You will need to download the thermal band of a ETM+ image from the TexasView website at http://www.texasview.org/. Under the Data Archives, you will find the Landsat Data and TexVis. Click the Landsat Data, you will be able to find a study area you are looking for (any area in Texas, I hope each of you will pick up a different study area), the Pass/Row number for the area, and the datasets (images) availability (after you click the study area or the Pass/Row). You will need to find images after February 2000 (which will be used to compare with the Terra MODIS temperature since Terra was launched in February 2000). If there are several images available in your study area, you will need to find the best one by checking the Cloud Cover through TexVis. By inputting the Path/Row and the date of an image, you should be able to find the information through TexVis. again, you are supposed to learn by yourself for how to do this. In your report, you will need to tell the Could Cover of the image you used. Once you find the best image, by clicking the date, you will find the real data is under the nlaps directory. The figure below (Figure 1) is an example. You need to download the files of *.H2, *.I6, and *.I9 (remembering I9 is the high gain image, I6 is the low gain image). For land area, we use the high gain image (referring to Lab4 and 6 of ES5053). I hope you know what the rest of files are in the directory. If you do not know, please ask your classmates or me. We will use them for other labs. 

 

            You will need to create a directory Lab2 under c:/ES6973, if you find the ES5053 is still there, please delete it, so we can free some space for this class. As last class, you will need to create Data and MyWork subdirectories under Lab2. So You will need to download the needed data to Data, and your work to MyWork. Once you download three documents to Data (hint, using " " when you save to Data, otherwise, you will have trouble)

 

Figure 1

           

 Step 2. Open the Band 6 and Save as *.tif using ENVI

           

        When you open band6 (actually the head file of *.H2) using ENVI. You will see they are ETM+_Band_6L (low gain) and ETM+_Band_6H (high gain).  You can check the difference of these two images by linking them or performing the statistics. The DN are actually different, but there is no much difference when compared the derived brightness temperatures (from results of last semester). But you are encouraged to do a comparison this time as well.  

        Click File -> Save File As  -> Tiff/Geotif to save the opened band 6 as a *.tif file (such as 2740them.tif) to MyWork.

 

Step 3. Calculate the temperature using IDL

 

        Click IDL, and go to File -> New -> Editor, and copy the following IDL code to the space, then the interface will look like Figure 2 below, and then save the file as T1.pro to C:\ES6973\Lab2\MyWork.  To compute the Land Surface Temperture (RT) from brightness temperature (BT), we use the equation 6 of P472 (Weng et al. 2004, this paper is one of our today's reading materials), though in this code, I only use a single emissivity of 0.988. If you want to do a completed project, you should use the method from the paper.

 

pro T1


B6=READ_TIFF('C:\ES6973\MyWork\2739.tif', CHANNELS=[0,1], geotiff=GTMODELTYPEGEOKEY)
        ;read Band6 to B6, and channel 0 is the low gain, channel 1 is the high gain

B6h=temporary(B6(1,*,*))         ;assign the high gain (channel 1) of Band6 to B6h

L=temporary(0.0370588*B6h+3.2)         ;calculate radiance
TB=temporary(1282.71/(alog((666.09/L)+1)))         ;calculate brightness temperature
RT=temporary(TB/(1+(0.0007991666*TB)*alog(0.988)))
        ;supposing the same emissivity of 0.988
WRITE_TIFF,'ETMt.tif', RT, geotiff=GTMODELTYPEGEOKEY, /FLOAT
        ;write the temperature to an image called TMt.tif


end

 

Figure 2

 

        This code is for high gain of Band 6. if you want to do low gain of Band 6, you need to modify the code a little and use different parameters. You can find the parameters from Lab4 of last semester. before you run the program, you need do (1) change the input file name (such as 2749them.tif) as the same as your input file name ; (2) go to File -> Preferences -> Startup, change the Working Directory to C:\ES6973\Lab2\MyWork; (3) compile the T1.pro; (4) Run the T1. A ETMt.tif file should be produced and you can open it in ENVI now. If you do the low gain as well, you should be able to make a comparison.

 

Step 4. Analyze the distribution and variability of the Temperature for the entire image area.

 

Use histogram, statistics, density slice, and others to analyze the distribution and variability of temperature for the entire area. You can use some GIS data as you want. You can even analyze the Temperature image (ETMt.tif) in ArcGIS. Write a report about the study area, the data (including the Cloud Cover mentioned earlier), the method used, and your analyzing results.