[GRASS-SVN] r44933 - grass/branches/develbranch_6/imagery/i.atcorr

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Jan 10 08:54:05 EST 2011


Author: aghisla
Date: 2011-01-10 05:54:05 -0800 (Mon, 10 Jan 2011)
New Revision: 44933

Modified:
   grass/branches/develbranch_6/imagery/i.atcorr/Iwave.cpp
Log:
Recalculated AVNIR filters according to corrected create_iwave.py function, present revision. Merged from trunk.

Modified: grass/branches/develbranch_6/imagery/i.atcorr/Iwave.cpp
===================================================================
--- grass/branches/develbranch_6/imagery/i.atcorr/Iwave.cpp	2011-01-10 13:53:16 UTC (rev 44932)
+++ grass/branches/develbranch_6/imagery/i.atcorr/Iwave.cpp	2011-01-10 13:54:05 UTC (rev 44933)
@@ -1963,61 +1963,65 @@
 void IWave::avnir(int iwa)
 {
     /* "band 1" of AVNIR */
-    static const float sr1[64] = {
-		.0000, .0000, .0000, .0008, .0017, .0049, .0080,
-		.0293, .0776, .1260, .2609, .3958, .5315, .6672,
-		.7223, .7262, .7300, .7272, .7245, .7717, .8189,
-		.8815, .9068, .9322, .9496, .9669, .9708, .9747,
-		1.0000, .9849, .9699, .9507, .9316, .9365, .9415,
-		.9849, .9600, .9351, .7552, .5754, .3911, .2068,
-		.0655, .0440, .0226, .0150, .0075, .0046, .0018,
-		.0000, .0000, .0000, .0000, .0000, .0000, .0000
+    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
     };
-
+	
     /* "band 2" of AVNIR */
-    static const float sr2[56] = {
-		.0000, .0000, .0000, .0008, .0015, .0030, .0045,
-		.0202, .0470, .0739, .1358, .1977, .3205, .4433,
-		.6832, .7137, .7442, .7594, .7746, .8089, .8432,
-		.8719, .8721, .8724, .8873, .9022, .9254, .9486,
-		.9764, .9882, 1.0000, .9904, .9808, .9349, .8890,
-		.7843, .7651, .7458, .7156, .6854, .5639, .4425,
-		.1586, .0985, .0384, .0236, .0088, .0053, .0017
+    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
     };
-
+	
     /* "band 3" of AVNIR */
-    static const float sr3[80] = {
-		.0000, .0000, .0000, .0000, .0000, .0000, .0000,
-		.0016, .0025, .0034, .0043, .0051, .0075, .0099,
-		.0153, .0228, .0304, .0462, .0620, .0995, .1370,
-		.2844, .3857, .4871, .5747, .6624, .7198, .7771,
-		.8021, .7991, .7960, .7989, .8017, .8312, .8606,
-		.9359, .9592, .9825, .9912, 1.0000, .9931, .9862,
-		.9275, .9046, .8818, .8607, .8395, .8344, .8293,
-		.8136, .7470, .6804, .5481, .4158, .3100, .2043,
-		.0898, .0634, .0369, .0273, .0177, .0135, .0093,
-		.0060, .0045, .0030, .0023, .0015, .0016, .0016
+    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
     };
-
+	
     /* "band 4" of AVNIR */
-    static const float sr4[120] = {
-		.0000, .0000, .0000, .0000, .0000, .0000, .0000,
-		.0023, .0023, .0022, .0033, .0045, .0080, .0115,
-		.0264, .0484, .0704, .1138, .1572, .2351, .3129,
-		.5733, .7244, .8754, .9377, 1.0000, .9884, .9768,
-		.9288, .9091, .8894, .8763, .8633, .8627, .8622,
-		.8885, .9136, .9388, .9437, .9486, .9531, .9576,
-		.9247, .8969, .8691, .8467, .8242, .7893, .7545,
-		.7117, .6911, .6705, .6560, .6414, .6357, .6299,
-		.6217, .6227, .6237, .6025, .5812, .5843, .5874,
-		.5860, .5696, .5532, .5251, .4969, .4438, .3908,
-		.2475, .1906, .1338, .1033, .0727, .0543, .0359,
-		.0224, .0161, .0097, .0069, .0040, .0038, .0036,
-		.0025, .0024, .0024, .0015, .0007, .0004, .0000,
-		.0007, .0006, .0006, .0006, .0006, .0003, .0000,
-		.0000, .0000, .0000, .0000, .0000, .0000, .0000
+    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 wli[4] = {0.390, 0.485, 0.545, 0.700};
     static const float wls[4] = {0.550, 0.625, 0.745, 1.000};
 
@@ -2029,13 +2033,13 @@
 
     switch(iwa)
     {
-    case 1: for(i = 0; i < 64; i++)  ffu.s[56+i] = sr1[i];
+    case 1: for(i = 0; i < 65; i++)  ffu.s[56+i] = sr1[i];
         break;
-    case 2: for(i = 0; i < 56; i++)  ffu.s[94+i] = sr2[i];
+    case 2: for(i = 0; i < 57; i++)  ffu.s[94+i] = sr2[i];
         break;
-    case 3: for(i = 0; i < 80; i++)  ffu.s[118+i] = sr3[i];
+    case 3: for(i = 0; i < 81; i++)  ffu.s[118+i] = sr3[i];
         break;
-    case 4: for(i = 0; i < 120; i++)  ffu.s[180+i] = sr4[i];
+    case 4: for(i = 0; i < 121; i++)  ffu.s[180+i] = sr4[i];
         break;
     }
 }



More information about the grass-commit mailing list