[GRASS-SVN] r43397 - grass-addons/imagery/i.landsat.toar

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Sep 3 12:21:54 EDT 2010


Author: ejtizado
Date: 2010-09-03 16:21:54 +0000 (Fri, 03 Sep 2010)
New Revision: 43397

Modified:
   grass-addons/imagery/i.landsat.toar/description.html
   grass-addons/imagery/i.landsat.toar/landsat_set.c
Log:
Updated with last ESUn value

Modified: grass-addons/imagery/i.landsat.toar/description.html
===================================================================
--- grass-addons/imagery/i.landsat.toar/description.html	2010-09-03 15:58:49 UTC (rev 43396)
+++ grass-addons/imagery/i.landsat.toar/description.html	2010-09-03 16:21:54 UTC (rev 43397)
@@ -1,19 +1,19 @@
 <H2>DESCRIPTION</H2>
 
-<EM>i.landsat.toar</EM> is to transform calibrated digital number of Landsat products to top-of-atmosphere radiance or top-of-atmosphere reflectance and temperature (band 6 of the sensors TM and ETM+). Optionally, to calculate the at-surface radiance or reflectance with atmosferic correction (DOS method).
+<EM>i.landsat.toar</EM> is used to transform the calibrated digital number of Landsat imagery products to top-of-atmosphere radiance or top-of-atmosphere reflectance and temperature (band 6 of the sensors TM and ETM+). Optionally, it can be used to calculate the at-surface radiance or reflectance with atmosferic correction (DOS method).
 
-<p>Usually, to do this the production date, the acquisition date, and the solar elevation is needed. Moreover, also is needed for Landsat-7 ETM+ the gain (high or low) of the nine bands.</p>
+<p>Usually, to do so the production date, the acquisition date, and the solar elevation is needed. Moreover, for Landsat-7 ETM+ it is also needed the gain (high or low) of the nine respective bands.</p>
 
-<p>Optionally, the data can be read from header file (.met) for all Landsat MSS, TM and ETM+. However, if the solar elevation or the product creation date are given the values of metfile are overwriten. This is necessary when this data in metfile are incorrects or imprecisses.</p>
+<p>Optionally, the data can be read from header file (.met) for all Landsat MSS, TM and ETM+. However, if the solar elevation or the product creation date are given the values of the metfile are overwriten. This is necessary when the data in the metfile is incorrect or not accurate.</p>
 
-<p><b>Attention</b>: Any null value or less than QCALmin in input raster is set to null in output raster and it is not included in the equations.</p>
+<p><b>Attention</b>: Any null value or smaller than QCALmin in the input raster is set to null in the output raster and it is not included in the equations.</p>
 
 
 <H2>Uncorrected at-sensor values (method=uncorrected, default)</H2>
 
-<p>The standard geometric and radiometric correction results in a calibrated digital number (QCAL = DN) images. To further standardize the impact of illumination geometry, the QCAL images are converted first to at-sensor radiance and then to at-sensor reflectance. The thermal band is first converted from QCAL to at-sensor radiance, and then to effective at-sensor temperature in Kelvin degrees.</p>
+<p>The standard geometric and radiometric corrections result in a calibrated digital number (QCAL = DN) images. To further standardize the impact of illumination geometry, the QCAL images are first converted first to at-sensor radiance and then to at-sensor reflectance. The thermal band is first converted from QCAL to at-sensor radiance, and then to effective at-sensor temperature in Kelvin degrees.</p>
 
-<p>Radiometric calibration convert QCAL to <b>at-sensor radiance</b>, a radiometric quantity measured in  W/(m²·sr·µm) with the equations:
+<p>Radiometric calibration converts QCAL to <b>at-sensor radiance</b>, a radiometric quantity measured in  W/(m²·sr·µm) using the equations:
   <ul>
   <li> gain = (Lmax - Lmin) / (QCALmax - QCALmin)</li>
   <li> bias = Lmin - gain · QCALmin </li>
@@ -38,7 +38,7 @@
 
 <H2>Corrected at-sensor values (method=corrected)</H2>
 
-<p>At-sensor reflectance values range from zero to one, whereas at-sensor radiance must be greater or equal to zero. However, since Lmin can be a negative number then the at-sensor values also it can be negative. To avoid these possible negative values and set the minimum possible values at-sentor to zero, this method correct the radiance to output a corrected at-sensor values with the equations (not for thermal bands):
+<p>At-sensor reflectance values range from zero to one, whereas at-sensor radiance must be greater or equal to zero. However, since Lmin can be a negative number then the at-sensor values can also be negative. To avoid these possible negative values and set the minimum possible values at-sensor to zero, this method corrects the radiance to output a corrected at-sensor values using the equations (not for thermal bands):
     <ul>
     <li> radiance = (uncorrected_radiance - Lmin) </li>
     <li> reflectance = radiance / sun_radiance </li>
@@ -77,10 +77,10 @@
 
 <H2>NOTES</H2>
 
-<p>In verbose mode (flag -v), the program write basic data of satellite and the parameters used in
+<p>In verbose mode (flag -v), the program write basic satellite data and the parameters used in the
 transformations.</p>
 
-<p>Production date is not a exact value and it is necessary to apply correct calibration constants, which were changed in the dates:
+<p>Production date is not an exact value but it is necessary to apply correct calibration constants, which were changed in the dates:
     <ul>
     <li>Landsat-1 MSS: never </li>
     <li>Landsat-2 MSS: July 16, 1975</li>
@@ -111,6 +111,7 @@
 
 <H2>REFERENCES</H2>
 <ol>
+    <li>Chander G., B.L. Markham and D.L. Helder: Remote Sensing of Environment, vol. 113, 2009.</li>
     <li>Chander G.H. and B. Markham: IEEE Transactions On Geoscience And Remote Sensing, vol. 41, no. 11, November 2003.</li>
     <li>Chavez P.S., jr. 1996. Image-based atmospheric corrections - Revisited and Improved. Photogrammetric Engineering and Remote Sensing 62 (9): 1025-1036.</li>
     <li>Huang et al: At-Satellite Reflectance: A First Order Normalization Of Landsat 7 ETM+ Images. 2002.</li>

Modified: grass-addons/imagery/i.landsat.toar/landsat_set.c
===================================================================
--- grass-addons/imagery/i.landsat.toar/landsat_set.c	2010-09-03 15:58:49 UTC (rev 43396)
+++ grass-addons/imagery/i.landsat.toar/landsat_set.c	2010-09-03 16:21:54 UTC (rev 43397)
@@ -28,7 +28,7 @@
 		lsat->band[i].code = *(code + i);
 		lsat->band[i].wavemax = *(wmax + i);
 		lsat->band[i].wavemin = *(wmin + i);
-		lsat->band[i].qcalmax = 255.;
+		lsat->band[i].qcalmax = 127.;
 		lsat->band[i].qcalmin = 0.;
 		lsat->band[i].thermal = 0;
 	}
@@ -54,7 +54,7 @@
 		lsat->band[i].wavemax = *(wmax + i);
 		lsat->band[i].wavemin = *(wmin + i);
 		lsat->band[i].qcalmax = 255.;
-		lsat->band[i].qcalmin = 0.;		/* modified in set_TM5 by date */
+		lsat->band[i].qcalmin = 0.;
 		lsat->band[i].thermal = (lsat->band[i].number == 6 ? 1 : 0);
 	}
 	return;
@@ -97,19 +97,19 @@
 
 /****************************************************************************
  * PURPOSE:     Store values of Landsat-1 MSS
- *              July 23, 1972 to January 6, 1978
+ *              July 23, 1972 to January 7, 1978
  *****************************************************************************/
 void set_MSS1(lsat_data * lsat)
 {
     int i, j;
 
-    /** Brian L. Markham and John L. Barker.
-        EOSAT Landsat Technical Notes, No. 1, 1986 */
+    /** Markham and Barker. EOSAT Landsat Technical Notes, No. 1, 1986;
+        Chander, Markham and Helder. Remote Sensing of Environment, 113 (2009)*/
     /* Spectral radiances at detector */
     double lmax[] = { 248., 200., 176., 153. };
     double lmin[] = {   0.,   0.,   0.,   0. };
     /* Solar exoatmospheric spectral irradiances */
-    double esun[] = { 1852., 1584., 1276., 904. };
+    double esun[] = { 1823., 1559., 1276., 880.1 };
 
     lsat->number = 1;
     sensor_MSS( lsat );
@@ -134,15 +134,15 @@
     int i, j;
     double julian, *lmax, *lmin;
 
-    /** Brian L. Markham and John L. Barker.
-        EOSAT Landsat Technical Notes, No. 1, 1986 */
+    /** Markham and Barker. EOSAT Landsat Technical Notes, No. 1, 1986;
+        Chander, Markham and Helder. Remote Sensing of Environment, 113 (2009)*/
     /* Spectral radiances at detector */
-    double Lmax[][4] = { { 210., 156., 140., 138. },    /* before      July 16, 1975 */
-                         { 263., 176., 152., 130. } };  /* on or after July 16, 1975 */
+    double Lmax[][4] = { { 210., 156., 140., 138. },       /* before      July 16, 1975 */
+                         { 263., 176., 152., 130.333 } };  /* on or after July 16, 1975 */
     double Lmin[][4] = { {  10.,   7.,   7.,   5. },
-                         {   8.,   6.,   6.,   4. } };
+                         {   8.,   6.,   6.,   3.667 } };
     /* Solar exoatmospheric spectral irradiances */
-    double esun[] = { 1856., 1559., 1269., 906. };
+    double esun[] = { 1829., 1539., 1268., 886.6 };
 
     julian = julian_char(lsat->creation);
     if (julian < julian_char("1975-07-16")) i = 0;
@@ -175,15 +175,15 @@
     int i, j;
     double julian, *lmax, *lmin;
 
-    /** Brian L. Markham and John L. Barker.
-        EOSAT Landsat Technical Notes, No. 1, 1986 */
+    /** Markham and Barker. EOSAT Landsat Technical Notes, No. 1, 1986;
+        Chander, Markham and Helder. Remote Sensing of Environment, 113 (2009)*/
     /* Spectral radiances at detector */
     double Lmax[][4] = { { 220., 175., 145., 147. },   /* before      June 1, 1978 */
                          { 259., 179., 149., 128. } }; /* on or after June 1, 1978 */
     double Lmin[][4] = { {   4.,   3.,   3.,   1. },
                          {   4.,   3.,   3.,   1. } };
     /* Solar exoatmospheric spectral irradiances */
-    double esun[] = { 1860., 1571., 1289., 910. };
+    double esun[] = { 1839., 1555., 1291., 887.9 };
 
     julian = julian_char(lsat->creation);
     if (julian < julian_char("1978-06-01")) i = 0;
@@ -214,8 +214,8 @@
     int i, j;
     double julian, *lmax, *lmin;
 
-    /** Brian L. Markham and John L. Barker.
-        EOSAT Landsat Technical Notes, No. 1, 1986 */
+    /** Markham and Barker. EOSAT Landsat Technical Notes, No. 1, 1986;
+        Chander, Markham and Helder. Remote Sensing of Environment, 113 (2009)*/
     /* Spectral radiances at detector */
     double Lmax[][4] = { { 250., 180., 150., 133. },     /* before      August 26, 1982 */
                          { 230., 180., 130., 133. },     /* between                     */
@@ -224,7 +224,7 @@
                          {   2.,   4.,   4.,   3. },
                          {   4.,   4.,   5.,   4. } };
     /* Solar exoatmospheric spectral irradiances */
-    double esun[] = { 1851., 1593., 1260., 878. };
+    double esun[] = { 1827., 1569., 1260., 866.4 };
 
     julian = julian_char(lsat->creation);
     if (julian < julian_char("1982-08-26")) i = 0;
@@ -257,14 +257,13 @@
     /* Spectral radiances at detector */
     double Lmax[][7] = { { 158.42, 308.17, 234.63, 224.32, 32.42, 15.64,  17.00 },   /* before August 1983      */
                          { 142.86, 291.25, 225.00, 214.29, 30.00, 12.40,  15.93 },   /* before January 15, 1984 */
-                         { 152.10, 296.80, 204.30, 206.20, 27.19, 15.60,  14.38 } }; /* after  Jaunary 15, 1984 */
+                         { 152.10, 296.81, 204.30, 206.20, 27.19, 15.3032,  14.38 } }; /* after  Jaunary 15, 1984 */
     double Lmin[][7] = { {  -1.52,  -2.84,  -1.17,  -1.51, -0.37,  2.00,  -0.15 },
                          {   0.00,   0.00,   0.00,   0.00,  0.00,  4.84,   0.00 },
-                         {  -1.50,  -2.80,  -1.20,  -1.50, -0.37,  1.238, -0.15 } };
-    /** Gyanesh Chander and Brian Markham.
-        IEEE Transactions On Geoscience And Remote Sensing, Vol. 41, No. 11, November 2003 */
+                         {  -1.50,  -2.80,  -1.20,  -1.50, -0.37,  1.2378, -0.15 } };
+    /** Chander, Markham and Helder. Remote Sensing of Environment, 113 (2009) */
     /* Solar exoatmospheric spectral irradiances */
-    double esun[] = { 1957., 1825., 1557., 1033., 214.9, 0., 80.72 };
+    double esun[] = { 1983., 1795., 1539., 1028., 219.8, 0., 83.49 };
     /* Thermal band calibration constants: K1 = 671.62   K2 = 1284.30 */
 
     julian = julian_char(lsat->creation);
@@ -312,7 +311,7 @@
                          {   3.,   3.,   4.,   3. },
                          {   3.,   3.,   5.,   3. } };
     /* Solar exoatmospheric spectral irradiances */
-    double esun[] = { 1849., 1595., 1253., 870. };
+    double esun[] = { 1824., 1570., 1249., 853.4 };
 
     julian = julian_char(lsat->creation);
     if (julian < julian_char("1984-04-06")) i = 0;
@@ -338,21 +337,20 @@
 void set_TM5(lsat_data * lsat)
 {
     int i, j;
-    double julian, *lmax, *lmin, jbuf;
+    double julian, *lmax, *lmin;
 
     /** Gyanesh Chander and Brian Markham.
         IEEE Transactions On Geoscience And Remote Sensing, Vol. 41, No. 11, November 2003 */
     /* Spectral radiances at detector */
     double Lmax[][7] = { { 152.10, 296.81, 204.30, 206.20, 27.19, 15.303,  14.38 },    /* before May 4, 2003 */
                          { 193.00, 365.00, 264.00, 221.00, 30.20, 15.303,  16.50 },    /* after May 4, 2003 */
-	/** Gyanesh Chander, Brian L. Markham, and Julia A. Barsi
-						 IEEE Geoscience And Remote Sensing Letters, Vol. 4, No. 3, July 2007 */
                          { 169.00, 333.00, 264.00, 221.00, 30.20, 15.303,  16.50 } };  /* after April 2, 2007 */
     double Lmin[][7] = { {  -1.52,  -2.84,  -1.17,  -1.51, -0.37,  1.2378, -0.15 },
                          {  -1.52,  -2.84,  -1.17,  -1.51, -0.37,  1.2378, -0.15 },
                          {  -1.52,  -2.84,  -1.17,  -1.51, -0.37,  1.2378, -0.15 } };
+	/** Chander, Markham and Helder. Remote Sensing of Environment, 113 (2009) */
     /* Solar exoatmospheric spectral irradiances */
-    double esun[] = { 1957., 1826., 1554., 1036., 215.0, 0., 80.67 };
+    double esun[] = { 1983., 1796., 1536., 1031., 220.0, 0., 83.44 };
     /* Thermal band calibration constants: K1 = 607.76   K2 = 1260.56 */
 
     julian = julian_char(lsat->creation);
@@ -362,34 +360,30 @@
     lmax = Lmax[i];
     lmin = Lmin[i];
     if ( i == 2 ) { /* in Chander, Markham and Barsi 2007 */
-        jbuf = julian_char(lsat->date); /* Yes, here acquisition date */
-        if (jbuf >= julian_char("1992-01-01")) {
+        julian = julian_char(lsat->date); /* Yes, here acquisition date */
+        if (julian >= julian_char("1992-01-01")) {
             lmax[0] = 193.0;
             lmax[1] = 365.0;
         }
     }
 
+	int flag = julian > julian_char("2004-04-04") ? 0 : 1;
+
     lsat->number = 5;
     sensor_TM( lsat );
-	jbuf = julian_char("2004-04-04");
-	if (julian >= jbuf) {
-		G_warning("Using QCalMin=1.0 as NLAPS products processed after 4/4/2004");
-	}
 
     lsat->dist_es = earth_sun(lsat->date);
 
-    for (i = 0; i < lsat->bands; i++)
-	{
+    for (i = 0; i < lsat->bands; i++) {
         j = lsat->band[i].number - 1;
-		if (julian >= jbuf)
-			lsat->band[i].qcalmin = 1.;
 	    lsat->band[i].esun = *(esun + j);
 	    lsat->band[i].lmax = *(lmax + j);
 	    lsat->band[i].lmin = *(lmin + j);
-        if (lsat->band[i].thermal )  {
+        if (lsat->band[i].thermal ) {
             lsat->band[i].K1 = 607.76;
             lsat->band[i].K2 = 1260.56;
         }
+		if (flag == 0) lsat->band[i].qcalmin = 1.;
     }
     return;
 }
@@ -408,17 +402,18 @@
         Landsat 7. Science Data Users Handbook. Last update: February 17, 2007 */
     /* Spectral radiances at detector */
     /* - LOW GAIN - */
-    double LmaxL[][8] = { { 297.5, 303.4, 235.5, 235.0, 47.70, 17.04, 16.600, 244.0 },      /* before      July 1, 2000 */
-                          { 293.7, 300.9, 234.4, 241.1, 47.57, 17.04, 16.540, 243.1 } };    /* on or after July 1, 2000 */
+    double LmaxL[][8] = { { 297.5, 303.4, 235.5, 235.0, 47.70, 17.04, 16.60, 244.0 },      /* before      July 1, 2000 */
+                          { 293.7, 300.9, 234.4, 241.1, 47.57, 17.04, 16.54, 243.1 } };    /* on or after July 1, 2000 */
     double LminL[][8] = { {  -6.2,  -6.0,  -4.5,  -4.5,  -1.0,  0.0,  -0.35,   -5.0 },
                           {  -6.2,  -6.4,  -5.0,  -5.1,  -1.0,  0.0,  -0.35,   -4.7 } };
     /* - HIGH GAIN - */
     double LmaxH[][8] = { { 194.3, 202.4, 158.6, 157.5, 31.76, 12.65, 10.932, 158.4 },
-                          { 191.6, 196.5, 152.9, 157.4, 31.06, 12.65, 10.800, 158.3 } };
+                          { 191.6, 196.5, 152.9, 157.4, 31.06, 12.65, 10.80, 158.3 } };
     double LminH[][8] = { {  -6.2,  -6.0,  -4.5,  -4.5, -1.0,   3.2,  -0.35,   -5.0 },
                           {  -6.2,  -6.4,  -5.0,  -5.1, -1.0,   3.2,  -0.35,   -4.7 } };
+	/** Chander, Markham and Helder. Remote Sensing of Environment, 113 (2009) */
     /* Solar exoatmospheric spectral irradiances */
-    double esun[] = { 1969., 1840., 1551., 1044., 225.7, 0., 82.07, 1368. };
+    double esun[] = { 1997., 1812., 1533., 1039., 230.8, 0., 84.90, 1362. };
     /*  Thermal band calibration constants: K1 = 666.09   K2 = 1282.71 */
 
 	julian = julian_char(lsat->creation);



More information about the grass-commit mailing list