[GRASS-SVN] r35849 - grass/trunk/imagery/i.atcorr

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Feb 11 01:35:28 EST 2009


Author: neteler
Date: 2009-02-11 01:35:28 -0500 (Wed, 11 Feb 2009)
New Revision: 35849

Modified:
   grass/trunk/imagery/i.atcorr/GeomCond.cpp
   grass/trunk/imagery/i.atcorr/GeomCond.h
   grass/trunk/imagery/i.atcorr/Iwave.cpp
   grass/trunk/imagery/i.atcorr/Iwave.h
   grass/trunk/imagery/i.atcorr/i.atcorr.html
Log:
IRC 1C LISS satellite added

Modified: grass/trunk/imagery/i.atcorr/GeomCond.cpp
===================================================================
--- grass/trunk/imagery/i.atcorr/GeomCond.cpp	2009-02-10 20:29:23 UTC (rev 35848)
+++ grass/trunk/imagery/i.atcorr/GeomCond.cpp	2009-02-11 06:35:28 UTC (rev 35849)
@@ -362,6 +362,7 @@
     case 6: /* hrv   ( spot )    * enter month,day,hh.ddd,long.,lat. */
     case 7: /* tm    ( landsat ) * enter month,day,hh.ddd,long.,lat. */
     case 8: /* etm+  ( landsat7) * enter month,day,hh.ddd,long.,lat. */
+    case 9: /* liss  ( IRS 1C)   * enter month,day,hh.ddd,long.,lat. */
     {
 	cin >> month;
 	cin >> jday;
@@ -407,7 +408,7 @@
 /* ---- print geometrical conditions ---- */
 void GeomCond::print()
 {
-    static const string etiq1[9] = {
+    static const string etiq1[10] = {
 	string(" user defined conditions     "),
 	string(" meteosat observation        "),
 	string(" goes east observation       "),
@@ -416,7 +417,8 @@
 	string(" avhrr (PM noaa) observation "),
 	string(" h.r.v.   observation        "),
 	string(" t.m.     observation        "),
-	string(" etm+     observation        ")
+	string(" etm+     observation        "),
+	string(" liss     observation        ")
     };
 
     static const string head(" geometrical conditions identity  ");

Modified: grass/trunk/imagery/i.atcorr/GeomCond.h
===================================================================
--- grass/trunk/imagery/i.atcorr/GeomCond.h	2009-02-10 20:29:23 UTC (rev 35848)
+++ grass/trunk/imagery/i.atcorr/GeomCond.h	2009-02-11 06:35:28 UTC (rev 35849)
@@ -45,7 +45,9 @@
 /*                                                                      c */
 /*         8       etm+  ( landsat7) * enter month,day,hh.ddd,long.,lat.c */
 /*                                                                      c */
+/*         9       liss  ( IRC 1C )  * enter month,day,hh.ddd,long.,lat.c */
 /*                                                                      c */
+/*                                                                      c */
 /*     note:       for hrv and tm experiments long. and lat. are the    c */
 /*                 coordinates of the scene center.                     c */
 /*                 lat. must be > 0 for north lat., < 0 for south lat.  c */

Modified: grass/trunk/imagery/i.atcorr/Iwave.cpp
===================================================================
--- grass/trunk/imagery/i.atcorr/Iwave.cpp	2009-02-10 20:29:23 UTC (rev 35848)
+++ grass/trunk/imagery/i.atcorr/Iwave.cpp	2009-02-11 06:35:28 UTC (rev 35849)
@@ -10,12 +10,22 @@
 #pragma warning(disable:4305)	/* disable warning about initialization of a float by a double */
 #endif
 
-/* Adding new band filters:
+/* Adding new band filters (see also Iwave.h):
  *
+ * Note: the spectral range ranges 250 to 4000 nm (see Iwave.h) which is 
+ *   4000-250=3750nm, and (4000-250)/1500=2.5. Hence, the resulting step 
+ *   size is 2.5 nm in the ffu.s array.
+ *
  * o bands are defined by their discrete filter function
+ * o to compute a band position in the 1500 slots of ffu.s array, start
+ *   with 250nm using 2.5nm increments. The result is the starting index
+ *   for the spectral band.
  * o 1500 is the number of wavelength spectral description slots.
  *   - a 'for' loop fills up the slots with 0
  *   - then the ffu.s array is filled with each of the spectral bands data one after the other.
+ *     Example Lsat TM: (435-250) / 2.5 = 74
+ * o add iwave value, also in Iwave.h
+ * o add to GeomCond.cpp and GeomCond.h
  */
 
 
@@ -1699,6 +1709,89 @@
     return si[0];
 }
 
+void IWave::irs_1c_liss(int iwa)
+{
+    /* 2nd spectral band of IRS 1C LISS III */
+    static const float sr2[61] = {
+	.0006, .0009, .0012, .0020, .0036, .0080, .0216, .0655,
+	.1690, .3080, .4280, .5600, .7010, .7600, .7640, .7690,
+	.7960, .8400, .8760, .8820, .8670, .8560, .8620, .8890,
+	.9240, .9480, .9590, .9540, .9460, .9490, .9660, .9860,
+	1.0000,.9960, .9740, .9490, .9340, .9340, .9340, .9210,
+	.8820, .8300, .7880, .7770, .7670, .6640, .4190, .1980,
+	.0882, .0396, .0192, .0107, .0066, .0041, .0026, .0018,
+	.0012, .0010, .0007, .0006
+    };
+
+    /* 3rd spectral band of IRS 1C LISS III */
+    static const float sr3[45] = { 
+	.0041, .0110, .0357, .1310, .4020, .7200, .8300, .8700,
+	.8980, .9120, .9230, .9300, .9320, .9310, .9270, .9300,
+	.9390, .9510, .9580, .9600, .9630, .9700, .9890,1.0000,
+	.9880, .9390, .8740, .8220, .8040, .8350, .9000, .9620,
+	.9730, .9410, .9170, .8790, .6460, .2940, .1050, .0390,
+	.0105, .0040, .0020, .0010, .0000
+    };
+
+    /* 4th spectral band of IRS 1C LISS III */
+    static const float sr4[65] = {  
+	.0090, .0149, .0244, .0400, .0649, .1020, .1520, .2170,
+	.2940, .3820, .4830, .6120, .7270, .8320, .9180, .9760,
+	1.0000,.9970, .9800, .9590, .9410, .9330, .9330, .9390,
+	.9480, .9550, .9620, .9580, .9500, .9380, .9270, .9150,
+	.9100, .9050, .9050, .9020, .8970, .8900, .8830, .8740,
+	.8690, .8700, .8720, .8740, .8680, .8490, .8150, .7720,
+	.7310, .6990, .6840, .6800, .6640, .5750, .4060, .2280,
+	.1240, .0641, .0356, .0206, .0126, .0080, .0052, .0035,
+	.0025
+    };
+	 
+    /* 5th spectral band of IRS 1C LISS III */
+    static const float sr5[155] = { 
+	.0000, .0000, .0000, .0000, .0001, .0001, .0001, .0001,
+	.0000, .0001, .0001, .0021, .0001, .0000, .0001, .0001,
+	.0001, .0001, .0001, .0002, .0002, .0002, .0001, .0005,
+	.0004, .0006, .0007, .0010, .0011, .0015, .0020, .0024,
+	.0030, .0039, .0051, .0068, .0088, .0114, .0153, .0206,
+	.0281, .0372, .0515, .0708, .0983, .1370, .1870, .2580,
+	.3470, .4410, .5340, .6190, .6920, .7510, .7940, .8270,
+	.8500, .8680, .8800, .8920, .9010, .9090, .9170, .9250,
+	.9310, .9400, .9490, .9590, .9700, .9760, .9850, .9920,
+	.9960,1.0000,1.0000, .9960, .9910, .9860, .9790, .9730,
+	.9680, .9660, .9620, .9640, .9670, .9700, .9750, .9810,
+	.9850, .9880, .9840, .9770, .9690, .9560, .9400, .9240,
+	.9080, .8880, .8710, .8570, .8410, .8300, .8220, .8180,
+	.8170, .8220, .8290, .8370, .8460, .8550, .8450, .8310,
+	.8110, .7870, .7580, .7180, .6780, .6380, .5990, .5640,
+	.5280, .4930, .4590, .4210, .3770, .3320, .2770, .2160,
+	.1580, .1110, .0772, .0528, .0357, .0242, .0165, .0117,
+	.0083, .0059, .0042, .0031, .0023, .0017, .0013, .0009,
+	.0007, .0005, .0004, .0002, .0002, .0001, .0001, .0001,
+	.0001, .0000, .0000
+    };
+
+    static const float wli[4] = { 0.502, 0.612, 0.752, 1.452 };
+    static const float wls[4] = { 0.620, 0.700, 0.880, 1.760 };
+
+    ffu.wlinf = wli[iwa-1];
+    ffu.wlsup = wls[iwa-1];
+
+    int i;
+    for(i = 0; i < 1501; i++) ffu.s[i] = 0; 
+
+    switch(iwa)
+    {
+    case 1: for(i = 0; i < 61; i++)	 ffu.s[101+i] = sr2[i];
+	break;
+    case 2: for(i = 0; i < 45; i++)	 ffu.s[145+i] = sr3[i];
+	break;
+    case 3: for(i = 0; i < 65; i++)	 ffu.s[201+i] = sr4[i];
+	break;
+    case 4: for(i = 0; i < 155; i++)	 ffu.s[481+i] = sr5[i];
+	break;
+    }
+}
+
 float IWave::equivwl() const
 {
     float seb = 0;
@@ -1764,6 +1857,7 @@
 	else if(iwave <= 52)	avhrr(iwave - 36);
 	else if(iwave <= 60)	polder(iwave - 52);
 	else if(iwave <= 67)	etmplus(iwave - 60);
+	else if(iwave <= 71)	irs_1c_liss(iwave - 67);
 	else G_warning(_("Unsupported iwave value: %d"), iwave);
     }
 
@@ -1780,7 +1874,7 @@
 /* --- spectral condition ---- */
 void IWave::print()
 {
-    static const string nsat[68] = {
+    static const string nsat[72] = {
 	string(" constant        "), string(" user s          "),
 	string(" meteosat        "), string(" goes east       "), string(" goes west       "),
 	string(" avhrr 1 (noaa6) "), string(" avhrr 2 (noaa6) "),
@@ -1809,7 +1903,9 @@
 	string(" polder 6        "), string(" polder 7        "), string(" polder 8        "),
 	string(" etm+ 1          "), string(" etm+ 2          "), string(" etm+ 3          "),
 	string(" etm+ 4          "), string(" etm+ 5          "), string(" etm+ 7          "),
-	string(" etm+ 8          ")
+	string(" etm+ 8          "),
+	string(" liss 2          "), string(" liss 3          "), string(" liss 4          "),
+	string(" liss 5          ")
     };
 
 

Modified: grass/trunk/imagery/i.atcorr/Iwave.h
===================================================================
--- grass/trunk/imagery/i.atcorr/Iwave.h	2009-02-10 20:29:23 UTC (rev 35848)
+++ grass/trunk/imagery/i.atcorr/Iwave.h	2009-02-11 06:35:28 UTC (rev 35849)
@@ -89,6 +89,10 @@
 c        65  5th      "               ( 1.512-1.792 )                  c
 c        66  7th      "               ( 2.020-2.380 )                  c
 c        67  8th      "               ( 0.504-0.909 )                  c
+c        68  2nd band of liss (IRC 1C)( 0.502-0.620 )                  c
+c        69  3rd      "               ( 0.612-0.700 )                  c
+c        70  4th      "               ( 0.752-0.880 )                  c
+c        71  5th      "               ( 1.452-1.760 )                  c
 c  note: wl has to be in micrometer                                    c
 c**********************************************************************/
 
@@ -123,6 +127,7 @@
 	void modis(int iwa);
 	void polder(int iwa);
 	void etmplus(int iwa);
+	void irs_1c_liss(int iwa);
 
 
 public:

Modified: grass/trunk/imagery/i.atcorr/i.atcorr.html
===================================================================
--- grass/trunk/imagery/i.atcorr/i.atcorr.html	2009-02-10 20:29:23 UTC (rev 35848)
+++ grass/trunk/imagery/i.atcorr/i.atcorr.html	2009-02-11 06:35:28 UTC (rev 35849)
@@ -41,7 +41,7 @@
 64                           - 4th band of ETM+ Landsat 7
 </pre></div>
 
-
+<i>
 <h2><font color="red">REMAINING DOCUMENTATION ISSUES</font></h2>
 1. Using the target elevation and visibility parameters in the <em>icnd</em>
 file overrides <em>ialt</em> and <em>ivis</em> input rasters. It is not clear
@@ -49,10 +49,10 @@
 <p>
 2. The "example 6s parameters file" explains that "-.600" in line 6 means
 "target at 600 m ASL". However, in the section E of "6S CODE PARAMETER CHOICES"
-it reads: "xps <=0. means the target is at the sea level". This is contrary.
+it reads: "xps &lt;=0. means the target is at the sea level". This is contrary.
 <p>
-3. In section E, I'm not sure if the "-100< xpp <0" shouldn't actually be
-"-1000< xpp <0". ?
+3. In section E, I'm not sure if the "-100 &lt; xpp &lt; 0" shouldn't actually be
+"-1000 &lt; xpp &lt; 0". ?
 <p>
 4. It is not explained what is the "iaer" parameter that section D refers to.
 <p>
@@ -65,7 +65,7 @@
 speeding them up.
 <p>
 7. "This should not affect the user's current region settings" sounds ambigious.
-
+</i>
 <p>
 
 <H2>6S CODE PARAMETER CHOICES</H2>
@@ -130,33 +130,33 @@
 
 <tr>
 <td>6</td>
-
 <td><b>hrv</b> (spot)</td>
-
 <td>enter month,day,hh.ddd,long.,lat. *</td>
 </tr>
 
 <tr>
 <td>7</td>
-
 <td><b>tm</b> (landsat)</td>
-
 <td>enter month,day,hh.ddd,long.,lat. *</td>
 </tr>
 
 <tr>
 <td>8</td>
-
 <td><b>etm+</b> (landsat7)</td>
+<td>enter month,day,hh.ddd,long.,lat. *</td>
+</tr>
 
+<tr>
+<td>9</td>
+<td><b>liss</b> (IRS 1C)</td>
 <td>enter month,day,hh.ddd,long.,lat. *</td>
 </tr>
 </table>
 
 <blockquote>
-* NOTE: for hrv, tm and etm+ experiments, longitude and lattitude
-are the coordinates of the scene center. Lattitude must be >0 for northern
-hemisphere and &lt;0 for southern. Longitude must be >0 for eastern hemisphere
+* NOTE: for hrv, tm, etm+ and liss experiments, longitude and latitude
+are the coordinates of the scene center. Latitude must be &gt;0 for northern
+hemisphere and &lt;0 for southern. Longitude must be &gt;0 for eastern hemisphere
 and &lt;0 for western.
 </blockquote>
 
@@ -347,7 +347,7 @@
 <br><h3>E. Target altitude (xps), sensor platform (xpp)</h3>
 
 <blockquote>xps &lt;=0 means the target is at the sea level.
-<br>xps >0 means you know the altitude of the target expressed
+<br>xps &gt;0 means you know the altitude of the target expressed
 in km, and you put that value as xps.
 <br>
 
@@ -499,6 +499,10 @@
 <tr><td>66</td><td>etm+ (landsat7) band 7 (2.020-2.380)</td></tr>
 <tr><td>67</td><td>etm+ (landsat7) band 8 (0.504-0.909)</td></tr>
 
+<tr><td>68</td><td><b>liss (IRC 1C)</b> band 2 (0.502-0.620)</td></tr>
+<tr><td>69</td><td>liss (IRC 1C) band 3 (0.612-0.700)</td></tr>
+<tr><td>70</td><td>liss (IRC 1C) band 4 (0.752-0.880)</td></tr>
+<tr><td>71</td><td>liss (IRC 1C) band 5 (1.452-1.760)</td></tr>
 </table>
 
 <H2>AUTHORS</H2>



More information about the grass-commit mailing list