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

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jan 25 08:43:54 PST 2018


Author: mmetz
Date: 2018-01-25 08:43:54 -0800 (Thu, 25 Jan 2018)
New Revision: 72130

Modified:
   grass/trunk/imagery/i.atcorr/i.atcorr.html
   grass/trunk/imagery/i.atcorr/iwave.cpp
Log:
i.atcorr: update AVNIR

Modified: grass/trunk/imagery/i.atcorr/i.atcorr.html
===================================================================
--- grass/trunk/imagery/i.atcorr/i.atcorr.html	2018-01-25 16:39:23 UTC (rev 72129)
+++ grass/trunk/imagery/i.atcorr/i.atcorr.html	2018-01-25 16:43:54 UTC (rev 72130)
@@ -605,10 +605,10 @@
 <tr><td>79</td><td>aster band 8 (2.248-2.475)</td></tr>
 <tr><td>80</td><td>aster band 9 (2.295-2.538)</td></tr>
 
-<tr><td>81</td><td><b>avnir</b> band 1 (0.390-0.550)</td></tr>
-<tr><td>82</td><td>avnir band 2 (0.485-0.695)</td></tr>
-<tr><td>83</td><td>avnir band 3 (0.545-0.745)</td></tr>
-<tr><td>84</td><td>avnir band 4 (0.700-0.925)</td></tr>
+<tr><td>81</td><td><b>avnir</b> band 1 (408nm - 517nm)</td></tr>
+<tr><td>82</td><td>avnir band 2 (503nm - 612nm)</td></tr>
+<tr><td>83</td><td>avnir band 3 (583nm - 717nm)</td></tr>
+<tr><td>84</td><td>avnir band 4 (735nm - 922nm)</td></tr>
 
 <tr><td>85</td><td><b>ikonos</b> Green band (0.350-1.035)</td></tr>
 <tr><td>86</td><td>ikonos Red band (0.350-1.035)</td></tr>

Modified: grass/trunk/imagery/i.atcorr/iwave.cpp
===================================================================
--- grass/trunk/imagery/i.atcorr/iwave.cpp	2018-01-25 16:39:23 UTC (rev 72129)
+++ grass/trunk/imagery/i.atcorr/iwave.cpp	2018-01-25 16:43:54 UTC (rev 72130)
@@ -1949,67 +1949,60 @@
 void IWave::avnir(int iwa)
 {
     /* "band 1" of AVNIR */
-    static const float sr1[65] = {
-		.0000, .0000, .0000, .0008, .0017, .0049, .0080, .0186,
-		.0293, .0776, .1260, .2609, .3958, .5315, .6672, .6947,
-		.7223, .7262, .7300, .7272, .7245, .7717, .8189, .8502,
-		.8815, .9068, .9322, .9496, .9669, .9708, .9747, .9873,
-		1.0000, .9849, .9699, .9507, .9316, .9365, .9415, .9632,
-		.9849, .9600, .9351, .7552, .5754, .3911, .2068, .1361,
-		.0655, .0440, .0226, .0150, .0075, .0046, .0018, .0009,
-		.0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
-		.0000
+    static const float sr1[52] = {
+        .0008, .0017, .0049, .0080, .0186, .0293, .0776, .1260,
+        .2609, .3958, .5315, .6672, .6947, .7223, .7262, .7300,
+        .7272, .7245, .7717, .8189, .8502, .8815, .9068, .9322,
+        .9496, .9669, .9708, .9747, .9873, 1.0000, .9849, .9699,
+        .9507, .9316, .9365, .9415, .9632, .9849, .9600, .9351,
+        .7552, .5754, .3911, .2068, .1361, .0655, .0440, .0226,
+        .0150, .0075, .0046, .0018
     };
 	
     /* "band 2" of AVNIR */
-    static const float sr2[57] = {
-		.0000, .0000, .0000, .0008, .0015, .0030, .0045, .0123,
-		.0202, .0470, .0739, .1358, .1977, .3205, .4433, .5633,
-		.6832, .7137, .7442, .7594, .7746, .8089, .8432, .8576,
-		.8719, .8721, .8724, .8873, .9022, .9254, .9486, .9625,
-		.9764, .9882, 1.0000, .9904, .9808, .9349, .8890, .8367,
-		.7843, .7651, .7458, .7156, .6854, .5639, .4425, .3005,
-		.1586, .0985, .0384, .0236, .0088, .0053, .0017, .0008,
-		.0000
+    static const float sr2[52] = {
+        .0008, .0015, .0030, .0045, .0123, .0202, .0470, .0739,
+        .1358, .1977, .3205, .4433, .5633, .6832, .7137, .7442,
+        .7594, .7746, .8089, .8432, .8576, .8719, .8721, .8724,
+        .8873, .9022, .9254, .9486, .9625, .9764, .9882, 1.0000,
+        .9904, .9808, .9349, .8890, .8367, .7843, .7651, .7458,
+        .7156, .6854, .5639, .4425, .3005, .1586, .0985, .0384,
+        .0236, .0088, .0053, .0017
     };
 	
     /* "band 3" of AVNIR */
-    static const float sr3[81] = {
-		.0000, .0000, .0000, .0000, .0000, .0000, .0000, .0008,
-		.0016, .0025, .0034, .0043, .0051, .0075, .0099, .0126,
-		.0153, .0228, .0304, .0462, .0620, .0995, .1370, .2107,
-		.2844, .3857, .4871, .5747, .6624, .7198, .7771, .7896,
-		.8021, .7991, .7960, .7989, .8017, .8312, .8606, .8982,
-		.9359, .9592, .9825, .9912, 1.0000, .9931, .9862, .9568,
-		.9275, .9046, .8818, .8607, .8395, .8344, .8293, .8215,
-		.8136, .7470, .6804, .5481, .4158, .3100, .2043, .1471,
-		.0898, .0634, .0369, .0273, .0177, .0135, .0093, .0076,
-		.0060, .0045, .0030, .0023, .0015, .0016, .0016, .0008,
-		.0000
+    static const float sr3[72] = {
+        .0008, .0016, .0025, .0034, .0043, .0051, .0075, .0099,
+        .0126, .0153, .0228, .0304, .0462, .0620, .0995, .1370,
+        .2107, .2844, .3857, .4871, .5747, .6624, .7198, .7771,
+        .7896, .8021, .7991, .7960, .7989, .8017, .8312, .8606,
+        .8982, .9359, .9592, .9825, .9912, 1.0000, .9931, .9862,
+        .9568, .9275, .9046, .8818, .8607, .8395, .8344, .8293,
+        .8215, .8136, .7470, .6804, .5481, .4158, .3100, .2043,
+        .1471, .0898, .0634, .0369, .0273, .0177, .0135, .0093,
+        .0076, .0060, .0045, .0030, .0023, .0015, .0016, .0016
+
     };
 	
     /* "band 4" of AVNIR */
-    static const float sr4[121] = {
-		.0000, .0000, .0000, .0000, .0000, .0000, .0000, .0011,
-		.0023, .0023, .0022, .0033, .0045, .0080, .0115, .0190,
-		.0264, .0484, .0704, .1138, .1572, .2351, .3129, .4431,
-		.5733, .7244, .8754, .9377, 1.0000, .9884, .9768, .9528,
-		.9288, .9091, .8894, .8763, .8633, .8627, .8622, .8753,
-		.8885, .9136, .9388, .9437, .9486, .9531, .9576, .9411,
-		.9247, .8969, .8691, .8467, .8242, .7893, .7545, .7331,
-		.7117, .6911, .6705, .6560, .6414, .6357, .6299, .6258,
-		.6217, .6227, .6237, .6025, .5812, .5843, .5874, .5867,
-		.5860, .5696, .5532, .5251, .4969, .4438, .3908, .3191,
-		.2475, .1906, .1338, .1033, .0727, .0543, .0359, .0292,
-		.0224, .0161, .0097, .0069, .0040, .0038, .0036, .0030,
-		.0025, .0024, .0024, .0015, .0007, .0004, .0000, .0003,
-		.0007, .0006, .0006, .0006, .0006, .0003, .0000, .0000,
-		.0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
-		.0000
+    static const float sr4[102] = {
+        .0011, .0023, .0023, .0022, .0033, .0045, .0080, .0115,
+        .0190, .0264, .0484, .0704, .1138, .1572, .2351, .3129,
+        .4431, .5733, .7244, .8754, .9377, 1.0000, .9884, .9768,
+        .9528, .9288, .9091, .8894, .8763, .8633, .8627, .8622,
+        .8753, .8885, .9136, .9388, .9437, .9486, .9531, .9576,
+        .9411, .9247, .8969, .8691, .8467, .8242, .7893, .7545,
+        .7331, .7117, .6911, .6705, .6560, .6414, .6357, .6299,
+        .6258, .6217, .6227, .6237, .6025, .5812, .5843, .5874,
+        .5867, .5860, .5696, .5532, .5251, .4969, .4438, .3908,
+        .3191, .2475, .1906, .1338, .1033, .0727, .0543, .0359,
+        .0292, .0224, .0161, .0097, .0069, .0040, .0038, .0036,
+        .0030, .0025, .0024, .0024, .0015, .0007, .0004, .0000,
+        .0003, .0007, .0006, .0006, .0006, .0006
     };
 	
-    static const float wli[4] = {0.390, 0.485, 0.545, 0.700};
-    static const float wls[4] = {0.550, 0.625, 0.745, 1.000};
+    static const float wli[4] = {0.3975, 0.4925, 0.5625, 0.7175};
+    static const float wls[4] = {0.5275, 0.6225, 0.7425, 0.9725};
 
     ffu.wlinf = (float)wli[iwa-1];
     ffu.wlsup = (float)wls[iwa-1];
@@ -2019,13 +2012,13 @@
 
     switch(iwa)
     {
-    case 1: for(i = 0; i < 65; i++)  ffu.s[56+i] = sr1[i];
+    case 1: for(i = 0; i < 52; i++)  ffu.s[59+i] = sr1[i];
         break;
-    case 2: for(i = 0; i < 57; i++)  ffu.s[94+i] = sr2[i];
+    case 2: for(i = 0; i < 52; i++)  ffu.s[97+i] = sr2[i];
         break;
-    case 3: for(i = 0; i < 81; i++)  ffu.s[118+i] = sr3[i];
+    case 3: for(i = 0; i < 72; i++)  ffu.s[125+i] = sr3[i];
         break;
-    case 4: for(i = 0; i < 121; i++)  ffu.s[180+i] = sr4[i];
+    case 4: for(i = 0; i < 102; i++)  ffu.s[187+i] = sr4[i];
         break;
     }
 }



More information about the grass-commit mailing list