Lab 8 - Due 7 PM on Nov 1, 2011 Geo5053 - Remote Sensing, UTSA Student name: _______________ Page 1 of 4 Calculate Temperature from ETM+ Image Objective: Learn about IDL programming. Use IDL to compute the temperature of a Landsat image, and analyze the distribution of temperature. Part I: Concepts and short questions 1. We can separate infrared remote sensing into reflective infrared (0.7 to 3.0 μm) and thermal infrared (3.0 to 100 μm). Please explain the differences between the two. 2. Explain the reflectivity spectrum and the emissivity spectrum. Give one or two application examples of each. 3. Thermal remote sensing directly measures the radiance of an object (land, ocean, atmosphere), and then calculates the object's brightness temperature using the Planck equation. From the brightness temperature, we can then derive the object's physical temperature if we know the object's emissivity. Given a measured radiance of 120 (W m-2 μm-1) at wavelength of 10 μm, calculate the object's brightness temperature. If the object's emissivity is 0.85, what is the physical temperature of the object? Show your calculations. Part II: Lab A. Preparation Create a Lab6 subfolder under c:\UserData_ENVI\yourname\. Today we will use the atmospherically corrected image from Lab4: p27r40_July8_2002DOS.img. You can open it directly from your Lab4 folder, and save results to your Lab8 folder. Optional: You can also use Radn_July8_2002.img created in Lab 6, but then you need to modify the IDL code below to remove the radiance calculation. B. Introduction Landsat ETM+ images have 9 bands: bands 1-3 cover visible wavelengths, bands 4, 5 and 7 cover near and short wave infrared wavelengths, band 8 is panchromatic, and bands 6 and 9 cover thermal infrared wavelengths. Band 6 is low gain thermal image and band 9 is high gain image. The thermal band header files are *.H2. These two thermal bands are needed to derive land surface temperatures. For land surfaces of our region, we usually use the (more sensitive) high gain image to derive temperature. In the atmospherically corrected image p27r40_July8_2002DOS.img, the band 9 high gain image is already included as band 6. Open band 6 (wavelength is 11.45 μm) in ENVI+IDL. C. Calculate the temperature using IDL 1. To calculate the temperature, we use the following equations (from Weng et al. 2004, the paper is linked as reading material. I hope you will read this paper). Those equations are used to covert Landsat DN values to Radiance, then Radiance to brightness temperature, and finally from brightness temperature to surface temperature. For this lab, we use a single emissivity value of 0.988. L = 0.0370588 x DN + 3.2 (4) TB = K2 ln(K1/L + 1) (5) St = TB 1 + ( x TB/) ln (6) 2. IDL code: ;***************************************************************** PRO temper ; calculate temperature of Landsat image ; Step 1: select a thermal band image from ENVI envi_select, title='Choose multispectral image', fid=fid, dims=dims, pos=pos if (fid EQ -1) THEN BEGIN PRINT, 'cancelled' RETURN ENDIF ; Step 2: Get necessary information from the image: projection, columns, rows, etc. map_info=envi_get_map_info(fid=fid) ;pos[0] is the first band, pos[1] the second band, etc image=envi_get_data(fid=fid, dims=dims, pos=pos[0]) num_cols=dims[2]-dims[1]+1 ; get the number of columns (x) num_rows=dims[4]-dims[3]+1 ; get the number of rows (y) ;num_bands=n_elements(pos) ;num_pixels=num_cols*num_rows ; Step 3: calculate the temperature (unit Kelvin) L=temporary(0.0370588*image+3.2) ;calculate radiance of high gain image ;L=temporary(0.066823*image) ;calculate radiance of low gain image TB=temporary(1282.71/(alog((666.09/L)+1))) ;calculate brightness temperature RT=temporary(TB/(1+(0.0007991666*TB)*alog(0.988))) ;calculate surface temperature given emissivity of 0.988 ; Step 4: output the default C driver: c:\UserData_ENVI fname='tmperHG.img' ;fname='temperLG.img' openw, unit, fname, /get_lun writeu, unit, RT free_lun, unit ; Step 5: output to the ENVI Available Band List window ENVI_SETUP_HEAD, fname=fname, ns=num_cols, nl=num_rows, nb=1, interleave=0, data_type=4, offset=0, map_info=map_info,/write, /open END ;******************************************************************** 2 Lab 8 - Due 7 PM on Nov 1, 2011 Geo5053 - Remote Sensing, UTSA Student name: _______________ Page 3 of 4 3. Check the code in IDL and you will find there are five steps. Open the IDL window (not ENVI), and go to IDL toolbar -> File menu -> New File, which will create a new untitled IDL program file. Select the IDL code text above, paste it into the IDL program window, select IDL toolbar -> File menu -> Save As, and save the new program using the default file name and location. Then the interface will look like Figure 1 below. Figure 1 4. If you have any prior programming experience, you know to compile any program before running it. This is the same for IDL. You can find compile and run on the IDL toolbar -> Run menu, or buttons on the toolbar. First compile temper.pro and check for errors (you need to fix errors before you can run the code). Next run temper.pro, which will open the Choose multispectral image popup window. You should be very familiar with this window now, since it is part of ENVI. 4a. This part covers step 1 in the program: Select the p27r40_July8_2002DOS.img, and then click the Spectral Subset button (see Figure 2 below). Select only the Band 6H (high gain image), which is the thermal band, then click OK and OK again. Now the program knows which image and band to process. 4b. The code should run from Step 2 to Step 5 automatically. It will take 30 seconds to a couple of minutes to finish the job. The results will appear in the ENVI Available Band List window as a file named tmperHG.img (just as it is listed in Step 4 of the program). Data is also saved in the folder c:\UserData_ENVI. [ENVI tip: if you cannot find where a datafile was saved, you can use the ENVI toolbar -> Window menu -> Available Files List to open a list of all open files... select the file and ENVI will give summary information including the exact file location]. 5. Open tmperHG.img in a new grayscale display, and link it with the RGB742 display. You should be able to see clouds have low temperatures, water pixels have higher temperatures than clouds, etc. The tmperHG.img pixel values are temperature in degrees Kelvin. Figure 2 Question 1: Compute statistics and histograms for the temperature image and paste these into your report. Remember to use the Mask created during Lab 4 to exclude invalid image areas. Compare the RGB742 and grayscale temperature displays: Describe the temperature effects you see, and analyze the temperature distribution and variability for the entire image area. Question 2: Select an unsupervised classification or supervised classification method: find out the temperature range for clouds and the temperature range for the flooded area (water). Show your results and make any analysis you can based on your data. 4