dawhite / MCTK

The MODIS Conversion Toolkit plugin for ENVI
57 stars 23 forks source link

Does Calculated brightness temperature is atmospheric corrected? #4

Closed am2222 closed 10 years ago

am2222 commented 10 years ago

Hi, I am new with this plugin and I found that it does almost all of thing that I need.But I want to know does this plugin performs an atmospheric correction before converting DN values to brightness temperature?Or I need perform it myself using FLAASH? Is there any problem if I run FLAASH after calculating BT using this plugin?

Thank you very much and sorry if this question is not related to any bug or things like that Thanks Majid

dawhite commented 10 years ago

The BT calculations only apply to bands 20-25 and 27-36. Those are in the emissive portion of the spectrum, so using FLAASH on them would be inappropriate. They might even be ignored during processing. You can try that, but I also recommend that you contact VIS technical support and double-check. As to how BT is actually calculated inside of MCTK, Liam Gumley was kind enough to send me the relevant equations many years ago. They operate off of the radiance data as it is stored in the HDF, so no additional atmospheric compensation takes place.

am2222 commented 10 years ago

Thank you for your help.I have sent him an email

Can you give me algorithm of calculating BT and Reflectance and radiance?In fact I want to perform FLAASH and then calculate these but your plugin does not accept flaash output image.

another question is that you set bandwidths and FWHM data for output images in your plugin..Can you guide me how and which numbers do I should set for modis data? If it is possible give me a clue to read your plugins code.I think most of my questions will solve by seeing the algorithms in plugin.I also noticed that you have a band13lo band 14lo and band13hi band 14hi extra bands in your plugins..what are these bands?

Sorry this topic was closed.I don't know do I post new issue or where to ask my questions :(

dawhite commented 10 years ago

Yes, this issue was closed because your question was answered. Your new questions aren't really appropriate for this forum because they aren't issues with MCTK, but with how to process remotely sensed data in general. Again, I recommend you speak with VIS technical support.

If you search online for "modis_bright_dct" you should find some relevant source code for the brightness temperature calculation. The TOA reflectance and radiance equations used by MCTK can be found in the MODIS Level 1B User Guide. No, MCTK does not accept a FLAASH output file as input because it's no longer an original MODIS dataset. To do what you want, you should process the L1B as radiance + brightness temp, then atmospherically correct only the radiance data using FLAASH (Bands 1-19,26). If you want everything in one dataset after that, which is generally not recommended, you would have to combine the FLAASH output with the brightness temp output. Based on your question about low and high bands, it's clear that you are very new to MODIS. I recommend that you search online for sensor specifications, specifically bands, wavelengths, etc. You'll see entries for 13L, 13H, 14L, and 14H. Those are gain settings.

MCTK source code is not available.

am2222 commented 10 years ago

Dear dawhite, Thank you for your help, I have found functions to convert reflectance to brightness temperature ,It is a function in matlab which name is ' RESULT = MODIS_BRIGHT(RAD, BAND, UNITS)' I think it is exactly what you said..Does this function needs to apply to each dn ?or to band?I mean do I need to loop DN's and calculate for each DN?or it will apply to all the band?I looked at the script and found that it uses a band but the result is only one number,,Is this script what you have used in your plugin? Again sorry for my questions here,,I could not find any contact form to contact you directly. Thank you very much for your helps FUNCTION MODIS_BRIGHT, RAD, BAND, UNITS

;+ ; DESCRIPTION: ; Compute brightness temperature for an EOS-AM MODIS infrared band. ; ; Spectral responses for each IR detector were obtained from MCST: ; ftp://mcstftp.gsfc.nasa.gov/incoming/MCST/PFM_L1B_LUT_4-30-99 ; ; An average spectral response for each infrared band was ; computed. The band-averaged spectral response data were used ; to compute the effective central wavenumbers and temperature ; correction coefficients included in this module. ; ; USAGE: ; RESULT = MODIS_BRIGHT(RAD, BAND, UNITS) ; ; INPUT PARAMETERS: ; RAD Planck radiance (units are determined by UNITS) ; BAND MODIS IR band number (20-25, 27-36) ; UNITS Flag defining radiance units ; 0 => milliWatts per square meter per steradian per ; inverse centimeter ; 1 => Watts per square meter per steradian per micron ; ; OUTPUT PARAMETERS: ; MODIS_BRIGHT Brightness temperature (Kelvin) ; Note that a value of -1.0 is returned if ; BAND is not in range 20-25, 27-36. ; ; MODIFICATION HISTORY: ; Liam.Gumley@ssec.wisc.edu ; http://cimss.ssec.wisc.edu/~gumley ; $Id: modis_bright.pro,v 1.3 2000/03/15 20:33:50 gumley Exp $ ; ; Copyright (C) 1999, 2000 Liam E. Gumley ; ; This program is free software; you can redistribute it and/or ; modify it under the terms of the GNU General Public License ; as published by the Free Software Foundation; either version 2 ; of the License, or (at your option) any later version. ; ; This program is distributed in the hope that it will be useful, ; but WITHOUT ANY WARRANTY; without even the implied warranty of ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ; GNU General Public License for more details. ; ; You should have received a copy of the GNU General Public License ; along with this program; if not, write to the Free Software ; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ;-

rcs_id = '$Id: modis_bright.pro,v 1.3 2000/03/15 20:33:50 gumley Exp $'

;- Check input parameters if (n_params() ne 3) then $ message, 'Usage: RESULT = MODIS_BRIGHT(RAD, BAND, UNITS)' if (n_elements(rad) eq 0) then $ message, 'Argument RAD is undefined' if (n_elements(band) eq 0) then $ message, 'Argument BAND is undefined' if (n_elements(units) eq 0) then $ message, 'Argument UNITS is undefined' if (band lt 20) or (band gt 36) or (band eq 26) then $ message, 'Argument BAND must be in the range [20-25, 27-36]

;- BAND-AVERAGED MODIS SPECTRAL RESPONSE FUNCTIONS FOR EOS-AM ;- TEMPERATURE RANGE FOR FIT WAS 180.00 K TO 320.00 K ;- BANDS ;- 20, 21, 22, 23, ;- 24, 25, 26, 27, ;- 28, 29, 30, 31, ;- 32, 33, 34, 35, ;- 36 ;- NOTE THAT BAND 26 VALUES ARE SET TO ZERO

;- Effective central wavenumber (inverse centimenters) cwn = [$ 2.641775E+03, 2.505277E+03, 2.518028E+03, 2.465428E+03, $ 2.235815E+03, 2.200346E+03, 0.0, 1.477967E+03, $ 1.362737E+03, 1.173190E+03, 1.027715E+03, 9.080884E+02, $ 8.315399E+02, 7.483394E+02, 7.308963E+02, 7.188681E+02, $ 7.045367E+02]

;- Temperature correction slope (no units) tcs = [$ 9.993411E-01, 9.998646E-01, 9.998584E-01, 9.998682E-01, $ 9.998819E-01, 9.998845E-01, 0.0, 9.994877E-01, $ 9.994918E-01, 9.995495E-01, 9.997398E-01, 9.995608E-01, $ 9.997256E-01, 9.999160E-01, 9.999167E-01, 9.999191E-01, $ 9.999281E-01]

;- Temperature correction intercept (Kelvin) tci = [$ 4.770532E-01, 9.262664E-02, 9.757996E-02, 8.929242E-02, $ 7.310901E-02, 7.060415E-02, 0.0, 2.204921E-01, $ 2.046087E-01, 1.599191E-01, 8.253401E-02, 1.302699E-01, $ 7.181833E-02, 1.972608E-02, 1.913568E-02, 1.817817E-02, $ 1.583042E-02]

;- Compute brightness temperature if (units eq 1) then begin

;- Radiance units are ;- Watts per square meter per steradian per micron result = (bright_m(1.0e+4 / cwn[band - 20], rad) - $ tci[band - 20]) / tcs[band - 20]

endif else begin

;- Radiance units are ;- milliWatts per square meter per steradian per wavenumber result = (brite_m(cwn[band - 20], rad) - $ tci[band - 20]) / tcs[band - 20]

endelse

;- Return result to caller return, result

END

dawhite commented 10 years ago

The contact information for the author of the program, Liam Gumley, is right there in the source code. You should ask him how it works.